mirror of
https://github.com/luau-lang/luau.git
synced 2025-03-04 11:11:41 +00:00

Ubuntu 20.04 LTS is reaching the end of its standard support period. GitHub runners are going to stop providing images for it soon. This PR updates all workflows to use 22.04 instead of 20.04. While this will impact the compatibility of prebuilt release binaries on 20.04, users of those systems can always build Luau from source. `coverage` workflow is also updating from clang++10 to clang++ (defaults to clang++14 today). Line coverage with this switch drops from 89.65% to 87.45%, function coverage remains 91.26%. As a bonus, we now get branch coverage information.
121 lines
3.7 KiB
YAML
121 lines
3.7 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'papers/**'
|
|
- 'rfcs/**'
|
|
- '*.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'papers/**'
|
|
- 'rfcs/**'
|
|
- '*.md'
|
|
|
|
jobs:
|
|
unix:
|
|
strategy:
|
|
matrix:
|
|
os: [{name: ubuntu, version: ubuntu-latest}, {name: macos, version: macos-latest}, {name: macos-arm, version: macos-14}]
|
|
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'
|
|
- name: make tests
|
|
run: |
|
|
make -j2 config=sanitize werror=1 native=1 luau-tests
|
|
- name: run tests
|
|
run: |
|
|
./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
|
|
- name: make cli
|
|
run: |
|
|
make -j2 config=sanitize werror=1 luau luau-analyze luau-compile # match config with tests to improve build time
|
|
./luau tests/conformance/assert.lua
|
|
./luau-analyze tests/conformance/assert.lua
|
|
./luau-compile tests/conformance/assert.lua
|
|
|
|
windows:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [Win32, x64]
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: cmake configure
|
|
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
|
|
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
|
|
- 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
|
|
- name: cmake cli
|
|
shell: bash # necessary for fail-fast
|
|
run: |
|
|
cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI --config Debug # match config with tests to improve build time
|
|
Debug/luau tests/conformance/assert.lua
|
|
Debug/luau-analyze tests/conformance/assert.lua
|
|
Debug/luau-compile tests/conformance/assert.lua
|
|
|
|
coverage:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: install
|
|
run: |
|
|
sudo apt install llvm
|
|
- 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 }}
|
|
|
|
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
|