2021-10-29 20:53:09 +01:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
2021-11-03 19:30:30 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'papers/**'
|
|
|
|
- 'rfcs/**'
|
|
|
|
- '*.md'
|
2022-02-15 22:24:51 +00:00
|
|
|
- 'prototyping/**'
|
2021-10-29 20:53:09 +01:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'papers/**'
|
|
|
|
- 'rfcs/**'
|
|
|
|
- '*.md'
|
2022-02-15 22:24:51 +00:00
|
|
|
- 'prototyping/**'
|
2021-10-29 20:53:09 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
unix:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu, macos]
|
|
|
|
name: ${{matrix.os}}
|
|
|
|
runs-on: ${{matrix.os}}-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: make test
|
|
|
|
run: |
|
2021-11-12 14:56:25 +00:00
|
|
|
make -j2 config=sanitize werror=1 test
|
2021-10-29 20:53:09 +01:00
|
|
|
- name: make test w/flags
|
|
|
|
run: |
|
2021-11-12 14:56:25 +00:00
|
|
|
make -j2 config=sanitize werror=1 flags=true test
|
2021-10-29 20:53:09 +01:00
|
|
|
- name: make cli
|
|
|
|
run: |
|
2021-11-12 14:56:25 +00:00
|
|
|
make -j2 config=sanitize werror=1 luau luau-analyze # match config with tests to improve build time
|
2021-10-29 20:53:09 +01:00
|
|
|
./luau tests/conformance/assert.lua
|
|
|
|
./luau-analyze tests/conformance/assert.lua
|
|
|
|
|
|
|
|
windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [Win32, x64]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: cmake configure
|
2021-11-12 14:56:25 +00:00
|
|
|
run: cmake . -A ${{matrix.arch}} -DLUAU_WERROR=ON
|
2021-10-29 20:53:09 +01:00
|
|
|
- name: cmake test
|
|
|
|
shell: bash # necessary for fail-fast
|
|
|
|
run: |
|
|
|
|
cmake --build . --target Luau.UnitTest Luau.Conformance --config Debug
|
|
|
|
Debug/Luau.UnitTest.exe
|
|
|
|
Debug/Luau.Conformance.exe
|
|
|
|
- name: cmake test w/flags
|
|
|
|
shell: bash # necessary for fail-fast
|
|
|
|
run: |
|
|
|
|
Debug/Luau.UnitTest.exe --fflags=true
|
|
|
|
Debug/Luau.Conformance.exe --fflags=true
|
|
|
|
- name: cmake cli
|
|
|
|
shell: bash # necessary for fail-fast
|
|
|
|
run: |
|
|
|
|
cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config Debug # match config with tests to improve build time
|
|
|
|
Debug/luau tests/conformance/assert.lua
|
|
|
|
Debug/luau-analyze tests/conformance/assert.lua
|
|
|
|
|
|
|
|
coverage:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-10 01:50:29 +00:00
|
|
|
- uses: actions/checkout@v2
|
2021-10-29 20:53:09 +01:00
|
|
|
- name: install
|
|
|
|
run: |
|
|
|
|
sudo apt install llvm
|
|
|
|
- name: make coverage
|
|
|
|
run: |
|
|
|
|
CXX=clang++-10 make -j2 config=coverage coverage
|
2021-12-10 01:50:29 +00:00
|
|
|
- name: debug coverage
|
|
|
|
run: |
|
|
|
|
git status
|
|
|
|
git log -5
|
|
|
|
echo SHA: $GITHUB_SHA
|
2021-11-01 16:19:54 +00:00
|
|
|
- name: upload coverage
|
|
|
|
uses: coverallsapp/github-action@master
|
|
|
|
with:
|
|
|
|
path-to-lcov: ./coverage.info
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-10-29 20:53:09 +01:00
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: coverage
|
|
|
|
path: coverage
|
2021-11-22 17:59:15 +00:00
|
|
|
|
|
|
|
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
|