2021-10-30 03:53:09 +08:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
2021-11-04 03:30:30 +08:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'papers/**'
|
|
|
|
- 'rfcs/**'
|
|
|
|
- '*.md'
|
2021-10-30 03:53:09 +08:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'papers/**'
|
|
|
|
- 'rfcs/**'
|
|
|
|
- '*.md'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
unix:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-01 21:18:27 +08:00
|
|
|
os: [{name: ubuntu, version: ubuntu-latest}, {name: macos, version: macos-latest}, {name: macos-arm, version: macos-14}]
|
2023-01-07 04:17:25 +08:00
|
|
|
name: ${{matrix.os.name}}
|
|
|
|
runs-on: ${{matrix.os.version}}
|
2021-10-30 03:53:09 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2024-03-16 00:32:27 +08:00
|
|
|
- name: work around ASLR+ASAN compatibility
|
|
|
|
run: sudo sysctl -w vm.mmap_rnd_bits=28
|
|
|
|
if: matrix.os.name == 'ubuntu'
|
2022-10-18 01:02:21 +08:00
|
|
|
- name: make tests
|
2021-10-30 03:53:09 +08:00
|
|
|
run: |
|
2022-10-18 01:02:21 +08:00
|
|
|
make -j2 config=sanitize werror=1 native=1 luau-tests
|
|
|
|
- name: run tests
|
2021-10-30 03:53:09 +08:00
|
|
|
run: |
|
2022-10-18 01:02:21 +08:00
|
|
|
./luau-tests
|
|
|
|
./luau-tests --fflags=true
|
|
|
|
- name: run extra conformance tests
|
|
|
|
run: |
|
|
|
|
./luau-tests -ts=Conformance -O2
|
|
|
|
./luau-tests -ts=Conformance -O2 --fflags=true
|
|
|
|
./luau-tests -ts=Conformance --codegen
|
|
|
|
./luau-tests -ts=Conformance --codegen --fflags=true
|
|
|
|
./luau-tests -ts=Conformance --codegen -O2
|
|
|
|
./luau-tests -ts=Conformance --codegen -O2 --fflags=true
|
2021-10-30 03:53:09 +08:00
|
|
|
- name: make cli
|
|
|
|
run: |
|
2023-06-12 23:46:44 +08:00
|
|
|
make -j2 config=sanitize werror=1 luau luau-analyze luau-compile # match config with tests to improve build time
|
2021-10-30 03:53:09 +08:00
|
|
|
./luau tests/conformance/assert.lua
|
|
|
|
./luau-analyze tests/conformance/assert.lua
|
2023-06-12 23:46:44 +08:00
|
|
|
./luau-compile tests/conformance/assert.lua
|
2021-10-30 03:53:09 +08:00
|
|
|
|
|
|
|
windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [Win32, x64]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: cmake configure
|
2022-10-18 01:02:21 +08:00
|
|
|
run: cmake . -A ${{matrix.arch}} -DLUAU_WERROR=ON -DLUAU_NATIVE=ON
|
|
|
|
- name: cmake build
|
|
|
|
run: cmake --build . --target Luau.UnitTest Luau.Conformance --config Debug
|
|
|
|
- name: run tests
|
2021-10-30 03:53:09 +08:00
|
|
|
shell: bash # necessary for fail-fast
|
|
|
|
run: |
|
|
|
|
Debug/Luau.UnitTest.exe
|
|
|
|
Debug/Luau.Conformance.exe
|
|
|
|
Debug/Luau.UnitTest.exe --fflags=true
|
|
|
|
Debug/Luau.Conformance.exe --fflags=true
|
2022-10-18 01:02:21 +08:00
|
|
|
- name: run extra conformance tests
|
|
|
|
shell: bash # necessary for fail-fast
|
|
|
|
run: |
|
|
|
|
Debug/Luau.Conformance.exe -O2
|
|
|
|
Debug/Luau.Conformance.exe -O2 --fflags=true
|
|
|
|
Debug/Luau.Conformance.exe --codegen
|
|
|
|
Debug/Luau.Conformance.exe --codegen --fflags=true
|
|
|
|
Debug/Luau.Conformance.exe --codegen -O2
|
|
|
|
Debug/Luau.Conformance.exe --codegen -O2 --fflags=true
|
2021-10-30 03:53:09 +08:00
|
|
|
- name: cmake cli
|
|
|
|
shell: bash # necessary for fail-fast
|
|
|
|
run: |
|
2023-06-12 23:46:44 +08:00
|
|
|
cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI --config Debug # match config with tests to improve build time
|
2021-10-30 03:53:09 +08:00
|
|
|
Debug/luau tests/conformance/assert.lua
|
|
|
|
Debug/luau-analyze tests/conformance/assert.lua
|
2023-06-12 23:46:44 +08:00
|
|
|
Debug/luau-compile tests/conformance/assert.lua
|
2021-10-30 03:53:09 +08:00
|
|
|
|
|
|
|
coverage:
|
2023-11-27 19:24:57 +08:00
|
|
|
runs-on: ubuntu-20.04 # needed for clang++-10 to avoid gcov compatibility issues
|
2021-10-30 03:53:09 +08:00
|
|
|
steps:
|
2021-12-10 09:50:29 +08:00
|
|
|
- uses: actions/checkout@v2
|
2021-10-30 03:53:09 +08:00
|
|
|
- name: install
|
|
|
|
run: |
|
|
|
|
sudo apt install llvm
|
|
|
|
- name: make coverage
|
|
|
|
run: |
|
2023-01-07 04:17:25 +08:00
|
|
|
CXX=clang++-10 make -j2 config=coverage native=1 coverage
|
2021-11-02 00:19:54 +08:00
|
|
|
- name: upload coverage
|
2022-07-21 06:12:30 +08:00
|
|
|
uses: codecov/codecov-action@v3
|
2021-10-30 03:53:09 +08:00
|
|
|
with:
|
2022-07-21 06:12:30 +08:00
|
|
|
files: ./coverage.info
|
2022-09-17 02:39:30 +08:00
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
2021-11-23 01:59:15 +08:00
|
|
|
|
|
|
|
web:
|
2023-11-27 19:24:57 +08:00
|
|
|
runs-on: ubuntu-latest
|
2021-11-23 01:59:15 +08:00
|
|
|
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
|