Skip to content

Commit 59df8a7

Browse files
committed
Add GitHub Actions workflow for building with arm-none-eabi-gcc
1 parent e186ce9 commit 59df8a7

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build with arm-none-eabi-gcc
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build on ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Install arm-none-eabi-gcc (Ubuntu)
23+
if: matrix.os == 'ubuntu-latest'
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y gcc-arm-none-eabi
27+
28+
- name: Install arm-none-eabi-gcc (macOS)
29+
if: matrix.os == 'macos-latest'
30+
run: |
31+
brew install --cask gcc-arm-embedded
32+
33+
- name: Install arm-none-eabi-gcc (Windows)
34+
if: matrix.os == 'windows-latest'
35+
run: |
36+
choco install gcc-arm-embedded -y
37+
38+
- name: Configure CMake
39+
run: |
40+
cd test
41+
cmake -S. -B build --toolchain=../../gcc/arm-none-eabi/cortex-m0.cmake
42+
43+
- name: Build
44+
run: |
45+
cmake --build test/build

0 commit comments

Comments
 (0)