Skip to content

Commit

Permalink
enable mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-productengine committed Feb 9, 2024
1 parent 59b59fc commit 0dd2ba9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
os: [windows-2022]
os: [windows-2022, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: secondlife/action-autobuild@v3
Expand Down
19 changes: 19 additions & 0 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,25 @@
<key>name</key>
<string>windows</string>
</map>
<key>darwin</key>
<map>
<key>configurations</key>
<map>
<key>default</key>
<map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>default</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib</string>
</array>
<key>name</key>
<string>darwin</string>
</map>
</map>
<key>source_directory</key>
<string>lua</string>
Expand Down
31 changes: 22 additions & 9 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ source_environment_tempfile="$stage/source_environment.sh"
LUAU_VERSION="0.609"
build=${AUTOBUILD_BUILD_ID:=0}

mkdir -p "$stage/include/luau"
mkdir -p "$stage/lib/release"

pushd "$top/luau"
pushd "VM/include"
cp -v lua.h luaconf.h lualib.h "$stage/include/luau/"
popd
pushd "Compiler/include"
cp -v luacode.h "$stage/include/luau/"
popd

case "$AUTOBUILD_PLATFORM" in
windows*)
set -o igncr
Expand All @@ -43,23 +53,26 @@ pushd "$top/luau"
cmake --build . -- /p:Configuration=Release
cmake --build . --target Luau.Repl.CLI -- /p:Configuration=Release

mkdir -p "$stage/include/luau"
mkdir -p "$stage/lib/release"
mkdir -p "$stage/bin"
pushd "VM/include"
cp -v lua.h luaconf.h lualib.h "$stage/include/luau/"
popd
pushd "Compiler/include"
cp -v luacode.h "$stage/include/luau/"
popd
cp -v "Release/isocline.lib" "$stage/lib/release/"

cp -v "Release/Luau.Ast.lib" "$stage/lib/release/"
cp -v "Release/Luau.CodeGen.lib" "$stage/lib/release/"
cp -v "Release/Luau.Compiler.lib" "$stage/lib/release/"
cp -v "Release/Luau.Config.lib" "$stage/lib/release/"
cp -v "Release/Luau.VM.lib" "$stage/lib/release/"

cp -v Release/luau.exe "$stage/bin/"
;;
darwin*)
cmake . -DCMAKE_INSTALL_PREFIX:STRING="${stage}"
cmake --build . --target Luau.Repl.CLI

cp -v "libLuau.Ast.a" "$stage/lib/release"
cp -v "libLuau.CodeGen.a" "$stage/lib/release"
cp -v "libLuau.Compiler.a" "$stage/lib/release"
cp -v "libLuau.Config.a" "$stage/lib/release"
cp -v "libLuau.VM.a" "$stage/lib/release"
;;
esac
popd

Expand Down

0 comments on commit 0dd2ba9

Please sign in to comment.