Skip to content

Commit

Permalink
Merge tag 'template_v2.4.1' into merge/template_v2.4.1
Browse files Browse the repository at this point in the history
template_v2.4.1
  • Loading branch information
szczys committed Oct 1, 2024
1 parent 1ab3415 commit fa5046b
Show file tree
Hide file tree
Showing 20 changed files with 505 additions and 221 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/build_zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ jobs:
uses: actions/checkout@v4
with:
path: app

- name: Process Board name
id: nicename
shell: bash
run: |
BOARD_NICENAME=${{ inputs.BOARD }}
BOARD_NICENAME=${BOARD_NICENAME//\//_}
echo "BOARD_NICENAME=${BOARD_NICENAME}" >> $GITHUB_OUTPUT
- name: Setup West workspace
run: |
west init -l app
Expand All @@ -60,23 +69,24 @@ jobs:
- name: Build with West
run: |
west build -p -b ${{ inputs.BOARD }} app
west build -p -b ${{ inputs.BOARD }} --sysbuild app
- name: Prepare artifacts
shell: bash
if: inputs.ARTIFACT == true && inputs.TAG != ''

run: |
cd build/zephyr
cd build
mkdir -p artifacts
mv merged.hex ./artifacts/golioth-${{ github.event.repository.name }}_${{ inputs.TAG }}_${{ inputs.BOARD }}_full.hex
mv app_update.bin ./artifacts/golioth-${{ github.event.repository.name }}_${{ inputs.TAG }}_${{ inputs.BOARD }}_update.bin
mv zephyr.elf ./artifacts/golioth-${{ github.event.repository.name }}_${{ inputs.TAG }}_${{ inputs.BOARD }}.elf
mv merged.hex ./artifacts/air-quality_${{ inputs.TAG }}_${{ steps.nicename.outputs.BOARD_NICENAME }}_full.hex
mv app/zephyr/zephyr.signed.bin ./artifacts/air-quality_${{ inputs.TAG }}_${{ steps.nicename.outputs.BOARD_NICENAME }}_update.bin
mv app/zephyr/zephyr.elf ./artifacts/air-quality_${{ inputs.TAG }}_${{ steps.nicename.outputs.BOARD_NICENAME }}.elf
# Run IDs are unique per repo but are reused on re-runs
- name: Save artifact
if: inputs.ARTIFACT == true
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build_artifacts_${{ github.run_id }}
name: build_artifacts_${{ github.run_id }}_${{ steps.nicename.outputs.BOARD_NICENAME }}
path: |
build/zephyr/artifacts/*
build/artifacts/*
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
ZEPHYR_SDK: [0.16.3]
BOARD: ["nrf9160dk_nrf9160_ns","aludel_mini_v1_sparkfun9160_ns"]
BOARD: ["nrf9160dk/nrf9160/ns","aludel_mini/nrf9160/ns","aludel_elixir/nrf9160/ns"]

uses: ./.github/workflows/build_zephyr.yml
with:
Expand All @@ -36,10 +36,11 @@ jobs:
uses: actions/checkout@v4

- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build_artifacts_${{ github.run_id }}
pattern: build_artifacts_*
path: ~/artifacts
merge-multiple: true

- name: Create Release manually with GH CLI
run: gh release create --title ${{ inputs.version }} --draft ${{ inputs.version }}
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
# Copyright (c) 2023 Golioth, Inc.
# SPDX-License-Identifier: Apache-2.0

name: Test firmware
name: Test firmware

on:
pull_request:

push:
branches: [ main ]

jobs:
test_build:
test_build_nrf9160dk:
uses: ./.github/workflows/build_zephyr.yml
with:
ZEPHYR_SDK: 0.16.3
BOARD: aludel_mini_v1_sparkfun9160_ns
ARTIFACT: false
BOARD: nrf9160dk/nrf9160/ns
ARTIFACT: false
test_build_aludel_elixir:
uses: ./.github/workflows/build_zephyr.yml
with:
ZEPHYR_SDK: 0.16.3
BOARD: aludel_elixir/nrf9160/ns
ARTIFACT: false
test_build_aludel_mini:
uses: ./.github/workflows/build_zephyr.yml
with:
ZEPHYR_SDK: 0.16.3
BOARD: aludel_mini/nrf9160/ns
ARTIFACT: false
Loading

0 comments on commit fa5046b

Please sign in to comment.