Skip to content

Commit 9695463

Browse files
committed
[ci][linux] build client and manager for arm64
Signed-off-by: Vitalii Koshura <[email protected]>
1 parent bb300e7 commit 9695463

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1743
-281
lines changed

.github/workflows/debrepo/repo_update.sh

Lines changed: 35 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

33
# This file is part of BOINC.
4-
# http://boinc.berkeley.edu
5-
# Copyright (C) 2024 University of California
4+
# https://boinc.berkeley.edu
5+
# Copyright (C) 2025 University of California
66
#
77
# BOINC is free software; you can redistribute it and/or modify it
88
# under the terms of the GNU Lesser General Public License
@@ -144,42 +144,26 @@ if [[ "$IS_MIRROR" -eq "0" ]]; then
144144

145145
# keep only 3 last versions of each package before adding new ones
146146
packets=$(aptly -config=$CONF_FILE repo search boinc-$TYPE | grep -o '[^[:space:]]*_\([[:digit:]]*\.\)\{2\}[[:digit:]]*-\([[:digit:]]*_\)[^[:space:]]*' | sort -t '_' -k 2 -V | uniq)
147-
declare -A split_lists
148-
packets_list=()
149-
while IFS= read -r line; do
150-
packets_list+=("$line")
151-
done <<< "$packets"
152-
for item in "${packets_list[@]}"; do
153-
prefix="${item%%_*}" # Extract the prefix (text before the first underscore)
154-
split_lists["$prefix"]+="$item"$'\n' # Append the item to the corresponding prefix's list
155-
done
156-
157-
for prefix in "${!split_lists[@]}"; do
158-
echo "List for prefix: $prefix"
159-
echo "${split_lists[$prefix]}"
160-
count=$(echo "${split_lists[$prefix]}" | wc -l)
161-
number=$(expr $count - 1)
162-
echo "count=$number"
163-
i=0
164-
exceed=$(expr $number - 3)
165-
echo "exceed=$exceed"
166-
if (( exceed > 0)); then
167-
values_list=()
168-
while IFS= read -r line; do
169-
values_list+=("$line")
170-
done <<< "${split_lists[$prefix]}"
171-
for value in "${values_list[@]}"; do
172-
if (( i < exceed )); then
173-
echo "Remove: $value"
174-
i=$((i+1))
175-
aptly -config=$CONF_FILE repo remove boinc-$TYPE $value
147+
prefixes=$(echo "$packets"| cut -d '_' -f 1 | sort -n | uniq)
148+
suffixes=$(echo "$packets"| cut -d '_' -f 3- | sort -V | uniq)
149+
for prefix in $prefixes; do
150+
echo $prefix
151+
for suffix in $suffixes; do
152+
echo " $suffix"
153+
matched_packets=$(echo "$packets" | grep "^${prefix}_.*_${suffix}$")
154+
count=$(echo "$matched_packets" | wc -l)
155+
echo " count: $count"
156+
exceed=$(expr $count - 3)
157+
echo " exceed: $exceed"
158+
if (( exceed > 0 )); then
159+
echo "$matched_packets" | head -n $exceed | while IFS= read -r packet; do
160+
echo " Remove: $packet"
161+
aptly -config=$CONF_FILE repo remove boinc-$TYPE $packet
176162
exit_on_fail "Failed to remove the package"
177-
else
178-
break
179-
fi
180-
done
181-
fi
182-
done
163+
done
164+
fi
165+
done
166+
done
183167

184168
# creates the snapshot of the old situation
185169
aptly -config=$CONF_FILE snapshot create old-boinc-$TYPE-snap from repo boinc-$TYPE
@@ -192,29 +176,20 @@ fi
192176
if [[ "$TYPE" == "stable" ]]; then
193177
# get only one latest packages of each type from the alpha repo
194178
alpha_packets=$(aptly -config=$CONF_FILE mirror search boinc-alpha-mirror | grep -o '[^[:space:]]*_\([[:digit:]]*\.\)\{2\}[[:digit:]]*-\([[:digit:]]*_\)[^[:space:]]*' | sort -t '_' -k 2 -V -r | uniq)
195-
declare -A alpha_split_lists
196-
alpha_packets_list=()
197-
while IFS= read -r line; do
198-
alpha_packets_list+=("$line")
199-
done <<< "$alpha_packets"
200-
for item in "${alpha_packets_list[@]}"; do
201-
prefix="${item%%_*}" # Extract the prefix (text before the first underscore)
202-
alpha_split_lists["$prefix"]+="$item"$'\n' # Append the item to the corresponding prefix's list
203-
done
204-
for prefix in "${!alpha_split_lists[@]}"; do
205-
echo "List for prefix: $prefix"
206-
echo "${alpha_split_lists[$prefix]}"
207-
alpha_values_list=()
208-
while IFS= read -r line; do
209-
alpha_values_list+=("$line")
210-
done <<< "${alpha_split_lists[$prefix]}"
211-
for value in "${alpha_values_list[@]}"; do
212-
# copy the latest package to the local repo
213-
echo "Adding: $value"
214-
aptly -config=$CONF_FILE repo import boinc-alpha-mirror boinc-$TYPE $value
215-
break
216-
done
217-
done
179+
prefixes=$(echo "$packets"| cut -d '_' -f 1 | sort -n | uniq)
180+
suffixes=$(echo "$packets"| cut -d '_' -f 3- | sort -V | uniq)
181+
for prefix in $prefixes; do
182+
echo $prefix
183+
for suffix in $suffixes; do
184+
echo " $suffix"
185+
matched_packets=$(echo "$packets" | grep "^${prefix}_.*_${suffix}$")
186+
echo "$matched_packets" | tail -n 1 | while IFS= read -r packet; do
187+
echo " Adding: $packet"
188+
aptly -config=$CONF_FILE repo remove boinc-$TYPE $packet
189+
exit_on_fail "Failed to remove the package"
190+
done
191+
done
192+
done
218193
else
219194
# imports into the repo the new packages
220195
aptly -config=$CONF_FILE repo add boinc-$TYPE $SRC/*.deb

.github/workflows/linux-package-stable-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ jobs:
100100
os: [fc37, fc38, fc39, fc40, fc41, fc42, suse15_4, suse15_5, suse15_6]
101101
fail-fast: false
102102
env:
103-
ARCH: x86_64
104103
PUBKEY_HASH: D4460B4F0EEDE2C0662092F640254C9B29853EA6
105104
steps:
106105
- name: Check if build is running from origin repo
@@ -148,7 +147,7 @@ jobs:
148147
149148
cd .github/workflows/rpmrepo/
150149
# Updates or creates the repository
151-
./repo_update.sh "$ALLOW_CREATE" ${{ env.BASEREPO }} ${CWD} ${{ matrix.os }} "stable" ${{ env.PUBKEY }} ${{ env.PUBKEY_HASH }} ${{ env.ARCH }}
150+
./repo_update.sh "$ALLOW_CREATE" ${{ env.BASEREPO }} ${CWD} ${{ matrix.os }} "stable" ${{ env.PUBKEY }} ${{ env.PUBKEY_HASH }}
152151
153152
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
154153
if: ${{ success() && env.SKIP_RUN == 0 }}

0 commit comments

Comments
 (0)