|
| 1 | +name: Dependency Refresh Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - feature/5-units-0.2.2-dependency-refresh |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +jobs: |
| 12 | + host-tests: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + - name: Configure |
| 17 | + run: cmake -S tests -B build |
| 18 | + - name: Build |
| 19 | + run: cmake --build build --parallel |
| 20 | + - name: Test |
| 21 | + run: ctest --test-dir build --output-on-failure |
| 22 | + |
| 23 | + esp32-compile: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + path: project/ESPressio-Timing |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + repository: Flowduino/ESPressio-Units |
| 32 | + ref: feature/2-serializable-0.10.1-dependency-refresh |
| 33 | + path: project/dependencies/ESPressio-Units |
| 34 | + - uses: actions/checkout@v4 |
| 35 | + with: |
| 36 | + repository: Flowduino/ESPressio-Observable |
| 37 | + ref: 3.0.1 |
| 38 | + path: project/dependencies/ESPressio-Observable |
| 39 | + - uses: actions/setup-python@v5 |
| 40 | + with: |
| 41 | + python-version: '3.x' |
| 42 | + - name: Install PlatformIO |
| 43 | + run: pip install platformio |
| 44 | + - name: Create consumer project |
| 45 | + shell: bash |
| 46 | + run: | |
| 47 | + mkdir -p project/compile/src |
| 48 | + cat > project/compile/platformio.ini <<'EOF' |
| 49 | + [env:esp32] |
| 50 | + platform = espressif32 |
| 51 | + board = esp32dev |
| 52 | + framework = arduino |
| 53 | + build_flags = -std=gnu++17 |
| 54 | + build_unflags = -std=gnu++11 |
| 55 | + lib_ldf_mode = deep+ |
| 56 | + lib_deps = |
| 57 | + ../dependencies/ESPressio-Observable |
| 58 | + ../dependencies/ESPressio-Units |
| 59 | + ../ESPressio-Timing |
| 60 | + EOF |
| 61 | + cat > project/compile/src/main.cpp <<'EOF' |
| 62 | + #include <Arduino.h> |
| 63 | + #include <ESPressio_Timing.hpp> |
| 64 | +
|
| 65 | + void setup() { |
| 66 | + auto& clock = ESPressio::Timing::SystemClock<>::GetInstance(); |
| 67 | + (void)clock.GetTime(); |
| 68 | + } |
| 69 | +
|
| 70 | + void loop() {} |
| 71 | + EOF |
| 72 | + - name: Compile Timing against Units 0.2.2 candidate |
| 73 | + run: pio run -d project/compile |
0 commit comments