Skip to content

Commit c641bd9

Browse files
GHA and colo runner
1 parent 9e78fc1 commit c641bd9

File tree

5 files changed

+98
-18
lines changed

5 files changed

+98
-18
lines changed

.github/filters.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cobble:
2+
- 'tools/site_cobble/**/*'
3+
- 'vnd/**/*'
4+
- 'hdl/ip/bsv/**/*'
5+
- 'hdl/projects/ecp5_evn/**/*'
6+
- 'hdl/projects/gimlet/**/*'
7+
- 'hdl/projects/icestick/**/*'
8+
- 'hdl/projects/ignitionlet/**/*'
9+
- 'hdl/projects/psc/**/*'
10+
- 'hdl/projects/sidecar/**/*'
11+
- 'hdl/projects/ulx3s/**/*'
12+
13+
buck2:
14+
- 'vnd/xpm/**/*'
15+
- 'prelude/**/*'
16+
- 'toolchains/**/*'
17+
- 'hdl/ip/toolchains/**/*'
18+
- 'tools/**/*'
19+
- 'hdl/ip/vhd/**/*'
20+
- 'hdl/projects/grapefruit/**/*'

.github/workflows/simulation.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: simulation
2+
run-name: ${{ github.actor }} running HDL simulations
3+
on:
4+
[push]
5+
jobs:
6+
changes:
7+
runs-on: self-hosted
8+
permissions:
9+
pull-requests: read
10+
outputs:
11+
cobble: ${{ steps.filter.outputs.cobble }}
12+
buck2: ${{ steps.filter.outputs.buck2 }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: 'true'
17+
- uses: dorny/paths-filter@v3
18+
id: filter
19+
with:
20+
filters: .github/filters.yml
21+
22+
vunit-sim:
23+
needs: changes
24+
if: ${{ needs.changes.outputs.buck2 == 'true' }}
25+
runs-on: self-hosted
26+
steps:
27+
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
28+
- name: Check out repository code
29+
uses: actions/checkout@v4
30+
with:
31+
submodules: 'true'
32+
- name: Update pip reqs
33+
run : python3 -m pip install --upgrade -r tools/requirements.txt --break-system-packages
34+
- name: Run VUnit tests
35+
run: buck2 bxl //tools/vunit-sims.bxl:vunit_sim_gen | while IFS= read -r line; do eval "$line" ; done
36+
37+
bsv-sim:
38+
needs: changes
39+
if: ${{ needs.changes.outputs.cobble == 'true' }}
40+
runs-on: self-hosted
41+
steps:
42+
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
43+
- name: Check out repository code
44+
uses: actions/checkout@v4
45+
with:
46+
submodules: 'true'
47+
fetch-depth: 0
48+
- name: Update pip reqs
49+
run : python3 -m pip install --upgrade -r tools/requirements.txt --break-system-packages
50+
- name: Env setup
51+
run: cp BUILD.vars.gha BUILD.vars && echo "/opt/bsc-2022.01/bin" >> "$GITHUB_PATH"
52+
- name: Restore build-dir
53+
run: if [ -d /tmp/cobble_build_bkup ]; then cp -R /tmp/cobble_build_bkup ./build; else mkdir ./build; fi
54+
- name: cobble init
55+
run: ../vnd/cobble/cobble init .. --reinit
56+
working-directory: ./build
57+
- name: Run BSIM tests
58+
run: ./cobble bluesim_test "//.*SchmittRegTest.*"
59+
working-directory: ./build
60+
- name: backup build-dir
61+
run: cp -R ./build /tmp/cobble_build_bkup

.github/workflows/vunit.yml

-18
This file was deleted.

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ vivado*.log
4242

4343
# DrawIO cruft
4444
**/*.svg.bkp
45+
46+
# cobble local env
47+
BUILD.vars

BUILD.vars.gha

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[bluespec]
2+
prefix = "/opt/bsc-2022.01"
3+
bin = "/opt/bsc-2022.01/bin/bsc"
4+
libdir = "/opt/bsc-2022.01/lib/"
5+
6+
[yosys]
7+
bin = "/opt/oss-cad-suite-20240513/bin/yosys"
8+
libdir = "/opt/oss-cad-suite-20240513/share/yosys"
9+
10+
[nextpnr]
11+
ecp5 = "/opt/oss-cad-suite-20240513/bin/nextpnr-ecp5"
12+
ecp5_pack = "/opt/oss-cad-suite-20240513/bin/ecppack"
13+
ice40 = "/opt/oss-cad-suite-20240513/bin/nextpnr-ice40"
14+
ice40_pack = "/opt/oss-cad-suite-20240513/bin/icepack"

0 commit comments

Comments
 (0)