Skip to content

Commit d285559

Browse files
committed
actions: build all bitstreams in parallel, re-add r2/r3
1 parent 6aa31f9 commit d285559

File tree

1 file changed

+9
-65
lines changed

1 file changed

+9
-65
lines changed

.github/workflows/main.yml

+9-65
Original file line numberDiff line numberDiff line change
@@ -30,54 +30,11 @@ jobs:
3030
- run: RUST_LOG=debug cargo test
3131
working-directory: gateware/src/rs/opts
3232

33-
build-bootloader:
33+
build-bitstreams-soc:
3434
runs-on: ubuntu-latest
3535
strategy:
3636
matrix:
37-
config:
38-
- name: bootloader
39-
cmd: bootloader build --fw-location=spiflash
4037
hw_rev: ["r2", "r3", "r4"]
41-
steps:
42-
- uses: actions/checkout@v4
43-
- uses: pdm-project/setup-pdm@v4
44-
- run: git submodule update --init --recursive
45-
- uses: dtolnay/rust-toolchain@master
46-
with:
47-
toolchain: stable
48-
components: rustfmt, clippy, llvm-tools
49-
targets: riscv32im-unknown-none-elf
50-
- run: |
51-
cargo install cargo-binutils form
52-
cargo install svd2rust --locked
53-
- name: Install PDM dependencies
54-
run: pdm install
55-
working-directory: gateware
56-
- name: Build ${{ matrix.config.cmd }} --hw ${{ matrix.hw_rev }}
57-
run: pdm ${{ matrix.config.cmd }} --hw ${{ matrix.hw_rev }}
58-
working-directory: gateware
59-
- uses: actions/upload-artifact@v4
60-
with:
61-
name: ${{ matrix.config.name }}-${{ matrix.hw_rev }}.zip
62-
path: gateware/build/*/*-*-*.tar.gz
63-
retention-days: 1
64-
65-
build-soc-bitstream:
66-
runs-on: ubuntu-latest
67-
strategy:
68-
matrix:
69-
config:
70-
- name: selftest
71-
cmd: selftest build
72-
- name: xbeam
73-
cmd: xbeam build --fs-192khz
74-
- name: polysyn
75-
cmd: polysyn build
76-
- name: macro-osc
77-
cmd: macro_osc build
78-
- name: sid
79-
cmd: sid build
80-
hw_rev: ["r4"]
8138
steps:
8239
- uses: actions/checkout@v4
8340
- uses: pdm-project/setup-pdm@v4
@@ -93,32 +50,19 @@ jobs:
9350
- name: Install PDM dependencies
9451
run: pdm install
9552
working-directory: gateware
96-
- name: Build ${{ matrix.config.cmd }} --hw ${{ matrix.hw_rev }}
97-
run: pdm ${{ matrix.config.cmd }} --hw ${{ matrix.hw_rev }}
53+
- name: Build all SoC bitstreams (${{ matrix.hw_rev }})
54+
run: ./scripts/build_bitstreams_soc.sh --hw=${{ matrix.hw_rev }}
9855
working-directory: gateware
9956
- uses: actions/upload-artifact@v4
10057
with:
101-
name: ${{ matrix.config.name }}-${{ matrix.hw_rev }}.zip
58+
name: bitstreams-soc-${{ matrix.hw_rev }}.zip
10259
path: gateware/build/*/*-*-*.tar.gz
10360
retention-days: 1
10461

105-
build-bitstream:
62+
build-bitstreams-no-soc:
10663
runs-on: ubuntu-latest
10764
strategy:
10865
matrix:
109-
config:
110-
- name: usb-audio
111-
cmd: usb_audio build
112-
- name: usb-host
113-
cmd: usb_host build --midi-device arturia-keylab49-mkii
114-
- name: dsp-nco
115-
cmd: dsp build --dsp-core nco
116-
- name: dsp-diffuser
117-
cmd: dsp build --dsp-core psram_diffuser
118-
- name: vectorscope
119-
cmd: vectorscope_no_soc build --fs-192khz
120-
- name: bootstub
121-
cmd: bootstub build --bootaddr 0x100000
12266
hw_rev: ["r2", "r3", "r4"]
12367
steps:
12468
- uses: actions/checkout@v4
@@ -127,12 +71,12 @@ jobs:
12771
- name: Install PDM dependencies
12872
run: pdm install
12973
working-directory: gateware
130-
- name: Build ${{ matrix.config.cmd }} --hw ${{ matrix.hw_rev }}
131-
run: pdm ${{ matrix.config.cmd }} --hw ${{ matrix.hw_rev }}
74+
- name: Build all non-SoC bitstreams (${{ matrix.hw_rev }})
75+
run: ./scripts/build_bitstreams_no_soc.sh --hw=${{ matrix.hw_rev }}
13276
working-directory: gateware
13377
- uses: actions/upload-artifact@v4
13478
with:
135-
name: ${{ matrix.config.name }}-${{ matrix.hw_rev }}.zip
79+
name: bitstreams-no-soc-${{ matrix.hw_rev }}.zip
13680
path: gateware/build/*/*-*-*.tar.gz
13781
retention-days: 1
13882

@@ -159,7 +103,7 @@ jobs:
159103
working-directory: gateware
160104

161105
package-artifacts:
162-
needs: [build-bootloader, build-bitstream, build-soc-bitstream]
106+
needs: [build-bitstreams-soc, build-bitstreams-no-soc]
163107
runs-on: ubuntu-latest
164108
steps:
165109
- uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)