@@ -2,6 +2,10 @@ name: CI
2
2
3
3
on : [push, pull_request, workflow_dispatch]
4
4
5
+ concurrency :
6
+ group : ${{ github.workflow }}-${{ github.ref }}
7
+ cancel-in-progress : true
8
+
5
9
jobs :
6
10
build :
7
11
name : Build
14
18
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
15
19
make push
16
20
if: ${{ github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main' }}
21
+
22
+ build-minimal :
23
+ name : Build Minimal
24
+ runs-on : ubuntu-latest
25
+ steps :
26
+ - uses : actions/checkout@v3
27
+ - run : make update
28
+ - run : make build/minimal-cross
29
+ - run : |
30
+ docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
31
+ make push/minimal-cross
32
+ if: ${{ github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main' }}
33
+
34
+ - run : make save/minimal-cross
35
+ - uses : actions/upload-artifact@v3
36
+ with :
37
+ name : roborio
38
+ path : roborio.tar.gz
39
+ retention-days : 1
40
+ - uses : actions/upload-artifact@v3
41
+ with :
42
+ name : raspbian
43
+ path : raspbian.tar.gz
44
+ retention-days : 1
45
+ - uses : actions/upload-artifact@v3
46
+ with :
47
+ name : aarch64
48
+ path : aarch64.tar.gz
49
+ retention-days : 1
50
+
51
+ build-python :
52
+ name : Build Python Images
53
+ needs : [build-minimal]
54
+ runs-on : ubuntu-latest
55
+ strategy :
56
+ matrix :
57
+ type :
58
+ - raspbian
59
+ - aarch64
60
+ pyversion :
61
+ - py38
62
+ - py39
63
+ - py310
64
+ - py311
65
+ - py312
66
+ include :
67
+ - type : roborio
68
+ pyversion : py312
69
+
70
+ steps :
71
+ - uses : actions/checkout@v3
72
+
73
+ - name : Download image
74
+ uses : actions/download-artifact@v3
75
+ with :
76
+ name : ${{ matrix.type }}
77
+ path : img
78
+
79
+ - name : Load image
80
+ run : |
81
+ gunzip -c img/${{ matrix.type }}.tar.gz | docker load
82
+ rm img/${{ matrix.type }}.tar.gz
83
+
84
+ - name : Build image
85
+ run : make build/cross-${{ matrix.type }}-${{ matrix.pyversion }}
86
+
87
+ - name : Upload image
88
+ run : |
89
+ docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
90
+ make push/cross-${{ matrix.type }}-${{ matrix.pyversion }}
91
+ if : ${{ github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main' }}
0 commit comments