Bump luau from 8cc289f
to 8a4ef26
#31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Lua Distributions | |
on: | |
- push | |
- workflow_dispatch | |
permissions: | |
contents: read | |
jobs: | |
build-luau: | |
strategy: | |
matrix: # using ubuntu-20.04 to build a Linux binary targeting older glibc to improve compatibility | |
os: [{name: ubuntu, version: ubuntu-20.04}, {name: macos, version: macos-latest}, {name: windows, version: windows-latest}] | |
fail-fast: false | |
name: Build Luau (${{ matrix.os.name }}) | |
runs-on: ${{ matrix.os.version }} | |
defaults: | |
run: | |
working-directory: ./luau | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
sparse-checkout: luau | |
- name: Configure with CMake | |
run: | | |
cmake . -DCMAKE_BUILD_TYPE=Release | |
- name: Build with CMake | |
env: | |
# Create fat binary on macOS for compatibility with ARM64 and Intel | |
# (for compatibility with older macintosh devices) | |
CMAKE_OSX_ARCHITECTURES: ${{ matrix.os.name == 'macos' && 'x86_64;arm64' || '' }} | |
run: | | |
cmake --build . --target Luau.Repl.CLI --config Release -j 2 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: luau-${{ matrix.os.name }} | |
path: ${{ matrix.os.name == 'windows' && 'luau/Release/luau.exe' || 'luau/luau' }} | |
if-no-files-found: error | |
build-luajit: | |
strategy: | |
matrix: # using ubuntu-20.04 to build a Linux binary targeting older glibc to improve compatibility | |
os: [{name: ubuntu, version: ubuntu-20.04}, {name: macos, version: macos-latest}, {name: windows, version: windows-latest}] | |
fail-fast: false | |
name: Build LuaJIT (${{ matrix.os.name }}) | |
runs-on: ${{ matrix.os.version }} | |
defaults: | |
run: | |
working-directory: ./luajit/src | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
sparse-checkout: luajit | |
- name: Setup MSVC environment | |
if: matrix.os.name == 'windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Build with MSVC | |
if: matrix.os.name == 'windows' | |
run: | | |
.\msvcbuild.bat static | |
- name: Build for macOS | |
if: matrix.os.name == 'macos' | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.14 | |
BUILDMODE: static | |
run: | | |
# LuaJIT's makefile does not allow multiple architectures to be targetted per build, | |
# so we must do two seperate compiles and create universal binary with lipo. | |
make TARGET_FLAGS="-arch arm64" | |
mv luajit ../luajit-arm64 | |
make clean | |
make TARGET_FLAGS="-arch x86_64" | |
mv luajit ../luajit-x64 | |
lipo -create -output luajit ../luajit-arm64 ../luajit-x64 | |
- name: Build with GNU Make | |
if: matrix.os.name == 'ubuntu' | |
env: | |
BUILDMODE: static | |
run: | | |
make amalg | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: luajit-${{ matrix.os.name }} | |
path: ${{ matrix.os.name == 'windows' && 'luajit/src/luajit.exe' || 'luajit/src/luajit' }} | |
if-no-files-found: error | |
build-lua: | |
strategy: | |
matrix: # using ubuntu-20.04 to build a Linux binary targeting older glibc to improve compatibility | |
os: [{name: ubuntu, version: ubuntu-20.04}, {name: macos, version: macos-latest}, {name: windows, version: windows-latest}] | |
lua: [{name: '5.1', directory: lua51}, {name: '5.2', directory: lua52}, {name: '5.3', directory: lua53}, {name: '5.4', directory: lua54}] | |
fail-fast: false | |
name: Build Lua ${{ matrix.lua.name }} (${{ matrix.os.name }}) | |
runs-on: ${{ matrix.os.version }} | |
defaults: | |
run: | |
working-directory: ./${{ matrix.lua.directory }}/src | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
sparse-checkout: ${{ matrix.lua.directory }} | |
- name: Setup MSVC environment | |
if: matrix.os.name == 'windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Build for Windows | |
if: matrix.os.name == 'windows' | |
run: | | |
..\..\CompileLua.bat | |
- name: Build for macOS | |
if: matrix.os.name == 'macos' | |
run: | | |
# `make macosx` doesn't allow us to change MYCFLAGS/MYLDFLAGS | |
make all MYCFLAGS="-DLUA_USE_LINUX -arch arm64 -arch x86_64" MYLIBS="-lreadline" MYLDFLAGS="-arch arm64 -arch x86_64" | |
- name: Build for Linux | |
if: matrix.os.name == 'ubuntu' | |
run: | | |
make linux | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.lua.directory }}-${{matrix.os.name}} | |
path: ${{ format(matrix.os.name == 'windows' && '{0}/src/lua.exe' || '{0}/src/lua', matrix.lua.directory) }} | |
if-no-files-found: error | |
merge-and-release: | |
name: Merge artifacts and Release | |
runs-on: ubuntu-latest | |
needs: [build-lua, build-luajit, build-luau] | |
permissions: | |
contents: write | |
steps: | |
- name: Merge artifacts | |
uses: actions/upload-artifact/merge@v4 | |
with: | |
name: crosslua-build | |
pattern: 'lua*' | |
separate-directories: true | |
delete-merged: true | |
compression-level: 9 | |
- name: Download merged artifact | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
uses: actions/download-artifact@v4 | |
with: | |
name: crosslua-build | |
path: crosslua-build | |
- name: Generate .zip file with archives | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: zip -r -9 crosslua-build.zip crosslua-build/* | |
- name: Create release | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: CrossLua ${{ github.event.started_at }} | |
body: This release was automatically generated by a build script. | |
fail_on_unmatched_files: true | |
prerelease: false | |
draft: false | |
make_latest: true | |