Skip to content

Commit ca7ea95

Browse files
authored
Merge pull request #50 from lool/fix-weekly-builds
Fix weekly CI builds for U-Boot and Linux
2 parents befb91e + b745272 commit ca7ea95

File tree

2 files changed

+45
-35
lines changed

2 files changed

+45
-35
lines changed

.github/workflows/linux.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# for cross-builds
3030
runs-on: [self-hosted, qcom-u2404, amd64]
3131
# alternative for native builds, but overkill to do both
32-
#runs-on: [self-hosted, arm64, debbuilder]
32+
#runs-on: [self-hosted, qcom-u2404, arm64]
3333
container:
3434
image: debian:trixie
3535
volumes:
@@ -62,34 +62,30 @@ jobs:
6262
debhelper-compat kmod python3 rsync coreutils
6363
scripts/build-linux-deb.sh kernel-configs/systemd-boot.config
6464
65-
- name: Upload results to fileserver
66-
env:
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
- name: Stage artifacts for upload
6866
run: |
6967
set -ux
7068
# dcmd from devscripts will be used to parse .changes file
7169
apt -y install --no-install-recommends devscripts
72-
# python3-requests is used by publish_aritfacts.py
73-
apt -y install python3-requests
74-
# copy to fileserver builds and downloads directories
70+
# stage artifacts in a directory
71+
mkdir -v artifacts
72+
cp -av `dcmd *.changes` artifacts
73+
74+
- name: Upload results to fileserver space for downloads
75+
run: |
76+
set -ux
7577
export BUILD_DIR="/fileserver-downloads/${BUILD_ID}"
7678
mkdir -vp "${BUILD_DIR}"
77-
cp -av `dcmd *.changes` "${BUILD_DIR}"
78-
79+
cp -av artifacts/* "${BUILD_DIR}"
7980
# create or update linux-deb-latest symlink
8081
mkdir -vp /fileserver-downloads/qcom-deb-images
81-
(
82-
cd /fileserver-downloads/qcom-deb-images
83-
# remove what used to be a directory and create/update symlink to
84-
# point to latest build
85-
rm -rvf linux-latest
86-
rm -rvf linux-deb-latest
87-
ln -svf "../${BUILD_ID}" linux-deb-latest
88-
)
82+
ln -svf "../${BUILD_ID}" /fileserver-downloads/qcom-deb-images/linux-deb-latest
8983
# perhaps help NFS sync
9084
sync
91-
# instruct fileserver to publish this directory
92-
export URL="${FILESERVER_URL}/${BUILD_ID}/"
93-
.github/workflows/publish_artifacts.py
94-
echo Image available at: ${URL}
85+
86+
- name: Upload private artifacts
87+
uses: qualcomm-linux/upload-private-artifact-action@v1
88+
id: upload_artifacts
89+
with:
90+
path: artifacts
9591

.github/workflows/u-boot.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
# for cross-builds
2727
runs-on: [self-hosted, qcom-u2404, amd64]
2828
# alternative for native builds, but overkill to do both
29-
#runs-on: [self-hosted, arm64, debbuilder]
29+
#runs-on: [self-hosted, qcom-u2404, arm64]
3030
container:
3131
image: debian:trixie
3232
volumes:
@@ -53,16 +53,10 @@ jobs:
5353
libssl-dev gnutls-dev xxd coreutils gzip mkbootimg
5454
scripts/build-u-boot-rb1.sh
5555
56-
- name: Upload results to fileserver
57-
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
- name: Stage artifacts for upload
5957
run: |
6058
set -ux
61-
# python3-requests is used by publish_aritfacts.py
62-
apt -y install python3-requests
63-
64-
export BUILD_DIR="/fileserver-downloads/qcom-deb-images/u-boot-rb1-latest"
65-
mkdir -vp ${BUILD_DIR}
59+
mkdir -v artifacts
6660
cp -av \
6761
u-boot/u-boot-nodtb.bin.gz \
6862
u-boot/dts/upstream/src/arm64/qcom/qrb2210-rb1.dtb \
@@ -71,10 +65,30 @@ jobs:
7165
u-boot/rb1-boot.img \
7266
u-boot/u-boot-cap.bin \
7367
u-boot/u-boot.cab \
74-
${BUILD_DIR}
68+
artifacts
69+
70+
- name: Upload results to fileserver space for downloads
71+
run: |
72+
set -ux
73+
export BUILD_DIR="/fileserver-downloads/${BUILD_ID}"
74+
mkdir -vp "${BUILD_DIR}"
75+
cp -av artifacts/* "${BUILD_DIR}"
76+
77+
# create or update u-boot-rb1-latest symlink
78+
mkdir -vp /fileserver-downloads/qcom-deb-images
79+
(
80+
cd /fileserver-downloads/qcom-deb-images
81+
# remove what used to be a directory and create/update symlink to
82+
# point to latest build
83+
rm -rvf u-boot-rb1-latest
84+
ln -svf "../${BUILD_ID}" u-boot-rb1-latest
85+
)
7586
# perhaps help NFS sync
7687
sync
77-
# instruct fileserver to publish this directory
78-
export URL="${FILESERVER_URL}/${BUILD_ID}/"
79-
.github/workflows/publish_artifacts.py
80-
echo Image available at: ${URL}
88+
89+
- name: Upload private artifacts
90+
uses: qualcomm-linux/upload-private-artifact-action@v1
91+
id: upload_artifacts
92+
with:
93+
path: artifacts
94+

0 commit comments

Comments
 (0)