Skip to content

Commit 4916ca0

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

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-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: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
- name: Grant rwx permission to user
23+
run: |
24+
sudo chown user -R .
25+
sudo chmod +rwx -R .
26+
27+
- name: Checkout sources
28+
uses: actions/checkout@v2
29+
30+
- name: Build for zephyr
31+
run: |
32+
sudo mkdir -p zephyr/BUILD
33+
cd zephyr/BUILD
34+
Zephyr_DIR="/workdir/zephyr/zephyr" sudo cmake -DBOARD=nrf52840dk_nrf52840 -GNinja ..
35+
sudo cmake --build .

0 commit comments

Comments
 (0)