Skip to content

Commit f9401c4

Browse files
committed
Updated GH actions to cache arm-none-eabi
1 parent 1710230 commit f9401c4

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

‎.github/workflows/ci_cortex_m4.yml‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ jobs:
2626
token: ${{ secrets.REPO_SCOPED_TOKEN }}
2727
submodules: true
2828

29-
# - name: Install build-essential
30-
# run: sudo apt-get install build-essential
31-
29+
# Store the arm compilers in the cache to speed up builds
3230
- name: Cache arm-none-eabi-gcc tools
3331
id: cache-arm-gcc
3432
uses: actions/cache@v1
@@ -52,10 +50,6 @@ jobs:
5250
- name: Install ninja-build
5351
uses: seanmiddleditch/gha-setup-ninja@v1
5452

55-
- name: Update $PATH if using cache
56-
if: steps.cache-arm-gcc.outputs.cache-hit == 'true'
57-
run: echo "::addPath::$HOME/arm-none-eabi-gcc-9-2019-q4/bin"
58-
5953
# Prepare the build system
6054
- name: Prepare build system
6155
run: cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=./cmake/cortex_m4.cmake -GNinja .

‎.github/workflows/ci_cortex_m7.yml‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,21 @@ jobs:
2626
token: ${{ secrets.REPO_SCOPED_TOKEN }}
2727
submodules: true
2828

29-
# - name: Install build-essential
30-
# run: sudo apt-get install build-essential
29+
# Store the arm compilers in the cache to speed up builds
30+
- name: Cache arm-none-eabi-gcc tools
31+
id: cache-arm-gcc
32+
uses: actions/cache@v1
33+
with:
34+
path: $HOME/arm-none-eabi-gcc-9-2019-q4
35+
key: ${{ runner.os }}-arm-gcc-9-2019-q4
3136

3237
# Get the arm-non-eabi-gcc toolchain
3338
- name: Install arm-none-eabi-gcc
3439
uses: fiam/arm-none-eabi-gcc@v1
40+
if: steps.cache-arm-gcc.outputs.cache-hit != 'true'
3541
with:
3642
release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
43+
directory: $HOME/arm-none-eabi-gcc-9-2019-q4
3744

3845
# Get CMake into the environment
3946
- name: Install cmake 3.17.1
@@ -46,8 +53,12 @@ jobs:
4653
# Prepare the build system
4754
- name: Prepare build system
4855
run: cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=./cmake/cortex_m7.cmake -GNinja .
56+
env:
57+
PATH: "$HOME/arm-none-eabi-gcc-9-2019-q4/bin:$PATH"
4958

5059
- name: Compile and link
5160
run: cmake --build ./build
61+
env:
62+
PATH: "$HOME/arm-none-eabi-gcc-9-2019-q4/bin:$PATH"
5263

5364

0 commit comments

Comments
 (0)