From ad2fbf520adb4a73b68bdbbe306b5f6b3834a1ed Mon Sep 17 00:00:00 2001 From: dragonmux Date: Fri, 18 Oct 2024 14:49:40 +0100 Subject: [PATCH] github: Switched the size-diff pass over to using Meson --- .github/workflows/build-pr.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index b9756b97f35..40c37539552 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -289,12 +289,28 @@ jobs: runs-on: ubuntu-22.04 steps: + # Build a suitable runtime environment + - name: Runtime environment + shell: bash + env: + WORKSPACE: ${{ github.workspace }} + # The GITHUB_WORKSPACE step here fixes https://github.com/actions/runner/issues/2058 which is an ongoing issue. + run: | + echo "$GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV + # Setup and use a suitable ARM GCC for the firmware - name: Setup ARM GCC uses: carlosperate/arm-none-eabi-gcc-action@v1 with: release: '12.2.Rel1' + # Install and setup a suitable Meson + Ninja + - name: Setup Meson + Ninja + run: | + sudo python3 -m pip install --upgrade pip setuptools wheel + sudo python3 -m pip install meson ninja + working-directory: ${{ runner.temp }} + - uses: actions/checkout@v4 with: ref: ${{ github.base_ref }} @@ -305,11 +321,19 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} path: head + # Build the base ref firmware for the largest Flash target available - name: Build base - run: make -C base > base/build.log + run: | + meson setup build --cross-file=cross-file/blackpill-f411ce.ini + meson compile -C build > build.log + working-directory: base + # Build the PR `HEAD` ref firmware for the largest Flash target available - name: Build head - run: make -C head > head/build.log + run: | + meson setup build --cross-file=cross-file/blackpill-f411ce.ini + meson compile -C build > build.log + working-directory: head - name: Diff run: head/scripts/diff_size.py base/build.log head/build.log