luau/.github/workflows/build.yml
2021-11-08 19:40:26 +00:00

109 lines
No EOL
2.8 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: [ubuntu, macos]
name: ${{matrix.os}}
runs-on: ${{matrix.os}}-latest
steps:
- uses: actions/checkout@v1
- name: make test
run: |
make -j2 config=sanitize test
- name: make test w/flags
run: |
make -j2 config=sanitize flags=true test
- name: make cli
run: |
make -j2 config=sanitize luau luau-analyze # match config with tests to improve build time
./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
run: cmake . -A ${{matrix.arch}}
- 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:
- uses: actions/checkout@v1
- name: install
run: |
sudo apt install llvm
- name: make coverage
run: |
CXX=clang++-10 make -j2 config=coverage coverage
- name: upload coverage
uses: coverallsapp/github-action@master
with:
path-to-lcov: ./coverage.info
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: setup emsdk
uses: mymindstorm/setup-emsdk@v9
with:
version: 1.38.40
actions-cache-folder: 'emsdk-cache'
- name: verify emsdk
run: |
emcc -v # verify emscripten installed successfully
- name: cmake configure
run: |
emcmake cmake .
- name: build
run: |
cmake --build . --target Luau.Repl.CLI --config Debug # as seen above but only Repl.CLI.
- uses: actions/upload-artifact@v2
with:
name: luau-web-artifacts
path: docs/assets/luau/
if-no-files-found: error