-
Notifications
You must be signed in to change notification settings - Fork 19
159 lines (141 loc) · 4.28 KB
/
c.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: C
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'demo/c/**'
- '!demo/c/README.md'
- 'project/**'
- '!project/README.md'
- '.github/workflows/c.yml'
- '.github/actions/c-template/action.yml'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- 'demo/c/**'
- '!demo/c/README.md'
- 'project/**'
- '!project/README.md'
- '.github/workflows/c.yml'
- '.github/actions/c-template/action.yml'
jobs:
build-github-hosted:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
include:
- os: ubuntu-20.04
pv_recorder_platform: linux
output_dir: linux/x86_64
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/c-template
name: Build and test
with:
pv_recorder_platform: ${{ matrix.pv_recorder_platform }}
output_dir: ${{ matrix.output_dir }}
build-self-hosted:
runs-on: ${{ matrix.machine }}
strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone]
include:
- machine: rpi2
pv_recorder_platform: raspberry-pi2
output_dir: raspberry-pi/cortex-a7
- machine: rpi3-32
pv_recorder_platform: raspberry-pi3
output_dir: raspberry-pi/cortex-a53
- machine: rpi3-64
pv_recorder_platform: raspberry-pi3-64
output_dir: raspberry-pi/cortex-a53-aarch64
- machine: rpi4-32
pv_recorder_platform: raspberry-pi4
output_dir: raspberry-pi/cortex-a72
- machine: rpi4-64
pv_recorder_platform: raspberry-pi4-64
output_dir: raspberry-pi/cortex-a72-aarch64
- machine: rpi5-64
pv_recorder_platform: raspberry-pi5-64
output_dir: raspberry-pi/cortex-a76-aarch64
- machine: jetson
pv_recorder_platform: jetson-nano
output_dir: jetson/cortex-a57-aarch64
- machine: beaglebone
pv_recorder_platform: beaglebone
output_dir: beaglebone
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/c-template
name: Build and test
with:
pv_recorder_platform: ${{ matrix.pv_recorder_platform }}
output_dir: ${{ matrix.output_dir }}
build-mac:
runs-on: pv-ios
strategy:
matrix:
pv_recorder_platform: [mac-arm64, mac-x86_64]
include:
- pv_recorder_platform: mac-arm64
output_dir: mac/arm64
- pv_recorder_platform: mac-x86_64
output_dir: mac/x86_64
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/c-template
name: Build and test
with:
pv_recorder_platform: ${{ matrix.pv_recorder_platform }}
output_dir: ${{ matrix.output_dir }}
build-rpi0:
runs-on: rpi3-32
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/c-template
name: Build and test
with:
pv_recorder_platform: raspberry-pi
output_dir: raspberry-pi/arm11
build-windows:
runs-on: pv-windows
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/actions/c-template
name: Build and test
with:
pv_recorder_platform: windows
output_dir: windows/amd64
shell: pwsh
collect-artifacts:
runs-on: ubuntu-latest
needs: [build-github-hosted, build-self-hosted, build-mac, build-rpi0, build-windows]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Make collection directory
run: mkdir -p all-libs/lib
- name: Collect artifacts
shell: bash
run: |
for DIR in artifacts/*; do cp -a $DIR/* all-libs/lib/; done
- name: Upload all artifacts
uses: actions/upload-artifact@v3
with:
name: all-libs
path: all-libs
retention-days: 3