Skip to content

Commit

Permalink
CI: Check lk2nd.img size
Browse files Browse the repository at this point in the history
  • Loading branch information
TravMurav committed Jan 7, 2025
1 parent 1ad6d1c commit 5a58101
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/lk2nd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ jobs:
- name: Build
run: git clean -dxf && make -j$(nproc) TOOLCHAIN_PREFIX=arm-none-eabi-
${{ inputs.options }} ${{ inputs.project }}-${{ inputs.platform }}
- name: Check image size
run: |
IMAGE_FILE="build-${{ inputs.project }}-${{ inputs.platform }}/lk2nd.img"
IMAGE_SIZE="$(stat -c%s "$IMAGE_FILE")"
echo "Checking $IMAGE_FILE with size=$(( IMAGE_SIZE / 1024 ))KiB"
if (( IMAGE_SIZE > 512 * 1024 )); then
echo "::warning::The lk2nd.img file is too big!"
exit 1
fi
shell: bash
if: inputs.project == 'lk2nd'
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 5a58101

Please sign in to comment.