2222
2323jobs :
2424 wait-for-hydra :
25- name : " Wait for hydra check-runs"
25+ name : " Wait for hydra check-runs (${{ matrix.system }})"
26+ strategy :
27+ matrix :
28+ system : [x86_64-linux, aarch64-linux]
2629 runs-on : ubuntu-latest
2730 steps :
28- - name : Waiting for ci/hydra-build:x86_64-linux .required to complete
31+ - name : Waiting for ci/hydra-build:${{ matrix.system }} .required to complete
2932 run : |
3033 while [[ true ]]; do
31- check_name='ci/hydra-build:x86_64-linux .required'
34+ check_name='ci/hydra-build:${{ matrix.system }} .required'
3235 conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?check_name=$check_name" --paginate --jq '.check_runs[].conclusion')
3336 case "$conclusion" in
3437 success)
4750 needs : [wait-for-hydra]
4851 strategy :
4952 matrix :
50- arch : [linux]
51- name : " Download Asset from the Cache"
53+ include :
54+ - system : x86_64-linux
55+ asset_name : dmq-node-linux
56+ - system : aarch64-linux
57+ asset_name : dmq-node-linux-aarch64
58+ name : " Download Asset from the Cache (${{ matrix.system }})"
5259 runs-on : ubuntu-latest
5360 steps :
5461 - name : Install Nix with good defaults
@@ -67,26 +74,23 @@ jobs:
6774
6875 - name : Build
6976 run : |
70- case ${{ matrix.arch }} in
71- linux)
72- nix build \
73- --builders "" \
74- --max-jobs 0 \
75- .#packages.x86_64-linux.dmq-node-static
76- esac
77+ nix build \
78+ --builders "" \
79+ --max-jobs 0 \
80+ .#packages.${{ matrix.system }}.dmq-node-static
7781
7882 - name : Compress binary
79- run : tar -czf dmq-node-linux .tar.gz result/bin/dmq-node
83+ run : tar -czf ${{ matrix.asset_name }} .tar.gz result/bin/dmq-node
8084
8185 - name : Checksums
8286 run : |
83- sha256sum dmq-node-linux. tar.gz >> "dmq-node-linux .tar.gz.sha256sum.txt"
87+ sha256sum ${{ matrix.asset_name }}. tar.gz >> "${{ matrix.asset_name }} .tar.gz.sha256sum.txt"
8488
8589 - name : Release
8690 uses : input-output-hk/action-gh-release@v1
8791 with :
8892 draft : true
8993 name : " Release dmq-node-${{ github.ref_name }}"
9094 files : |
91- dmq-node-linux .tar.gz
92- dmq-node-linux .tar.gz.sha256sum.txt
95+ ${{ matrix.asset_name }} .tar.gz
96+ ${{ matrix.asset_name }} .tar.gz.sha256sum.txt
0 commit comments