Skip to content

Commit

Permalink
Update workflows and build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
JonatanAntoni committed Nov 24, 2023
1 parent 0e65378 commit 4d33286
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 12 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
IAR_VERSION: '9.40.2'

jobs:
lit:
runs-on: ubuntu-latest
Expand All @@ -36,7 +39,7 @@ jobs:
- name: Cache vcpkg
uses: actions/cache@v3
with:
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}-${{ matrix.compiler }}
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}
restore-keys: |
vcpkg-${{ runner.os }}-${{ runner.arch }}-
path: /home/runner/.vcpkg
Expand All @@ -54,7 +57,25 @@ jobs:
. <(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
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: |
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/corevalidation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
IAR_VERSION: '9.40.2'

jobs:
build-and-run:

strategy:
fail-fast: true
matrix:
compiler: [AC6, GCC, Clang]
compiler: [AC6, GCC, Clang, IAR]

runs-on: ubuntu-latest

Expand Down Expand Up @@ -78,6 +81,26 @@ jobs:
vcpkg x-update-registry --all
vcpkg activate
- name: Cache IAR Toolchain
uses: actions/cache@v3
if: matrix.compiler == 'IAR'
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
if: matrix.compiler == 'IAR'
run: |
if [ ! -f bxarm-${{env.IAR_VERSION}}.deb ]; then
curl -LO http://files.iar.com/ftp/pub/box/bxarm-${{env.IAR_VERSION}}.deb
fi
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/CoreValidation/Project
run: |
Expand Down
4 changes: 0 additions & 4 deletions CMSIS/Core/Test/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ def run_lit(toolchain, device, optimize, extra_args = None):
extra_args = ["."]
return ["lit", "--xunit-xml-output", f"lit-{toolchain}-{optimize}-{device}.xunit", "-D", f"toolchain={toolchain}", "-D", f"device={device}", "-D", f"optimize={optimize}"]+extra_args

# @matrix_filter
# def filter_iar(config):
# return config.compiler == CompilerAxis.IAR

@matrix_filter
def filter_gcc_cm85(config):
return config.compiler == CompilerAxis.GCC and config.device.match('CM85*')
Expand Down
5 changes: 0 additions & 5 deletions CMSIS/CoreValidation/Project/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,6 @@ def model_exec(config):
return cmdline


# @matrix_filter
# def filter_iar(config):
# return config.compiler == CompilerAxis.IAR


@matrix_filter
def filter_gcc_cm85(config):
return config.compiler == CompilerAxis.GCC and config.device.match('CM85*')
Expand Down

0 comments on commit 4d33286

Please sign in to comment.