Build and use luau-compile in CI (#952)

This commit is contained in:
Arseny Kapoulkine 2023-06-12 08:46:44 -07:00 committed by GitHub
parent 3ecd3a82ab
commit ba65b0e9cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 15 deletions

View File

@ -41,7 +41,7 @@ jobs:
- name: Build Luau (clang) - name: Build Luau (clang)
run: | run: |
make config=profile clean make config=profile clean
CXX=clang++ make config=profile luau luau-analyze CXX=clang++ make config=profile luau luau-analyze luau-compile
- name: Run benchmark (bench-gcc) - name: Run benchmark (bench-gcc)
run: | run: |
@ -70,16 +70,16 @@ jobs:
- name: Run benchmark (compile) - name: Run benchmark (compile)
run: | run: |
filter() { filter() {
awk '/.*I\s+refs:\s+[0-9,]+/ {gsub(",", "", $4); X=$4} END {print "SUCCESS: '$1' : " X/1e7 "ms +/- 0% on luau --compile"}' awk '/.*I\s+refs:\s+[0-9,]+/ {gsub(",", "", $4); X=$4} END {print "SUCCESS: '$1' : " X/1e7 "ms +/- 0% on luau-compile"}'
} }
valgrind --tool=callgrind ./luau --compile=null -O0 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O0 | tee -a compile-output.txt valgrind --tool=callgrind ./luau-compile --null -O0 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O0 | tee -a compile-output.txt
valgrind --tool=callgrind ./luau --compile=null -O1 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O1 | tee -a compile-output.txt valgrind --tool=callgrind ./luau-compile --null -O1 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O1 | tee -a compile-output.txt
valgrind --tool=callgrind ./luau --compile=null -O2 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O2 | tee -a compile-output.txt valgrind --tool=callgrind ./luau-compile --null -O2 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O2 | tee -a compile-output.txt
valgrind --tool=callgrind ./luau --compile=codegennull -O2 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O2-codegen | tee -a compile-output.txt valgrind --tool=callgrind ./luau-compile --codegennull -O2 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O2-codegen | tee -a compile-output.txt
valgrind --tool=callgrind ./luau --compile=null -O0 bench/other/regex.lua 2>&1 | filter regex-O0 | tee -a compile-output.txt valgrind --tool=callgrind ./luau-compile --null -O0 bench/other/regex.lua 2>&1 | filter regex-O0 | tee -a compile-output.txt
valgrind --tool=callgrind ./luau --compile=null -O1 bench/other/regex.lua 2>&1 | filter regex-O1 | tee -a compile-output.txt valgrind --tool=callgrind ./luau-compile --null -O1 bench/other/regex.lua 2>&1 | filter regex-O1 | tee -a compile-output.txt
valgrind --tool=callgrind ./luau --compile=null -O2 bench/other/regex.lua 2>&1 | filter regex-O2 | tee -a compile-output.txt valgrind --tool=callgrind ./luau-compile --null -O2 bench/other/regex.lua 2>&1 | filter regex-O2 | tee -a compile-output.txt
valgrind --tool=callgrind ./luau --compile=codegennull -O2 bench/other/regex.lua 2>&1 | filter regex-O2-codegen | tee -a compile-output.txt valgrind --tool=callgrind ./luau-compile --codegennull -O2 bench/other/regex.lua 2>&1 | filter regex-O2-codegen | tee -a compile-output.txt
- name: Checkout benchmark results - name: Checkout benchmark results
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -124,7 +124,7 @@ jobs:
- name: Store results (compile) - name: Store results (compile)
uses: Roblox/rhysd-github-action-benchmark@v-luau uses: Roblox/rhysd-github-action-benchmark@v-luau
with: with:
name: luau --compile name: luau-compile
tool: "benchmarkluau" tool: "benchmarkluau"
output-file-path: ./compile-output.txt output-file-path: ./compile-output.txt
external-data-json-path: ./gh-pages/compile.json external-data-json-path: ./gh-pages/compile.json

View File

@ -42,9 +42,10 @@ jobs:
./luau-tests -ts=Conformance --codegen -O2 --fflags=true ./luau-tests -ts=Conformance --codegen -O2 --fflags=true
- name: make cli - name: make cli
run: | run: |
make -j2 config=sanitize werror=1 luau luau-analyze # match config with tests to improve build time 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 tests/conformance/assert.lua
./luau-analyze tests/conformance/assert.lua ./luau-analyze tests/conformance/assert.lua
./luau-compile tests/conformance/assert.lua
windows: windows:
runs-on: windows-latest runs-on: windows-latest
@ -76,9 +77,10 @@ jobs:
- name: cmake cli - name: cmake cli
shell: bash # necessary for fail-fast shell: bash # necessary for fail-fast
run: | run: |
cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config Debug # match config with tests to improve build time 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 tests/conformance/assert.lua
Debug/luau-analyze tests/conformance/assert.lua Debug/luau-analyze tests/conformance/assert.lua
Debug/luau-compile tests/conformance/assert.lua
coverage: coverage:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04

View File

@ -38,7 +38,7 @@ jobs:
- name: configure - name: configure
run: cmake . -DCMAKE_BUILD_TYPE=Release run: cmake . -DCMAKE_BUILD_TYPE=Release
- name: build - name: build
run: cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config Release -j 2 run: cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI --config Release -j 2
- name: pack - name: pack
if: matrix.os.name != 'windows' if: matrix.os.name != 'windows'
run: zip luau-${{matrix.os.name}}.zip luau* run: zip luau-${{matrix.os.name}}.zip luau*

View File

@ -22,7 +22,7 @@ jobs:
- name: configure - name: configure
run: cmake . -DCMAKE_BUILD_TYPE=Release run: cmake . -DCMAKE_BUILD_TYPE=Release
- name: build - name: build
run: cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config Release -j 2 run: cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI --config Release -j 2
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
if: matrix.os.name != 'windows' if: matrix.os.name != 'windows'
with: with: