Skip to content

Commit

Permalink
Github Actions: Use carlosperate/arm-none-eabi-gcc-action@v1
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrossard authored and mathias-arm committed Aug 5, 2023
1 parent d2f519b commit 6fb361e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 40 deletions.
24 changes: 7 additions & 17 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 Down
32 changes: 9 additions & 23 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ on:
jobs:
build:
runs-on: windows-2019
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 }}

- name: Cache Python modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand All @@ -30,30 +28,18 @@ jobs:
with:
fetch-depth: 0

- name: Install Embedded Arm Toolchain
if: steps.cache-arm-gcc.outputs.cache-hit != 'true'
run: |
(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");
echo "Installing gcc-arm-none-eabi-9-2020-q2-update-win32 in ${{ runner.temp }}\arm-gcc";
Expand-Archive -Path .\gcc-arm-none-eabi-10.3-2021.07-win32.zip -DestinationPath ${{ runner.temp }} -PassThru;
Rename-Item -Path ${{ runner.temp }}\gcc-arm-none-eabi-10.3-2021.07 -NewName ${{ runner.temp }}\arm-gcc
- name: Check Embedded Arm Toolchain
run: |
echo ${{ runner.temp }}\arm-gcc\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
${{ runner.temp }}\arm-gcc\bin\arm-none-eabi-gcc -v
- name: Install Python module
run: |
pip install -r requirements.txt
- name: Compile
run: |
arm-none-eabi-gcc -v
python tools/progen_compile.py -t cmake_gcc_arm -g mingw-make --release --parallel -v
shell: cmd

- name: Upload test artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: firmware-dev-${{github.run_number}}
path: |
Expand Down

0 comments on commit 6fb361e

Please sign in to comment.