passkey_fw/.github/workflows/build_riscv.yml

72 lines
1.8 KiB
YAML
Raw Normal View History

name: Build RISC-V
on:
workflow_dispatch:
push:
2022-12-08 03:44:26 +01:00
paths:
2022-12-08 05:47:01 +01:00
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'tools/get_deps.py'
2023-02-01 10:36:39 +01:00
- '.github/workflows/build_riscv.yml'
2022-12-08 03:44:26 +01:00
pull_request:
branches: [ master ]
paths:
2022-12-08 05:47:01 +01:00
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'tools/get_deps.py'
2023-02-01 10:36:39 +01:00
- '.github/workflows/build_riscv.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-riscv:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
family:
# Alphabetical order
2022-03-22 13:02:53 +01:00
- 'ch32v307'
- 'fomu'
2021-08-15 12:21:31 +02:00
- 'gd32vf103'
steps:
- name: Setup Python
2024-01-25 13:13:11 +01:00
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Checkout TinyUSB
uses: actions/checkout@v4
- name: Set Toolchain URL
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/download/v10.1.0-1.1/xpack-riscv-none-embed-gcc-10.1.0-1.1-linux-x64.tar.gz
- name: Cache Toolchain
2022-11-16 05:11:26 +01:00
uses: actions/cache@v3
id: cache-toolchain
with:
path: ~/cache/
key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
- name: Install Toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cache/toolchain
wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
tar -C ~/cache/toolchain -xaf toolchain.tar.gz
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
2022-07-01 12:23:14 +02:00
- name: Get Dependencies
2023-05-26 10:25:55 +02:00
run: python3 tools/get_deps.py ${{ matrix.family }}
2022-07-01 12:23:14 +02:00
- name: Build
run: python3 tools/build_make.py ${{ matrix.family }}