build: build/Rosetta.rbxm / .rbxmx, the native Roblox build: a Rosetta root ModuleScript (registry, _internal) and chunk ModuleScripts loaded on first include, each under the native codegen budget; build/Rosetta.luau is the no-native single file; Rojo mounts the rbxm; chunked test suite and lune / rojo check
This commit is contained in:
1 parent
9e7d159af8
commit
6baa698abe
12 files changed
+195815
-2596
No files matched your search
+11
-2
@@ -4,7 +4,9 @@
|
||||
# build/rosetta.lua), then run every tests/**/*.luau twice: under `luau --codegen -O2` (the source, through the
|
||||
# .luaurc aliases) and under `luajit` (build/_modules/luajit/tests/**/*.lua, with the compat prelude). The api test and
|
||||
# the docs / example tests run once more against the bundles (build/Rosetta.luau under luau, build/rosetta.lua under
|
||||
# LuaJIT; tools/bundle.py --stage-tests). Then the lint, and a check that the committed bundles are up to date.
|
||||
# LuaJIT; tools/bundle.py --stage-tests) and, under luau, against the chunked build (build/Rosetta.rbxm's ModuleScripts
|
||||
# as files, build/_modules/chunked). Then the lint, lune / rojo reading the rbxm (tools/bundle.py --check-rbxm), and a
|
||||
# check that the committed bundles are up to date.
|
||||
# A filter runs only the tests whose path contains it (and the fixture generators whose name contains it), and skips
|
||||
# the lint and the bundle check. RUNTIMES="luau" or "luajit" runs one runtime only.
|
||||
cd "$(dirname "$0")/.." || exit 1
|
||||
@@ -15,7 +17,7 @@ RUNTIMES=${RUNTIMES:-"luau luajit"}
|
||||
LJPATH='package.path = "build/_modules/luajit/?.lua;build/_modules/luajit/?/init.lua;" .. package.path'
|
||||
# the bundle first: rosetta and rosetta._compat come from build/rosetta.lua, tests.* from the module build
|
||||
LJBUNDLE='package.path = "build/?.lua;build/_modules/luajit/?.lua;build/_modules/luajit/?/init.lua;" .. package.path; require("rosetta")'
|
||||
BUNDLES="build/Rosetta.luau build/rosetta.lua build/Rosetta.luau.linemap.json build/rosetta.lua.linemap.json"
|
||||
BUNDLES="build/Rosetta.luau build/rosetta.lua build/Rosetta.luau.linemap.json build/rosetta.lua.linemap.json build/Rosetta.rbxm build/Rosetta.rbxmx build/Rosetta.rbxm.linemap.json"
|
||||
fail=0
|
||||
python3 -I tools/fixtures.py $1 || { echo "FAILED: fixtures"; exit 1; }
|
||||
python3 -I tools/gen_registry.py > /dev/null || { echo "FAILED: gen_registry"; exit 1; }
|
||||
@@ -48,8 +50,15 @@ for t in $(cd build/_modules/bundle_tests/luau && find . -name '*.luau' | sed 's
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [[ " $RUNTIMES " == *" luau "* ]]; then
|
||||
for t in $(cd build/_modules/bundle_tests/luau_chunked && find . -name '*.luau' | sed 's#^\./##' | sort); do
|
||||
[ -n "$1" ] && [[ "tests/$t" != *$1* ]] && continue
|
||||
run "tests/$t" "luau, build/Rosetta.rbxm" "$LUAU" --codegen -O2 "build/_modules/bundle_tests/luau_chunked/$t"
|
||||
done
|
||||
fi
|
||||
if [ -z "$1" ]; then
|
||||
bash tools/lint.sh || fail=1
|
||||
python3 -I tools/bundle.py --check-rbxm || { echo "FAILED: check-rbxm"; fail=1; }
|
||||
if [ -n "$(git status --porcelain -- $BUNDLES)" ]; then
|
||||
git status --short -- $BUNDLES
|
||||
echo "FAILED: the bundles in build/ differ from the committed ones (tools/build.py rewrote them): commit them"
|
||||
|
||||
Reference in new issue
Block a user