summaryrefslogtreecommitdiff
path: root/.github/workflows/build_riscv.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build_riscv.yml')
-rw-r--r--.github/workflows/build_riscv.yml55
1 files changed, 29 insertions, 26 deletions
diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml
index 90dc35206..e891a3a51 100644
--- a/.github/workflows/build_riscv.yml
+++ b/.github/workflows/build_riscv.yml
@@ -1,11 +1,28 @@
name: Build RISC-V
on:
- pull_request:
+ workflow_dispatch:
push:
- release:
- types:
- - created
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ - 'tools/get_deps.py'
+ - '.github/workflows/build_riscv.yml'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ - 'tools/get_deps.py'
+ - '.github/workflows/build_riscv.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
jobs:
build-riscv:
@@ -15,29 +32,23 @@ jobs:
matrix:
family:
# Alphabetical order
+ - 'ch32v307'
- 'fomu'
- 'gd32vf103'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.x'
- name: Checkout TinyUSB
- uses: actions/checkout@v3
-
- - name: Checkout common submodules in lib
- run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
-
- - name: Checkout hathach/linkermap
- uses: actions/checkout@v3
- with:
- repository: hathach/linkermap
- path: linkermap
+ 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
- uses: actions/cache@v2
+ uses: actions/cache@v3
id: cache-toolchain
with:
path: ~/cache/
@@ -54,15 +65,7 @@ jobs:
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
- run: python3 tools/get_dependencies.py ${{ matrix.family }}
+ run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
- run: python3 tools/build_family.py ${{ matrix.family }}
-
- - name: Linker Map
- run: |
- pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
- done
+ run: python3 tools/build_make.py ${{ matrix.family }}