Skip to content

Commit

Permalink
Github Actions: Use carlosperate/arm-none-eabi-gcc-action@v1 to downl…
Browse files Browse the repository at this point in the history
…oad toolchain
  • Loading branch information
mbrossard committed Aug 5, 2023
1 parent ca48a02 commit ca8de83
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ on:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
gcc: ['10.3-2021.10']

steps:
- name: Cache Embedded Arm Toolchain
id: cache-arm-gcc
uses: actions/cache@v2
env:
cache-name: arm-gcc-10.3-2021-07
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
path: ${{ runner.temp }}/arm-gcc
key: ${{ runner.os }}-${{ env.cache-name }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
release: ${{ matrix.gcc }}
path-env-var: ARM_NONE_EABI_GCC_PATH

- name: Cache Python modules
id: cache-python
Expand All @@ -43,15 +42,6 @@ jobs:
run: |
pip3 install --user -r requirements.txt
- name: Install Embedded Arm Toolchain
if: steps.cache-arm-gcc.outputs.cache-hit != 'true'
run: |
curl -O -L https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
md5sum gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
echo Installing in ${{ runner.temp }}/arm-gcc
mkdir -p ${{ runner.temp }}/arm-gcc
tar jvxf gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2 -C ${{ runner.temp }}/arm-gcc --strip-components 1
- name: Install dependencies
run: |
sudo apt install -y ccache ninja-build
Expand All @@ -69,8 +59,16 @@ jobs:
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('log.txt') }}
restore-keys: ${{ runner.os }}-ccache-
key: ${{ runner.os }}-gcc-${{ matrix.gcc }}-${{ hashFiles('log.txt') }}
restore-keys: |
${{ runner.os }}-gcc-${{ matrix.gcc }}-
${{ runner.os }}-ccache-
- name: Configure CCache
run: |
ccache --set-config=cache_dir="$GITHUB_WORKSPACE/.ccache"
ccache --set-config=max_size=2Gi
ccache -z -s
- name: Compile
run: |
Expand Down

0 comments on commit ca8de83

Please sign in to comment.