This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
176 lines (174 loc) · 6.21 KB
/
build.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: build-workflow
on:
push:
paths-ignore:
- 'doc/**'
- '**.md'
- 'LICENSE'
- 'NOTICE'
jobs:
build-windows:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
name:
- windows_x86_64
name: Build sora-cpp-sdk-samples for ${{ matrix.name }}
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: microsoft/[email protected]
- run: python3 sdl_sample/${{ matrix.name }}/run.py
- run: python3 sumomo/${{ matrix.name }}/run.py
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py
- name: Create Artifact
run: |
mkdir ${{ matrix.name }}
cp _build\${{ matrix.name }}\release\sdl_sample\Release\sdl_sample.exe ${{ matrix.name }}
cp _build\${{ matrix.name }}\release\sumomo\Release\sumomo.exe ${{ matrix.name }}
cp _build\${{ matrix.name }}\release\messaging_recvonly_sample\Release\messaging_recvonly_sample.exe ${{ matrix.name }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
build-macos:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
name:
- macos_arm64
name: Build sora-cpp-sdk-samples for ${{ matrix.name }}
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- run: python3 sdl_sample/${{ matrix.name }}/run.py
- run: python3 sumomo/${{ matrix.name }}/run.py
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py
- name: Create Artifact
run: |
mkdir ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
build-ubuntu-2004:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
name:
- ubuntu-20.04_x86_64
- ubuntu-20.04_armv8_jetson
name: Build sora-cpp-sdk-samples for ${{ matrix.name }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install deps for Jetson series
if: matrix.name == 'ubuntu-20.04_armv8_jetson'
run: |
sudo apt-get update
sudo apt-get install multistrap binutils-aarch64-linux-gnu
# multistrap に insecure なリポジトリからの取得を許可する設定を入れる
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap
- name: Install deps for Ubuntu x86_64
if: matrix.name == 'ubuntu-20.04_x86_64'
run: |
sudo apt-get update
sudo apt-get install libdrm-dev libva-dev
- run: python3 sdl_sample/${{ matrix.name }}/run.py
- run: python3 sumomo/${{ matrix.name }}/run.py
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py
- name: Create Artifact
run: |
mkdir ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
build-ubuntu-2204:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
name:
- ubuntu-22.04_x86_64
name: Build sora-cpp-sdk-samples for ${{ matrix.name }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install deps for Ubuntu x86_64
if: matrix.name == 'ubuntu-22.04_x86_64'
run: |
sudo apt-get update
sudo apt-get install libdrm-dev libva-dev
- run: python3 sdl_sample/${{ matrix.name }}/run.py
- run: python3 sumomo/${{ matrix.name }}/run.py
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py
- name: Create Artifact
run: |
mkdir ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
create-release:
name: Create Release
if: contains(github.ref, 'tags/202')
needs:
- build-windows
- build-macos
- build-ubuntu-2004
- build-ubuntu-2204
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
notification:
name: Slack Notification
runs-on: ubuntu-latest
needs:
- build-windows
- build-macos
- build-ubuntu-2004
- build-ubuntu-2204
if: always()
steps:
- uses: actions/checkout@v4
- uses: rtCamp/action-slack-notify@v2
if: |
needs.build-windows.result == 'failure' ||
needs.build-macos.result == 'failure' ||
needs.build-ubuntu-2004.result == 'failure' ||
needs.build-ubuntu-2204.result == 'failure'
env:
SLACK_CHANNEL: sora-cpp-sdk
SLACK_COLOR: danger
SLACK_TITLE: Failure build
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}