43 lines
1023 B
YAML
43 lines
1023 B
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone repo
|
|
uses: actions/checkout@v2
|
|
- name: configure
|
|
run: |
|
|
cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug
|
|
- name: build
|
|
run: |
|
|
cmake --build build --config Debug
|
|
- name: Upload Build Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: build
|
|
path: build/
|
|
exclude: |
|
|
build/**/*.o
|
|
build/**/*.internal
|
|
build/**/*.txt
|
|
- name: Compile Arduino examples
|
|
run: |
|
|
pushd build
|
|
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
|
|
popd
|
|
export PATH="build/bin:$PATH"
|
|
./examples/arduino/compile-examples.sh
|
|
Test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: test
|
|
run: |
|
|
cd build
|
|
ctest
|
|
|