forked from terralang/terra
-
Notifications
You must be signed in to change notification settings - Fork 2
254 lines (244 loc) · 7.01 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
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
name: CI
on:
push:
pull_request:
schedule:
- cron: '5 4 * * 2' # once a week on Tuesday
jobs:
check_format:
name: Check Format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- run: ./travis.sh
env:
CHECK_CLANG_FORMAT: 1
build:
name: Build (${{ matrix.os }}, llvm-${{ matrix.llvm }}, cuda=${{ matrix.cuda }}, ${{ matrix.lua }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['macos-12', 'windows-2022']
llvm: ['11', '12', '13', '14', '15', '16', '17']
cuda: ['0', '1']
lua: ['luajit', 'moonjit']
exclude:
# macOS: exclude cuda
- os: 'macos-12'
cuda: '1'
# Windows: exclude LLVM 12-17
- os: 'windows-2022'
llvm: '12'
- os: 'windows-2022'
llvm: '13'
- os: 'windows-2022'
llvm: '14'
- os: 'windows-2022'
llvm: '15'
- os: 'windows-2022'
llvm: '16'
- os: 'windows-2022'
llvm: '17'
# CUDA: only LLVM 11
- llvm: '12'
cuda: '1'
- llvm: '13'
cuda: '1'
- llvm: '14'
cuda: '1'
- llvm: '15'
cuda: '1'
- llvm: '16'
cuda: '1'
- llvm: '17'
cuda: '1'
# Moonjit: only LLVM 12
- llvm: '11'
lua: 'moonjit'
- llvm: '13'
lua: 'moonjit'
- llvm: '14'
lua: 'moonjit'
- llvm: '15'
lua: 'moonjit'
- llvm: '16'
lua: 'moonjit'
- llvm: '17'
lua: 'moonjit'
steps:
- uses: actions/checkout@v1
- run: ./travis.sh
shell: bash
env:
LLVM_VERSION: ${{ matrix.llvm }}
USE_CUDA: ${{ matrix.cuda }}
STATIC_LLVM: 1
STATIC_LUAJIT: 1
SLIB_INCLUDE_LLVM: 1
SLIB_INCLUDE_LUAJIT: 1
TERRA_LUA: ${{ matrix.lua }}
- uses: actions/upload-artifact@v2
with:
name: terra-${{ matrix.os }}-x86_64-llvm-${{ matrix.llvm }}
path: |
terra-*.tar.xz
terra-*.7z
docker:
name: Docker (${{ matrix.distro }}, llvm-${{ matrix.llvm }}, ${{ matrix.lua }}, static=${{ matrix.static }}, slib=${{ matrix.slib }}, cuda=${{ matrix.cuda }}, ${{ matrix.variant }})
runs-on: ubuntu-latest
strategy:
matrix:
distro: ['ubuntu-18.04']
llvm: ['11', '12.0.1', '13.0.1', '14.0.6', '15.0.2', '16.0.3', '17.0.5']
lua: ['luajit', 'moonjit']
cuda: ['0', '1']
test: ['1']
exclude:
# CUDA with LLVM 13 only:
- llvm: '11'
cuda: '1'
- llvm: '12.0.1'
cuda: '1'
- llvm: '14.0.6'
cuda: '1'
- llvm: '15.0.2'
cuda: '1'
- llvm: '16.0.3'
cuda: '1'
- llvm: '17.0.5'
cuda: '1'
# Moonjit with LLVM 14 only:
- llvm: '11'
lua: 'moonjit'
- llvm: '12.0.1'
lua: 'moonjit'
- llvm: '13.0.1'
lua: 'moonjit'
- llvm: '15.0.2'
lua: 'moonjit'
- llvm: '16.0.3'
lua: 'moonjit'
- llvm: '17.0.5'
lua: 'moonjit'
include:
# Defaults:
- slib: '1'
- static: '1'
# Assign variants to the basic configurations:
- variant: 'prebuilt'
- llvm: '11'
variant: 'upstream'
# Some additional configurations:
# LLVM 12, 13, 14 on Ubuntu 22.04
- distro: 'ubuntu-22.04'
llvm: '12'
lua: 'luajit'
cuda: '0'
variant: 'package'
slib: '1'
static: '1'
test: '1'
- distro: 'ubuntu-22.04'
llvm: '13'
lua: 'luajit'
cuda: '0'
variant: 'package'
slib: '1'
static: '1'
test: '1'
- distro: 'ubuntu-22.04'
llvm: '14'
lua: 'luajit'
cuda: '0'
variant: 'package'
slib: '1'
static: '1'
test: '1'
# LLVM 14, no-slib/no-static, Ubuntu 22.04
- distro: 'ubuntu-22.04'
llvm: '14'
lua: 'luajit'
cuda: '0'
variant: 'package'
slib: '0'
static: '1'
test: '1'
# - distro: 'ubuntu-22.04'
# llvm: '14'
# lua: 'luajit'
# cuda: '0'
# variant: 'package'
# slib: '0'
# static: '0'
# test: '1'
steps:
- uses: actions/checkout@v1
- run: ./travis.sh
env:
DOCKER_DISTRO: ${{ matrix.distro }}
DOCKER_LLVM: ${{ matrix.llvm }}
DOCKER_LUA: ${{ matrix.lua }}
DOCKER_STATIC: ${{ matrix.static }}
DOCKER_SLIB: ${{ matrix.slib }}
DOCKER_CUDA: ${{ matrix.cuda }}
DOCKER_VARIANT: ${{ matrix.variant }}
DOCKER_TEST: ${{ matrix.test }}
multiarch:
name: Multiarch (${{ matrix.distro }}, ${{ matrix.arch }}, llvm-${{ matrix.llvm }}, cuda=${{ matrix.cuda }}, ${{ matrix.variant }})
runs-on: ubuntu-latest
strategy:
matrix:
distro: ['ubuntu-18.04']
arch: ['arm64', 'ppc64le']
llvm: ['11.1.0', '13.0.0']
variant: ['prebuilt']
cuda: ['0']
test: ['0']
exclude:
- arch: 'arm64'
llvm: '13.0.0'
- arch: 'ppc64le'
llvm: '11.1.0'
steps:
- uses: actions/checkout@v1
- run: ./travis.sh
env:
DOCKER_DISTRO: ${{ matrix.distro }}
DOCKER_ARCH: ${{ matrix.arch }}
DOCKER_LLVM: ${{ matrix.llvm }}
DOCKER_CUDA: ${{ matrix.cuda }}
DOCKER_VARIANT: ${{ matrix.variant }}
DOCKER_TEST: ${{ matrix.test }}
- uses: actions/upload-artifact@v2
with:
name: docker-${{ matrix.distro }}-${{ matrix.arch }}-llvm-${{ matrix.llvm }}
path: |
terra-*.tar.xz
terra-*.7z
compat:
name: Compatibility Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: ./docker/compatibility_test.sh ubuntu 18.04 "18.04 20.04 22.04" "" 13.0.1 luajit prebuilt 2
- uses: actions/upload-artifact@v2
with:
name: docker-ubuntu-18.04-x86_64-llvm-13
path: |
terra-*.tar.xz
terra-*.7z
nix:
name: Nix Build (nixpkgs-${{ matrix.nixpkgs }}, enableCUDA=${{ matrix.cuda }})
runs-on: ubuntu-latest
strategy:
matrix:
nixpkgs: ['unstable', '24.05']
cuda: ['false', 'true']
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v13
with:
nix_path: nixpkgs=channel:nixos-${{ matrix.nixpkgs }}
- run: nix-build --arg enableCUDA ${{ matrix.cuda }}
env:
NIXPKGS_ALLOW_UNFREE: 1