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