-
-
Notifications
You must be signed in to change notification settings - Fork 33
211 lines (171 loc) · 5.9 KB
/
build-test.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
name: Build Test
on:
push:
# Don't run for tags
tags-ignore:
- 'v*.*.*'
branches:
- '**'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
build-standard:
name: Build (Linux Desktop)
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Update packages
run: sudo apt-get -yq update
- name: Install Dependencies
run: sudo apt-get -y -qq install libsdl2-dev libsdl2-image-dev libopus-dev libcurl4-openssl-dev uuid-dev
libavcodec-dev libavutil-dev libexpat1-dev libmbedtls-dev libfontconfig1-dev gettext xvfb
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTARGET_DESKTOP=ON
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: xvfb-run ctest -C $BUILD_TYPE
build-webos:
name: Build (webOS)
runs-on: ubuntu-latest
steps:
- name: Set Short Commit ID
shell: bash
run: echo SHORT_SHA="${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Download ares-cli-rs
uses: robinraju/[email protected]
with:
repository: "webosbrew/ares-cli-rs"
latest: true
fileName: "ares-package_*.deb"
out-file-path: "temp"
- name: Download Homebrew Toolbox
uses: robinraju/[email protected]
with:
repository: "webosbrew/dev-toolbox-cli"
latest: true
fileName: "webosbrew-toolbox-*.deb"
out-file-path: "temp"
- name: Install Tools
run: sudo apt-get install ./temp/*.deb
- name: webOS Build
uses: ./.github/actions/build-webos
with:
build-type: ${{ env.BUILD_TYPE }}
- name: Add Commit Hash Suffix
shell: bash
working-directory: dist
run: for file in *.ipk ; do mv $file ${file//_arm/-${SHORT_SHA}_arm} ; done
- uses: actions/upload-artifact@v3
with:
name: webos-snapshot-${{ env.SHORT_SHA }}
path: dist/*.ipk
- name: Compatibility Check
run: webosbrew-ipk-verify -f markdown -d -o $GITHUB_STEP_SUMMARY dist/*.ipk
build-raspi:
name: Build (Raspberry Pi)
runs-on: ubuntu-20.04
steps:
- name: Set Short Commit ID
shell: bash
run: echo SHORT_SHA="${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Update Packages
shell: bash
run: sudo apt-get -yq update
- name: Prepare Sysroot
id: pi-sysroot
uses: mariotaku/raspbian-sysroot-action@main
with:
packages: ${{github.workspace}}/scripts/raspi/sysroot-packages.list
- name: Install Build Tools
shell: bash
run: sudo apt-get -y -qq install crossbuild-essential-armhf cmake gettext
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
env:
CMAKE_TOOLCHAIN_FILE: ${{steps.pi-sysroot.outputs.cmake-toolchain}}
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: |
cmake --build . --config $BUILD_TYPE
cpack
- uses: actions/upload-artifact@v3
with:
name: raspi-snapshot-${{ env.SHORT_SHA }}
path: build/*.deb
build-steamlink:
name: Build (Steam Link)
runs-on: ubuntu-22.04
steps:
- name: Set Short Commit ID
shell: bash
run: echo SHORT_SHA="${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Steam Link SDK
uses: ./.github/actions/steamlink-sdk
with:
path: .steamlink-sdk
- name: Install Build Tools
shell: bash
run: sudo apt-get -y -qq install cmake gettext
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: |
source ${{github.workspace}}/.steamlink-sdk/setenv.sh
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
env:
CMAKE_TOOLCHAIN_FILE: ${{github.workspace}}/.steamlink-sdk/toolchain/steamlink-toolchain.cmake
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: |
source ${{github.workspace}}/.steamlink-sdk/setenv.sh
cmake --build . --config $BUILD_TYPE
cpack
- name: Add Commit Hash Suffix
shell: bash
working-directory: dist
run: for file in moonlight-tv_*_steamlink.* ; do mv $file ${file//_steamlink/-${SHORT_SHA}_steamlink} ; done
- name: Copy Install Manual
run: cp docs/INSTALL.steamlink.md dist/
- uses: actions/upload-artifact@v3
with:
name: steamlink-snapshot-${{ env.SHORT_SHA }}
path: |
dist/moonlight-tv_*_steamlink.*
dist/INSTALL.steamlink.md