Skip to content

Commit

Permalink
ci: build: use tools/build_firmware.sh script
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ynezz committed Dec 8, 2024
1 parent 750b0f2 commit 65ee95e
Showing 1 changed file with 3 additions and 39 deletions.
42 changes: 3 additions & 39 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 65ee95e

Please sign in to comment.