|
5 | 5 | repository_dispatch: |
6 | 6 | types: [dependency-update] |
7 | 7 | push: |
8 | | - branches: [master] |
| 8 | + branches: [main, master, develop] |
9 | 9 | pull_request: |
10 | | - branches: [master] |
| 10 | + branches: [main, master] |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 14 | + cancel-in-progress: true |
11 | 15 |
|
12 | 16 | jobs: |
13 | 17 | build: |
@@ -36,10 +40,67 @@ jobs: |
36 | 40 | strategy: |
37 | 41 | fail-fast: false |
38 | 42 | matrix: |
39 | | - profile: [smart-camera, industrial-gateway, robot-controller, mobile-edge] |
| 43 | + profile: |
| 44 | + - adaptive-edge |
| 45 | + - bci-assistive |
| 46 | + - industrial-gateway |
| 47 | + - mobile-edge |
| 48 | + - robot-controller |
| 49 | + - smart-camera |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v4 |
| 52 | + - name: Build profile |
| 53 | + run: | |
| 54 | + cmake -B build \ |
| 55 | + -DEAI_BUILD_TESTS=OFF \ |
| 56 | + -DEAI_BUILD_MIN=ON \ |
| 57 | + -DEAI_BUILD_FRAMEWORK=ON \ |
| 58 | + -DEAI_BUILD_BCI=ON |
| 59 | + cmake --build build |
| 60 | +
|
| 61 | + cross-compile: |
| 62 | + name: Cross (${{ matrix.arch }}) |
| 63 | + runs-on: ubuntu-latest |
| 64 | + strategy: |
| 65 | + fail-fast: false |
| 66 | + matrix: |
| 67 | + include: |
| 68 | + - arch: aarch64 |
| 69 | + pkg: gcc-aarch64-linux-gnu |
| 70 | + cc: aarch64-linux-gnu-gcc |
| 71 | + - arch: arm |
| 72 | + pkg: gcc-arm-linux-gnueabihf |
| 73 | + cc: arm-linux-gnueabihf-gcc |
| 74 | + - arch: riscv64 |
| 75 | + pkg: gcc-riscv64-linux-gnu |
| 76 | + cc: riscv64-linux-gnu-gcc |
| 77 | + steps: |
| 78 | + - uses: actions/checkout@v4 |
| 79 | + - name: Install cross-compiler |
| 80 | + run: | |
| 81 | + sudo apt-get update |
| 82 | + sudo apt-get install -y ${{ matrix.pkg }} |
| 83 | + - name: Cross-compile |
| 84 | + run: | |
| 85 | + cmake -B build \ |
| 86 | + -DCMAKE_C_COMPILER=${{ matrix.cc }} \ |
| 87 | + -DCMAKE_SYSTEM_NAME=Linux \ |
| 88 | + -DEAI_BUILD_TESTS=OFF |
| 89 | + cmake --build build |
| 90 | +
|
| 91 | + sanitize: |
| 92 | + name: Sanitizers |
| 93 | + runs-on: ubuntu-latest |
40 | 94 | steps: |
41 | 95 | - uses: actions/checkout@v4 |
42 | | - - name: Build ${{ matrix.profile }} |
| 96 | + - name: Build with ASAN/UBSAN |
43 | 97 | run: | |
44 | | - cmake -B build -DEAI_PROFILE=${{ matrix.profile }} |
| 98 | + cmake -B build \ |
| 99 | + -DEAI_BUILD_TESTS=ON \ |
| 100 | + -DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" |
45 | 101 | cmake --build build |
| 102 | + - name: Run tests under sanitizers |
| 103 | + run: ctest --test-dir build --output-on-failure |
| 104 | + env: |
| 105 | + ASAN_OPTIONS: detect_leaks=1:halt_on_error=1 |
| 106 | + UBSAN_OPTIONS: halt_on_error=1 |
0 commit comments