|
| 1 | +name: Example |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - .github/workflows/examples.yaml |
| 7 | + - CMSIS/RTOS2/FreeRTOS/Examples/* |
| 8 | + - CMSIS/RTOS2/FreeRTOS/Include/* |
| 9 | + - CMSIS/RTOS2/FreeRTOS/Source/* |
| 10 | + - Source/**/* |
| 11 | + - ARM.CMSIS-FreeRTOS.pdsc |
| 12 | + push: |
| 13 | + branches: [main] |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + examples: |
| 21 | + strategy: |
| 22 | + fail-fast: true |
| 23 | + matrix: |
| 24 | + compiler: [AC6, GCC, CLANG] |
| 25 | + |
| 26 | + runs-on: ubuntu-latest |
| 27 | + |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + |
| 31 | + - name: Cache packs |
| 32 | + uses: actions/cache@v4 |
| 33 | + with: |
| 34 | + key: packs-${{ github.run_id }}-${{ matrix.compiler }} |
| 35 | + restore-keys: | |
| 36 | + packs- |
| 37 | + path: /home/runner/.cache/arm/packs |
| 38 | + |
| 39 | + - name: Install LLVM dependencies and tools |
| 40 | + working-directory: /home/runner |
| 41 | + run: | |
| 42 | + sudo apt-get update |
| 43 | + sudo apt-get install libtinfo5 |
| 44 | +
|
| 45 | + - name: Prepare vcpkg env |
| 46 | + uses: JonatanAntoni/actions/vcpkg@main |
| 47 | + with: |
| 48 | + config: ./CMSIS/RTOS2/FreeRTOS/Examples/vcpkg-configuration.json |
| 49 | + |
| 50 | + - name: Activate Arm tool license |
| 51 | + run: | |
| 52 | + armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0 |
| 53 | + |
| 54 | + - uses: ammaraskar/gcc-problem-matcher@master |
| 55 | + |
| 56 | + - name: Register local pack |
| 57 | + run: | |
| 58 | + cpackget rm ARM.CMSIS-FreeRTOS || echo "Ok" |
| 59 | + cpackget add ./ARM.CMSIS-FreeRTOS.pdsc |
| 60 | +
|
| 61 | + - name: Build exmples |
| 62 | + working-directory: ./CMSIS/RTOS2/FreeRTOS/Examples |
| 63 | + run: | |
| 64 | + cbuild Examples.csolution.yml --packs --update-rte --toolchain ${{ matrix.compiler }} |
| 65 | +
|
| 66 | + - name: Deactivate Arm tool license |
| 67 | + if: always() |
| 68 | + run: | |
| 69 | + armlm deactivate --product KEMDK-COM0 |
0 commit comments