Skip to content

Commit ea45c9d

Browse files
Fix CI for mbed & add CI for zephyr
1 parent 99ea837 commit ea45c9d

File tree

2 files changed

+51
-8
lines changed

2 files changed

+51
-8
lines changed

.github/workflows/build-mbed.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313
container: mbedos/mbed-os-env:latest
1414
steps:
15-
- name: Checkout
15+
- name: Checkout sources
1616
uses: actions/checkout@v2
1717

18-
- name: Install dependencies
18+
- name: Build for mbed
1919
run: |
2020
cd mbed
21-
pip install --upgrade mbed-cli mbed-tools
21+
pip install --upgrade --user mbed-cli mbed-tools
2222
mbed deploy
23-
24-
- name: Build
25-
run: |
26-
cmake -S mbed -B cmake_build -GNinja -DCMAKE_BUILD_TYPE=Debug
27-
cmake --build cmake_build
23+
mbed-tools configure -t GCC_ARM -m NRF52840_DK
24+
cmake -S . -B cmake_build/NRF52840_DK/develop/GCC_ARM -GNinja -DCMAKE_BUILD_TYPE=Debug
25+
cmake --build cmake_build/NRF52840_DK/develop/GCC_ARM

.github/workflows/build-zephyr.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build for zephyr
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
build:
11+
name: Build for zephyr
12+
runs-on: ubuntu-latest
13+
container: zephyrprojectrtos/zephyr-build:latest
14+
steps:
15+
- name: Get zephyr
16+
run: |
17+
sudo mkdir -p /workdir/zephyr
18+
cd /workdir/zephyr
19+
sudo west init
20+
sudo west update
21+
22+
# Workaround for GitHub permission issues.
23+
- name: Grant global rwx permission
24+
run: |
25+
sudo chmod 777 -R /workdir || true
26+
sudo chmod 777 -R /github || true
27+
sudo chmod 777 -R /home || true
28+
sudo chmod 777 -R /__w || true
29+
30+
- name: Checkout sources
31+
uses: actions/checkout@v2
32+
33+
- name: Build for zephyr
34+
run: |
35+
sudo chmod 777 -R /workdir || true
36+
sudo chmod 777 -R /github || true
37+
sudo chmod 777 -R /home || true
38+
sudo chmod 777 -R /__w || true
39+
mkdir -p zephyr/BUILD
40+
cd zephyr/BUILD
41+
export ZEPHYR_BASE="/workdir/zephyr/zephyr"
42+
export Zephyr_Dir="/workdir/zephyr/zephyr"
43+
export CMAKE_PREFIX_PATH="/workdir/zephyr/zephyr"
44+
cmake -DBOARD=nrf52840dk_nrf52840 -GNinja ..
45+
cmake --build .

0 commit comments

Comments
 (0)