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 7a6e287 commit 2b5bcd1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/lk2nd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ 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="${{ inputs.project }}-${{ inputs.platform }}/lk2nd.img"
IMAGE_SIZE="$(stat -c%s "$IMAGE_SIZE")"
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
continue-on-error: true
if: inputs.project == 'lk2nd'
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 2b5bcd1

Please sign in to comment.