name: Core Checks on: workflow_dispatch: pull_request: paths: - .github/workflows/core.yml - CMSIS/Core/Include/**/* - CMSIS/Core/Source/**/* - CMSIS/Core/Test/**/* push: branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: IAR_VERSION: '9.40.2' jobs: lit: runs-on: ubuntu-latest env: ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: '3.10' cache: 'pip' - name: Python requirements run: | pip install -r ./CMSIS/Core/Test/requirements.txt - name: Cache vcpkg uses: actions/cache@v3 with: key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }} restore-keys: | vcpkg-${{ runner.os }}-${{ runner.arch }}- path: /home/runner/.vcpkg - name: Install LLVM dependencies and tools working-directory: /home/runner run: | sudo apt-get update sudo apt-get install libtinfo5 llvm-15-tools sudo ln -s /usr/bin/FileCheck-15 /usr/bin/FileCheck - name: Prepare vcpkg env working-directory: ./CMSIS/Core/Test run: | . <(curl https://aka.ms/vcpkg-init.sh -L) vcpkg x-update-registry --all vcpkg activate - name: Cache IAR Toolchain uses: actions/cache@v3 with: key: bxarm-${{env.IAR_VERSION}}-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }} restore-keys: | bxarm-${{env.IAR_VERSION}}-${{ runner.os }}-${{ runner.arch }}- path: bxarm-${{env.IAR_VERSION}}.deb - name: Install IAR Toolchain run: | if [ ! -f bxarm-${{env.IAR_VERSION}}.deb ]; then curl -LO http://files.iar.com/ftp/pub/box/bxarm-${{env.IAR_VERSION}}.deb fi sudo dpkg -i bxarm-${{env.IAR_VERSION}}.deb echo "/opt/iarsystems/bxarm/arm/bin" >> "$GITHUB_PATH" echo "IAR_TOOLCHAIN_${IAR_VERSION//./_}=/opt/iarsystems/bxarm/arm/bin" >> "$GITHUB_ENV" # TODO: activate license - name: Activate Arm tool license working-directory: ./CMSIS/Core/Test run: | . /home/runner/.vcpkg/vcpkg-init vcpkg activate if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then armlm activate --code ${{ env.ARM_UBL_ACTIVATION_CODE }} else armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0 fi - uses: ammaraskar/gcc-problem-matcher@master - name: Run LIT working-directory: ./CMSIS/Core/Test run: | . /home/runner/.vcpkg/vcpkg-init vcpkg activate ./build.py lit - name: Deactivate Arm tool license if: always() working-directory: ./CMSIS/Core/Test run: | . /home/runner/.vcpkg/vcpkg-init vcpkg activate if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then armlm deactivate --code ${{ env.ARM_UBL_ACTIVATION_CODE }} else armlm deactivate --product KEMDK-COM0 fi - name: Publish Test Results if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }} uses: EnricoMi/publish-unit-test-result-action@v2 with: report_individual_runs: true files: ./CMSIS/Core/Test/*.xunit