Skip to content

Commit 5c7fbc5

Browse files
authored
CI: rename build and run jobs (project-ocre#139)
* CI: rename linux job and add run job for zephyr * CI: fix path to zephyr.exe * CI: add executable permission for zephyr.exe --------- Signed-off-by: SorinO <sorin.olari2@gmail.com>
1 parent 09a87eb commit 5c7fbc5

2 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/workflows/linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
type: string
1616

1717
jobs:
18-
build-linux:
19-
name: Linux build
18+
build-and-run-linux:
19+
name: Build and Run
2020
runs-on: ["self-hosted", "build-server"]
2121
container:
2222
image: ghcr.io/${{ github.repository }}/devcontainer-linux:${{ inputs.devcontainer-tag }}

.github/workflows/zephyr.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616

1717
jobs:
1818
build-zephyr:
19-
name: Zephyr build
19+
name: Build
2020
runs-on: ["self-hosted", "build-server"]
2121
container:
2222
image: ghcr.io/${{ github.repository }}/devcontainer-zephyr:${{ inputs.devcontainer-tag }}
@@ -76,12 +76,36 @@ jobs:
7676
build/zephyr/zephyr.dts
7777
build/zephyr/.config
7878
79-
- name: Test native_sim mini
80-
if: startsWith(matrix.board, 'native_sim/') && matrix.app == 'mini'
79+
run-zephyr:
80+
name: Run
81+
needs: build-zephyr
82+
runs-on: ["self-hosted", "build-server"]
83+
container:
84+
image: ghcr.io/${{ github.repository }}/devcontainer-zephyr:${{ inputs.devcontainer-tag }}
85+
options: --user 1000:1000
86+
strategy:
87+
matrix:
88+
board:
89+
- native_sim/native/64
90+
app:
91+
- mini
92+
steps:
93+
- name: Set sane board name
94+
run: |
95+
BOARD=${{ matrix.board }}
96+
echo "BOARD_NAME=$(printf "%s\n" "$BOARD" | tr / _)" >> $GITHUB_ENV
97+
98+
- name: Download build artifacts
99+
uses: actions/download-artifact@v4
100+
with:
101+
name: ocre-zephyr-${{ env.BOARD_NAME }}-${{ matrix.app }}
102+
103+
- name: Run ${{ matrix.app }} on ${{ matrix.board }}
81104
run: |
82105
EXPECTED_LOG="powered by Ocre"
83106
echo "Running application..."
84-
stdbuf -oL -eL timeout 20s ./build/zephyr/zephyr.exe | tee zephyr_run.log
107+
chmod +x zephyr.exe
108+
stdbuf -oL -eL timeout 20s ./zephyr.exe | tee zephyr_run.log
85109
echo "===== Checking for expected log ====="
86110
if grep -q "$EXPECTED_LOG" zephyr_run.log; then
87111
echo "[OK] Found expected log: $EXPECTED_LOG"

0 commit comments

Comments
 (0)