Skip to content

Commit 5668821

Browse files
committed
github: workflow: Simplify GitHub Action workflow
Using action-zephyr-setup, this commit makes the work flow simple. Also this commit enable running test via Twister. Signed-off-by: Yasushi SHOJI <[email protected]>
1 parent e5fe007 commit 5668821

File tree

1 file changed

+16
-48
lines changed

1 file changed

+16
-48
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,28 @@ name: Zephyr Build and Test
33
on: [push, pull_request]
44

55
jobs:
6-
build-zephyr:
7-
runs-on: ubuntu-22.04
8-
container:
9-
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
10-
options: '--entrypoint /bin/bash'
6+
build-test:
7+
runs-on:
8+
- ubuntu-latest
119
strategy:
1210
fail-fast: false
13-
matrix:
14-
board:
15-
- qemu_cortex_m3
16-
env:
17-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
18-
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
19-
steps:
20-
- name: Apply container owner mismatch workaround
21-
run: |
22-
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
23-
# match the container user UID because of the way GitHub
24-
# Actions runner is implemented. Remove this workaround when
25-
# GitHub comes up with a fundamental fix for this problem.
26-
git config --global --add safe.directory ${GITHUB_WORKSPACE}
27-
28-
- name: Update PATH for west
29-
run: |
30-
echo "$HOME/.local/bin" >> $GITHUB_PATH
31-
32-
- name: Configure Git
33-
run: |
34-
git config --global user.email [email protected]
35-
git config --global user.name "Github Actions"
36-
37-
- name: Setup Git (pull request)
38-
if: ${{ github.base_ref }}
39-
env:
40-
BASE_REF: ${{ github.base_ref }}
41-
run: |
42-
git rebase origin/${BASE_REF}
43-
git checkout -b this_pr
4411

45-
- name: Setup build system packages on Linux
12+
steps:
13+
- name: Python version
4614
run: |
47-
sudo apt-get -y update
48-
sudo apt-get -y install nodejs
15+
python3 --version
4916
5017
- name: Checkout
51-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
19+
with:
20+
path: libcsp-zephyr
5221

53-
- name: West Setup
54-
run: |
55-
west init -l . || true
56-
west config --global update.narrow true
57-
west config --global build.board_warn false
58-
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update.log
22+
- name: Setup Zephyr
23+
uses: zephyrproject-rtos/action-zephyr-setup@v1
24+
with:
25+
app-path: libcsp-zephyr
26+
toolchains: arm-zephyr-eabi
5927

60-
- name: Build the PR
28+
- name: Twister
6129
run: |
62-
west build -b ${{ matrix.board }} .
30+
west twister -v --integration -T libcsp-zephyr

0 commit comments

Comments
 (0)