From 65ee95e4beefbe4e094bd33021edfc86e5cf08e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Sat, 30 Nov 2024 11:00:22 +0000 Subject: [PATCH] ci: build: use tools/build_firmware.sh script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use new build_firmware.sh script in GitHub actions as well, so the build steps are shared with local container based workflow. Signed-off-by: Petr Štetiar --- .github/workflows/build.yaml | 42 +++--------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 736375e1..f14af916 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -127,48 +127,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install SDK extensions - run: | - # XXX: slc-cli does not actually work when the extensions aren't in the SDK! - for sdk in /*_sdk_*; do - slc signature trust --sdk "$sdk" - - ln -s $PWD/gecko_sdk_extensions "$sdk"/extension - - for ext in "$sdk"/extension/*/; do - slc signature trust --sdk "$sdk" --extension-path "$ext" - done - done - - name: Build firmware id: build-firmware run: | - # Fix `fatal: detected dubious ownership in repository at` - git config --global --add safe.directory "$GITHUB_WORKSPACE" - - # Pass all SDKs as consecutive `--sdk ...` arguments - sdk_args="" - for sdk_dir in /*_sdk*; do - sdk_args="$sdk_args --sdk $sdk_dir" - done - - # Pass all toolchains as consecutive `--toolchain ...` arguments - toolchain_args="" - for toolchain_dir in /opt/*arm-none-eabi*; do - toolchain_args="$toolchain_args --toolchain $toolchain_dir" - done - - # Build it - /opt/venv/bin/python3 tools/build_project.py \ - $sdk_args \ - $toolchain_args \ - --manifest "${{ matrix.manifest }}" \ - --build-dir build \ - --build-system makefile \ - --output-dir outputs \ - --output gbl \ - --output hex \ - --output out + build_firmware.sh \ + --work-dir "$GITHUB_WORKSPACE" \ + --manifest "${{ matrix.manifest }}" # Get the basename of the GBL in `outputs` output_basename=$(basename -- $(basename -- $(ls -1 outputs/*.gbl | head -n 1)) .gbl)