-
Notifications
You must be signed in to change notification settings - Fork 307
189 lines (169 loc) · 5.38 KB
/
00_build.yaml
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
name: Build LMS
# Test using act: act -W .github/workflows/00_build.yaml --pull=false
on:
workflow_dispatch:
inputs:
branch:
type: string
description: 'The branch from which to build from'
required: true
# TODO - make this dynamic
default: public/9.0
build_type:
type: choice
description: 'Is this a nightly or a release build?'
required: true
default: 'nightly'
options:
- nightly
- release
jobs:
macLegacy:
name: Build LMS for Mac (Legacy)
runs-on: self-hosted
timeout-minutes: 20
env:
BASEDIR: gh-build
steps:
# we must check out here, as otherwise the build action is not available
- name: Check out LMS code
uses: actions/checkout@v4
with:
path: server
ref: ${{ inputs.branch }}
- name: Launch build process
uses: ./server/.github/actions/build
with:
build-params: macosx
build-type: ${{ inputs.build_type }}
ssh-connect-string: ${{ secrets.MAC_CONNECT_STRING }}
AWS_KEY_ID: ${{ secrets.R2_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
mac:
name: Build LMS for Mac (MenuBar Item)
runs-on: macos-12
steps:
# we must check out here, as otherwise the build action is not available
- name: Check out LMS code
uses: actions/checkout@v4
with:
path: server
ref: ${{ inputs.branch }}
- name: Launch build process
uses: ./server/.github/actions/build
with:
build-params: macos
build-type: ${{ inputs.build_type }}
AWS_KEY_ID: ${{ secrets.R2_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
linux:
name: Build LMS for Linux
runs-on: ubuntu-22.04
strategy:
matrix:
flavour:
- [debian, "--x86_64"]
- [debian, "--arm"]
- [debian, "--i386"]
- [debian, ""]
- [rpm, ""]
- [tarball, "--arm"]
- [tarball, ""]
- [tarball, "--encore"]
- [tarball, "--noCPAN"]
steps:
# we must check out here, as otherwise the build action is not available
- name: Check out LMS code
uses: actions/checkout@v4
with:
path: server
ref: ${{ inputs.branch }}
- name: Prepare build environment
if: ${{ matrix.flavour[0] != 'tarball' }}
run: |
sudo apt update
sudo apt install apt-transport-https debhelper devscripts
- name: Launch build process
uses: ./server/.github/actions/build
with:
build-params: ${{ matrix.flavour[0] }} ${{ matrix.flavour[1] }}
build-type: ${{ inputs.build_type }}
AWS_KEY_ID: ${{ secrets.R2_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
docker:
name: Build LMS for Docker
runs-on: ubuntu-22.04
steps:
# we must check out here, as otherwise the build action is not available
- name: Check out LMS code
uses: actions/checkout@v4
with:
path: server
ref: ${{ inputs.branch }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Launch build process
uses: ./server/.github/actions/build
with:
build-params: docker
build-type: ${{ inputs.build_type }}
win64:
name: Build LMS for Windows (64-bit)
runs-on: windows-2022
steps:
# we must check out here, as otherwise the build action is not available
- name: Check out LMS code
uses: actions/checkout@v4
with:
path: server
ref: ${{ inputs.branch }}
- name: Launch build process
uses: ./server/.github/actions/build
with:
build-params: win64
build-type: ${{ inputs.build_type }}
AWS_KEY_ID: ${{ secrets.R2_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
win32:
name: Build LMS for Windows (Legacy 32-bit)
runs-on: self-hosted
timeout-minutes: 30
env:
BASEDIR: gh-build
steps:
# we must check out here, as otherwise the build action is not available
- name: Check out LMS code
uses: actions/checkout@v4
with:
path: server
ref: ${{ inputs.branch }}
- name: Launch build process
uses: ./server/.github/actions/build
with:
build-params: win32
build-type: ${{ inputs.build_type }}
ssh-connect-string: ${{ secrets.WIN_CONNECT_STRING }}
AWS_KEY_ID: ${{ secrets.R2_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
updateRepoFile:
name: Trigger repository file update
if: ${{ success() && inputs.build_type == 'nightly' }}
runs-on: ubuntu-latest
timeout-minutes: 2
needs:
- macLegacy
- mac
- linux
- win64
- win32
permissions:
actions: write
steps:
- env:
GH_TOKEN: ${{ secrets.DEPLOYMENT_KEY }}
run: gh workflow run update-server-repository.yml -R https://github.com/LMS-Community/lms-server-repository