1
+ name : fpga-build
2
+ run-name : ${{ github.actor }} Building FPGA bitstreams
3
+ on :
4
+ workflow_run :
5
+ workflows : ["simulation"]
6
+ types :
7
+ - completed
8
+ jobs :
9
+ changes :
10
+ runs-on : self-hosted
11
+ permissions :
12
+ pull-requests : read
13
+ outputs :
14
+ cobble : ${{ steps.filter.outputs.cobble }}
15
+ buck2 : ${{ steps.filter.outputs.buck2 }}
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ with :
19
+ submodules : ' true'
20
+ - uses : dorny/paths-filter@v3
21
+ id : filter
22
+ with :
23
+ filters : .github/filters.yml
24
+
25
+ grapefruit :
26
+ needs : changes
27
+ if : ${{ needs.changes.outputs.buck2 == 'true' }}
28
+ runs-on : self-hosted
29
+ steps :
30
+ - run : echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
31
+ - name : Check out repository code
32
+ uses : actions/checkout@v4
33
+ with :
34
+ submodules : ' true'
35
+ - name : Update pip reqs
36
+ run : python3 -m pip install --upgrade -r tools/requirements.txt --break-system-packages
37
+ - name : Build grapefruit bitstream
38
+ run : buck2 build //hdl/projects/grapefruit:grapefruit --show-output
39
+
40
+ bsv_streams :
41
+ needs : changes
42
+ if : ${{ needs.changes.outputs.buck2 == 'true' }}
43
+ runs-on : self-hosted
44
+ steps :
45
+ - run : echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
46
+ - name : Check out repository code
47
+ uses : actions/checkout@v4
48
+ with :
49
+ submodules : ' true'
50
+ fetch-depth : 0
51
+ - name : Update pip reqs
52
+ run : python3 -m pip install --upgrade -r tools/requirements.txt --break-system-packages
53
+ - name : Env setup
54
+ run : cp BUILD.vars.gha BUILD.vars && echo "/opt/bsc-2022.01/bin" >> "$GITHUB_PATH"
55
+ - name : Restore build-dir
56
+ run : if [ -d /tmp/cobble_build_bkup ]; then cp -R /tmp/cobble_build_bkup ./build; else mkdir ./build; fi
57
+ - name : cobble init
58
+ run : ../vnd/cobble/cobble init .. --reinit
59
+ working-directory : ./build
60
+ - name : Build FPGAs
61
+ run : ./cobble build -v "//.*#bitstream"
62
+ working-directory : ./build
63
+ - name : backup build-dir
64
+ run : cp -R ./build /tmp/cobble_build_bkup
0 commit comments