1name: Compile and Run 2on: 3 workflow_dispatch: 4 pull_request: 5 branches: [main] 6 push: 7 branches: [main] 8 9permissions: 10 actions: read 11 security-events: write 12 13jobs: 14 CI_cpp_test_run: 15 strategy: 16 fail-fast: false 17 matrix: 18 # GCC currently has too many problems with the C++ API 19 compiler: [AC6, CLANG] 20 core: [M0, M4, M55] 21 runs-on: ubuntu-latest 22 23 steps: 24 - name: Checkout 25 uses: actions/checkout@v4 26 27 - name: Setup Python 3.10 28 uses: actions/setup-python@v5 29 with: 30 python-version: '3.10' 31 cache: 'pip' 32 cache-dependency-path: Testing/requirements.txt 33 34 - name: Install system packages 35 run: | 36 sudo add-apt-repository ppa:deadsnakes/ppa 37 sudo apt-get install libpython3.9 libtinfo5 38 39 - name: Cache packs 40 uses: actions/cache@v4 41 with: 42 key: packs-cmsis-dsp 43 restore-keys: | 44 packs- 45 path: /home/runner/.cache/arm/packs 46 47 - name: Activate vcpkg 48 uses: ARM-software/cmsis-actions/vcpkg@v1 49 with: 50 cache: "-cmsis_dsp_vcpkg" 51 52 - name: Activate Arm tool license 53 uses: ARM-software/cmsis-actions/armlm@v1 54 55 - name: Cache boost 56 id: cache-boost 57 uses: actions/cache@v4 58 with: 59 key: boost-cmsis-dsp 60 restore-keys: | 61 boost-cmsis-dsp 62 path: ${{ github.workspace }}/boost_1_84_0 63 64 - name: Install boost 65 if: steps.cache-boost.outputs.cache-hit != 'true' 66 run: | 67 echo "Install boost" 68 curl -o boost.tar.gz https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.gz 69 tar -xf boost.tar.gz 70 71 - name: Prepare framework 72 run: | 73 cd dsppp 74 echo "Create missing folders" 75 mkdir AC6_results 76 mkdir CLANG_results 77 mkdir GCC_results 78 79 echo "Install missing python packages" 80 pip install -r ../Testing/requirements.txt 81 82 echo "Load missing pack" 83 csolution list packs -s test.csolution.yml -m > required_packs.txt 84 85 cat required_packs.txt 86 cpackget add -a -f required_packs.txt 87 88 89 - name: Execute 90 run: | 91 cd dsppp 92 echo "Running tests" 93 94 python run_all.py -t -g ${{ matrix.compiler }} -c ${{ matrix.core }} -avh $AVH_FVP_PLUGINS/../bin 95 96 - name: Upload test report 97 uses: actions/upload-artifact@v4 98 with: 99 name: test-cpp-report_${{ matrix.compiler }}_${{ matrix.core }} 100 path: dsppp/${{ matrix.compiler }}_results/errors_${{ matrix.core }}.txt 101 102 103 - name: Check error 104 run: | 105 cd dsppp 106 107 echo "Checking output..." 108 test "$(cat ${{ matrix.compiler }}_results/errors_${{ matrix.core }}.txt | wc -l)" -eq 0 109