Skip to content

Commit 960a362

Browse files
committed
CI: compute checksums
compute SHA256 checksums for builds this is useful at least for 2 reasons: 1. user can ensure that the build comes really from the CI (isn't tampered) 2. can identify or match version with appropriate action run (the $VERSION is usually always "continuous", except for releases) The sha256 sum is currently only show in the protocol, not uploaded to GH releases - this doesn't seem to be needed because GH currently already prints the checksum by itself on the download (releases) page. Skip computing checksum in Win when uplad-artifact is used - the zip is actually created by the Action so we cannot compute the checksum on it. /sbin/sha256sum is not present in CI mac workers for some reason
1 parent c13daa7 commit 960a362

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/scripts/macOS/prepare.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ set -- \
5252
qt \
5353
sdl3 \
5454
sdl3_ttf \
55+
sha2 `#for cksum in CI YAML` \
5556
speexdsp \
5657
vulkan-headers \
5758
wolfssl \

.github/workflows/ccpp.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ jobs:
122122
docker run --rm -v $PWD/squashfs-root/:/AppImage aitest-ubuntu /AppImage/AppRun --list-modules
123123
docker run --rm -v $PWD/squashfs-root:/AppImage aitest-arch /AppImage/AppRun --capabilities
124124
bash appdir-lint.sh squashfs-root
125+
- name: Compute checksum
126+
run: sha256sum UltraGrid-$VERSION-x86_64.AppImage
125127
- name: Upload Release Asset
126128
id: upload-release
127129
if: (github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/')
@@ -226,6 +228,8 @@ jobs:
226228
sleep $((n * 10))
227229
done
228230
mv UltraGrid.dmg UltraGrid-$VERSION.dmg
231+
- name: Compute checksum
232+
run: sha2 -256 UltraGrid-$VERSION.dmg || true
229233
- name: Upload Release Asset
230234
id: upload-release
231235
if: (github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/')
@@ -373,6 +377,9 @@ jobs:
373377
run: |
374378
cd build; zip -9 -r UltraGrid-$VERSION-win64.zip UltraGrid-$VERSION-win64
375379
$GITHUB_WORKSPACE/.github/scripts/replace-asset.sh $TAG UltraGrid-$VERSION-win64.zip application/zip Windows%20build
380+
- name: Compute checksum
381+
if: steps.upload-release.conclusion != 'skipped'
382+
run: sha256sum build/UltraGrid-$VERSION-win64.zip
376383
- name: Upload Build
377384
if: steps.upload-release.conclusion == 'skipped'
378385
uses: actions/upload-artifact@main

0 commit comments

Comments
 (0)