Skip to content

Commit

Permalink
revamp workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
VynDragon committed Feb 10, 2025
1 parent 2bab7c0 commit 474e7cc
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- uses: actions/checkout@v4

- name: arm-none-eabi-gcc GNU Arm Embedded Toolchain
if: ${{ !contains(matrix.pico.platform, 'riscv') }}
uses: carlosperate/[email protected]

- name: riscv Toolchain
Expand All @@ -46,7 +47,7 @@ jobs:
- name: riscv Toolchain env
if: ${{ contains(matrix.pico.platform, 'riscv') }}
run: |
echo "PICO_GCC_TRIPLE=riscv64-unknown-elf" >> $GITHUB_ENV
echo "PICO_SDK_PATH=riscv_toolchain/corev-openhw-gcc-ubuntu2204-20240530" >> $GITHUB_ENV
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
Expand All @@ -60,12 +61,31 @@ jobs:
restore-keys: |
${{ runner.os }}-build-
- name: Cache riscv toolchain
id: cache-riscv-toolchain
if: ${{ contains(matrix.pico.platform, 'riscv') }}
uses: actions/cache@v4
with:
path: lib
key: ${{ runner.os }}-build-${{ hashFiles('riscv_toolchain/**') }}
restore-keys: |
${{ runner.os }}-build-
- name: Fetch submodules
if: steps.cache-submodules.outputs.cache-hit != 'true'
run: |
git submodule update --init
git -C lib/pico-sdk submodule update --init
- name: Fetch riscv toolchain
if: ${{ contains(matrix.pico.platform, 'riscv') && steps.cache-riscv-toolchain.outputs.cache-hit != 'true'}}
run: |
mkdir riscv_toolchain
cd riscv_toolchain
export TC_NAME=corev-openhw-gcc-ubuntu2204-20240530
wget https://buildbot.embecosm.com/job/corev-gcc-ubuntu2204/47/artifact/${TC_NAME}.tar.gz
tar -xf ${TC_NAME}.tar.gz
- name: Build each example on every commit
run: |
cd examples/${{ matrix.example }}
Expand Down

0 comments on commit 474e7cc

Please sign in to comment.