mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 22:35:43 +08:00
c8d6dc2758
Changed the GHA workflows to: - Not run `build` and `release` workflows for PRs that only affect `prototyping/` - Run `prototyping` workflow when PRs affect `Analysis/**`, `Ast/**`, or the `luau-ast` source files
112 lines
2.9 KiB
YAML
112 lines
2.9 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'papers/**'
|
|
- 'rfcs/**'
|
|
- '*.md'
|
|
- 'prototyping/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'papers/**'
|
|
- 'rfcs/**'
|
|
- '*.md'
|
|
- 'prototyping/**'
|
|
|
|
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 werror=1 test
|
|
- name: make test w/flags
|
|
run: |
|
|
make -j2 config=sanitize werror=1 flags=true test
|
|
- name: make cli
|
|
run: |
|
|
make -j2 config=sanitize werror=1 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}} -DLUAU_WERROR=ON
|
|
- 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@v2
|
|
- name: install
|
|
run: |
|
|
sudo apt install llvm
|
|
- name: make coverage
|
|
run: |
|
|
CXX=clang++-10 make -j2 config=coverage coverage
|
|
- name: debug coverage
|
|
run: |
|
|
git status
|
|
git log -5
|
|
echo SHA: $GITHUB_SHA
|
|
- 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
|
|
- 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
|