1
+ name : fpga-build
2
+ run-name : ${{ github.actor }} Building FPGA bitstreams
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
+ grapefruit :
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 : buck path
35
+ run : echo "~/.cargo/bin" >> "$GITHUB_PATH"
36
+ - name : Build grapefruit bitstream
37
+ run : buck2 build //hdl/projects/grapefruit:grapefruit --show-output
38
+
39
+ bsv-streams :
40
+ needs : changes
41
+ if : ${{ needs.changes.outputs.buck2 == 'true' }}
42
+ runs-on : self-hosted
43
+ steps :
44
+ - run : echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
45
+ - name : Check out repository code
46
+ uses : actions/checkout@v4
47
+ with :
48
+ submodules : ' true'
49
+ fetch-depth : 0
50
+ - name : Update pip reqs
51
+ run : python3 -m pip install --upgrade -r tools/requirements.txt --break-system-packages
52
+ - name : Env setup
53
+ run : cp BUILD.vars.gha BUILD.vars && echo "/opt/bsc-2022.01/bin" >> "$GITHUB_PATH"
54
+ - name : Restore build-dir
55
+ run : if [ -d /tmp/cobble_build_bkup ]; then cp -R /tmp/cobble_build_bkup ./build; else mkdir ./build; fi
56
+ - name : cobble init
57
+ run : ../vnd/cobble/cobble init .. --reinit
58
+ working-directory : ./build
59
+ - name : Build FPGAs
60
+ run : ./cobble build -v "//.*#bitstream"
61
+ working-directory : ./build
62
+ - name : backup build-dir
63
+ run : cp -R ./build /tmp/cobble_build_bkup
0 commit comments