-
Notifications
You must be signed in to change notification settings - Fork 8
275 lines (254 loc) · 10.2 KB
/
Copy pathbuild.yml
File metadata and controls
275 lines (254 loc) · 10.2 KB
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
name: build
on:
push:
branches:
- 'main'
- 'develop'
paths-ignore:
- 'docs/**'
- 'papers/**'
- 'rfcs/**'
- '*.md'
- '*.bt'
pull_request:
paths-ignore:
- 'docs/**'
- 'papers/**'
- 'rfcs/**'
- '*.md'
- '*.bt'
jobs:
unix:
strategy:
matrix:
include:
- os: {name: macos, version: macos-15}
# MacOS runners really don't like the increased memory use associated with stack hardening tests
cflags: ""
addrsize: "64"
- os: {name: ubuntu, version: ubuntu-latest}
addrsize: "64"
cflags: "-DHARDSTACKTESTS=2"
- os: {name: ubuntu-32bit, version: ubuntu-latest}
addrsize: "32"
cflags: "-msse3 -mfpmath=sse -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
name: ${{matrix.os.name}}
runs-on: ${{matrix.os.version}}
steps:
- uses: actions/checkout@v1
- name: work around ASLR+ASAN compatibility
run: sudo sysctl -w vm.mmap_rnd_bits=28
if: matrix.os.name == 'ubuntu' || matrix.os.name == 'ubuntu-32bit'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel 'autobuild<4' setuptools_scm
- name: Autobuild install
env:
AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }}
run: |
autobuild install -A${{matrix.addrsize}}
- name: install 32-bit dependencies
if: matrix.os.name == 'ubuntu-32bit'
run: |
sudo apt-get update
sudo apt-get install g++-multilib
- name: make tests
run: |
LDFLAGS=-m${{matrix.addrsize}} CXXFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" CFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" make -j4 config=sanitize ${{ matrix.addrsize == '64' && 'native=1' || ''}} slua-tests
- name: run tests
env:
# 32-bit ASAN has a much more limited memory space. If the quarantine zone eats up tons of memory,
# we don't have much to work with for our actual tests. Reduce the quarantine zone size
# for 32-bit specifically.
ASAN_OPTIONS: ${{ matrix.os.name == 'ubuntu-32bit' && 'quarantine_size_mb=64' || '' }}
run: |
./slua-tests
./slua-tests --fflags=true
- name: run extra conformance tests
if: matrix.os.name != 'ubuntu-32bit'
run: |
./slua-tests -ts=Conformance -O2
./slua-tests -ts=Conformance -O2 --fflags=true
./slua-tests -ts=Conformance --codegen
./slua-tests -ts=Conformance --codegen --fflags=true
./slua-tests -ts=Conformance --codegen -O2
./slua-tests -ts=Conformance --codegen -O2 --fflags=true
- name: make cli
run: |
LDFLAGS=-m${{matrix.addrsize}} CXXFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" CFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" make -j4 config=sanitize ${{ matrix.addrsize == '64' && 'native=1' || ''}} werror=1 slua slua-analyze slua-compile # match config with tests to improve build time
./slua tests/conformance/assert.luau
./slua-analyze tests/conformance/assert.luau
./slua-compile tests/conformance/assert.luau
windows:
runs-on: windows-2022
strategy:
matrix:
arch: [x64]
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel 'autobuild<4' setuptools_scm
- name: Autobuild install
run: |
autobuild install -A64
- name: cmake configure
run: cmake . -A x64 -DLUAU_WERROR=OFF -DLUAU_NATIVE=ON -DLUAU_USE_TAILSLIDE=ON
- name: cmake build
run: cmake --build . --target Luau.UnitTest Luau.Conformance --config RelWithDebInfo
- name: run tests
shell: bash # necessary for fail-fast
run: |
RelWithDebInfo/Luau.UnitTest.exe
RelWithDebInfo/Luau.Conformance.exe
RelWithDebInfo/Luau.UnitTest.exe --fflags=true
RelWithDebInfo/Luau.Conformance.exe --fflags=true
- name: run extra conformance tests
shell: bash # necessary for fail-fast
run: |
RelWithDebInfo/Luau.Conformance.exe -O2
RelWithDebInfo/Luau.Conformance.exe -O2 --fflags=true
RelWithDebInfo/Luau.Conformance.exe --codegen
RelWithDebInfo/Luau.Conformance.exe --codegen --fflags=true
RelWithDebInfo/Luau.Conformance.exe --codegen -O2
RelWithDebInfo/Luau.Conformance.exe --codegen -O2 --fflags=true
- name: cmake cli
shell: bash # necessary for fail-fast
run: |
cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI --config RelWithDebInfo # match config with tests to improve build time
RelWithDebInfo/slua tests/conformance/assert.luau
RelWithDebInfo/slua-analyze tests/conformance/assert.luau
RelWithDebInfo/slua-compile tests/conformance/assert.luau
coverage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: install
run: |
sudo apt install llvm
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel 'autobuild<4' setuptools_scm
- name: Autobuild install
env:
AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }}
run: |
autobuild install -A64
- name: make coverage
run: |
CXX=clang++ make -j2 config=coverage native=1 coverage
# - name: upload coverage
# uses: codecov/codecov-action@v3
# with:
# files: ./coverage.info
# token: ${{ secrets.CODECOV_TOKEN }}
package_dryrun_32bit:
name: Package (32-bit)
runs-on: ubuntu-22.04
container:
image: debian:buster
env:
DEBIAN_FRONTEND: noninteractive
continue-on-error: false
steps:
- name: install dependencies
run: |
# buster is out-of-support, point the apt lists at the archive
sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list
# First, enable multiarch in dpkg/apt land
dpkg --add-architecture i386
# Get both updated amd64 and 'new to us' i386 packages
apt-get update
apt-get upgrade -y
# 64-bit tools. The debian:buster image has very, very old packages in it.
# The 'git' it includes does not support the recursive git submodule mode of
# the various checkout actions so update it to 2.18 or better.
apt-get install -y git jq python3-pip gettext bison mawk
# Multiarch tools and libraries. Get the compiler and library tooling needed
# for i386 and amd64 building.
apt-get install -y gcc-8-multilib gcc-8-base:amd64 gcc-8-base:i386 libgcc-8-dev:amd64 libgcc-8-dev:i386 libgcc1:amd64 libgcc1:i386
apt-get install -y libglib2.0-0:amd64 libglib2.0-0:i386 libglib2.0-bin libglib2.0-data libglib2.0-dev:amd64 libglib2.0-dev:i386 libglib2.0-dev-bin
apt-get install -y libstdc++-8-dev:amd64 libstdc++-8-dev:i386 libstdc++6:amd64 libstdc++6:i386 zlib1g:amd64 zlib1g:i386 zlib1g-dev:amd64 zlib1g-dev:i386
apt-get install -y build-essential libpthread-stubs0-dev clang-11
apt-get install -y gcc-multilib g++-multilib cmake
# Finally, autobuild
pip3 --no-cache-dir install pydot==1.4.2 pyzstd==0.15.10 autobuild
- name: configure tools
run: |
# Don't muck with line endings and make things dirty on checkout
git config --global core.autocrlf false
# There's gonna be a lot of legitimate dubious ownership
git config --global --add safe.directory '*'
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-11 100
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-11 100
- uses: actions/checkout@v3
- uses: secondlife/action-autobuild@v5
with:
addrsize: 32
token: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }}
setup-python: false
setup-autobuild: false
build-variables-ref: 'master'
# - name: upload coverage
# uses: codecov/codecov-action@v3
# with:
# files: ./coverage.info
# token: ${{ secrets.CODECOV_TOKEN }}
verify-builtins:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: secondlife/lsl-definitions
path: lsl-definitions
- name: Install dependencies
run: pip install pyyaml llsd
- name: Generate builtins.txt
run: |
cd lsl-definitions
python gen_definitions.py lsl_definitions.yaml gen_builtins_txt builtins.txt
- name: Verify builtins.txt matches
run: |
if ! diff -q builtins.txt lsl-definitions/builtins.txt; then
echo "ERROR: builtins.txt is out of sync with secondlife/lsl-definitions"
diff builtins.txt lsl-definitions/builtins.txt || true
echo ""
echo "To fix: clone secondlife/lsl-definitions and run:"
echo " python gen_definitions.py lsl_definitions.yaml gen_builtins_txt /path/to/slua/builtins.txt"
exit 1
fi
echo "builtins.txt is up to date"
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
repository: emscripten-core/emsdk
path: emsdk
- name: emsdk install
run: |
cd emsdk
./emsdk install latest
./emsdk activate latest
- name: make
run: |
source emsdk/emsdk_env.sh
emcmake cmake . -DLUAU_BUILD_WEB=ON -DCMAKE_BUILD_TYPE=Release
make -j2 Luau.Web
- name: smoke test
run: node CLI/test/Web.test.js ./Luau.Web.js