Skip to content

Commit

Permalink
CI: add retry
Browse files Browse the repository at this point in the history
  • Loading branch information
HiGarfield committed Nov 11, 2024
1 parent 7316474 commit 28e4f53
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,26 @@ jobs:
- name: Compile firmware
if: ${{ env.TARGET_DEVICE != 'dl' }}
id: compile
working-directory: ${{ env.WORKING_DIR }}
run: |
echo -e "$(($(nproc) + 1)) thread compile"
make -j$(($(nproc) + 1)) || make -j1 V=s
rm -rf ${OUTPUT_DIR}
mkdir -p ${OUTPUT_DIR}
cp -u -f bin/targets/*/*/${LEDE_OUTPUT_NAME}-*-sysupgrade.bin ${OUTPUT_DIR}/
cd ${OUTPUT_DIR}/
for f in *.bin; do
mv "$f" "$(echo "$f" | sed -e 's/-squashfs//g' -e 's/-sysupgrade//g')"
done
for f in *.bin; do
sha256sum "$f" | awk '{print $1}' >"${f}.sha256sum"
done
echo "status=success" >> $GITHUB_OUTPUT
uses: nick-fields/retry@master
with:
timeout_minutes: 120
max_attempts: 5
retry_on: error
command: |
cd "${WORKING_DIR}"
echo -e "$(($(nproc) + 1)) thread compile"
make -j$(($(nproc) + 1)) || make -j1 V=s
rm -rf ${OUTPUT_DIR}
mkdir -p ${OUTPUT_DIR}
cp -u -f bin/targets/*/*/${LEDE_OUTPUT_NAME}-*-sysupgrade.bin ${OUTPUT_DIR}/
cd ${OUTPUT_DIR}/
for f in *.bin; do
mv "$f" "$(echo "$f" | sed -e 's/-squashfs//g' -e 's/-sysupgrade//g')"
done
for f in *.bin; do
sha256sum "$f" | awk '{print $1}' >"${f}.sha256sum"
done
echo "status=success" >> $GITHUB_OUTPUT
- name: Save dl
if: ${{ env.TARGET_DEVICE == 'dl' }}
Expand Down

0 comments on commit 28e4f53

Please sign in to comment.