Skip to content

Commit b33470b

Browse files
committed
ci
1 parent a5f8448 commit b33470b

1 file changed

Lines changed: 7 additions & 52 deletions

File tree

.github/workflows/cpp-ci.yml

Lines changed: 7 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,13 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout code
10-
uses: actions/checkout@v3
10+
uses: actions/checkout@v4
1111

12-
- name: Set up Python
13-
uses: actions/setup-python@v4
14-
with:
15-
python-version: '3.x'
12+
- name: Configure (CMake)
13+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
1614

17-
- name: Install PlatformIO
18-
run: pip install -U platformio
19-
20-
- name: Run Native Unit Tests
21-
run: pio test -e native
22-
23-
compile_check:
24-
runs-on: ubuntu-latest
25-
steps:
26-
- name: Checkout code
27-
uses: actions/checkout@v3
28-
29-
- name: Set up Python
30-
uses: actions/setup-python@v4
31-
with:
32-
python-version: '3.x'
33-
34-
- name: Install PlatformIO
35-
run: pip install -U platformio
36-
37-
- name: Verify Build (MH-Tiny88 / AVR)
38-
run: |
39-
cat <<EOF > verify.cpp
40-
#include <TinyLink.h>
41-
#include <adapters/TinyArduinoAdapter.h>
42-
using namespace tinylink;
43-
struct Data { int x; } __attribute__((packed));
44-
TinyArduinoAdapter hw(Serial);
45-
TinyLink<Data, TinyArduinoAdapter> link(hw);
46-
void setup(){}
47-
void loop(){ link.update(); }
48-
EOF
49-
pio ci --lib="." --board=attiny88 verify.cpp
50-
51-
- name: Verify Build (ESP-M3 / ESP8266)
52-
run: |
53-
cat <<EOF > verify_esp.cpp
54-
#include <TinyLink.h>
55-
#include <adapters/TinyArduinoAdapter.h>
56-
using namespace tinylink;
57-
struct Data { int x; } __attribute__((packed));
58-
TinyArduinoAdapter hw(Serial);
59-
TinyLink<Data, TinyArduinoAdapter> link(hw);
60-
void setup(){}
61-
void loop(){ link.update(); }
62-
EOF
63-
pio ci --lib="." --board=esp01_1m verify_esp.cpp
15+
- name: Build
16+
run: cmake --build build --config Release -j
6417

18+
- name: Run tests (CTest)
19+
run: ctest --test-dir build --output-on-failure

0 commit comments

Comments
 (0)