Skip to content

Commit 6fb361e

Browse files
mbrossardmathias-arm
authored andcommitted
Github Actions: Use carlosperate/arm-none-eabi-gcc-action@v1
1 parent d2f519b commit 6fb361e

File tree

2 files changed

+16
-40
lines changed

2 files changed

+16
-40
lines changed

.github/workflows/linux.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-22.04
16+
strategy:
17+
matrix:
18+
gcc: ['10.3-2021.10']
1619

1720
steps:
18-
- name: Cache Embedded Arm Toolchain
19-
id: cache-arm-gcc
20-
uses: actions/cache@v2
21-
env:
22-
cache-name: arm-gcc-10.3-2021-07
21+
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
22+
uses: carlosperate/arm-none-eabi-gcc-action@v1
2323
with:
24-
path: ${{ runner.temp }}/arm-gcc
25-
key: ${{ runner.os }}-${{ env.cache-name }}
26-
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
24+
release: ${{ matrix.gcc }}
25+
path-env-var: ARM_NONE_EABI_GCC_PATH
2726

2827
- name: Cache Python modules
2928
id: cache-python
@@ -43,15 +42,6 @@ jobs:
4342
run: |
4443
pip3 install --user -r requirements.txt
4544
46-
- name: Install Embedded Arm Toolchain
47-
if: steps.cache-arm-gcc.outputs.cache-hit != 'true'
48-
run: |
49-
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
50-
md5sum gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
51-
echo Installing in ${{ runner.temp }}/arm-gcc
52-
mkdir -p ${{ runner.temp }}/arm-gcc
53-
tar jvxf gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2 -C ${{ runner.temp }}/arm-gcc --strip-components 1
54-
5545
- name: Install dependencies
5646
run: |
5747
sudo apt install -y ccache ninja-build

.github/workflows/windows.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,18 @@ on:
55
jobs:
66
build:
77
runs-on: windows-2019
8+
strategy:
9+
matrix:
10+
gcc: ['10.3-2021.10']
811

912
steps:
10-
- name: Cache Embedded Arm Toolchain
11-
id: cache-arm-gcc
12-
uses: actions/cache@v2
13-
env:
14-
cache-name: arm-gcc-10.3-2021-07
13+
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
14+
uses: carlosperate/arm-none-eabi-gcc-action@v1
1515
with:
16-
path: ${{ runner.temp }}/arm-gcc
17-
key: ${{ runner.os }}-${{ env.cache-name }}
18-
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
16+
release: ${{ matrix.gcc }}
1917

2018
- name: Cache Python modules
21-
uses: actions/cache@v2
19+
uses: actions/cache@v3
2220
with:
2321
path: ~\AppData\Local\pip\Cache
2422
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
@@ -30,30 +28,18 @@ jobs:
3028
with:
3129
fetch-depth: 0
3230

33-
- name: Install Embedded Arm Toolchain
34-
if: steps.cache-arm-gcc.outputs.cache-hit != 'true'
35-
run: |
36-
(New-Object System.Net.WebClient).DownloadFile("https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-win32.zip","gcc-arm-none-eabi-10.3-2021.07-win32.zip");
37-
echo "Installing gcc-arm-none-eabi-9-2020-q2-update-win32 in ${{ runner.temp }}\arm-gcc";
38-
Expand-Archive -Path .\gcc-arm-none-eabi-10.3-2021.07-win32.zip -DestinationPath ${{ runner.temp }} -PassThru;
39-
Rename-Item -Path ${{ runner.temp }}\gcc-arm-none-eabi-10.3-2021.07 -NewName ${{ runner.temp }}\arm-gcc
40-
41-
- name: Check Embedded Arm Toolchain
42-
run: |
43-
echo ${{ runner.temp }}\arm-gcc\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
44-
${{ runner.temp }}\arm-gcc\bin\arm-none-eabi-gcc -v
45-
4631
- name: Install Python module
4732
run: |
4833
pip install -r requirements.txt
4934
5035
- name: Compile
5136
run: |
37+
arm-none-eabi-gcc -v
5238
python tools/progen_compile.py -t cmake_gcc_arm -g mingw-make --release --parallel -v
5339
shell: cmd
5440

5541
- name: Upload test artifacts
56-
uses: actions/upload-artifact@v2
42+
uses: actions/upload-artifact@v3
5743
with:
5844
name: firmware-dev-${{github.run_number}}
5945
path: |

0 commit comments

Comments
 (0)