Skip to content

v0.732.14-pre3

v0.732.14-pre3 #86

Workflow file for this run

name: release
on:
# Only trigger on release creation
release:
types:
- created
jobs:
build:
strategy:
matrix:
# Use older Ubuntu for glibc compatibility
os: [{name: ubuntu, version: ubuntu-22.04}, {name: macos, version: macos-latest}, {name: windows, version: windows-latest}]
name: ${{matrix.os.name}}
runs-on: ${{matrix.os.version}}
steps:
- uses: actions/checkout@v3
- name: configure
run: cmake . -DCMAKE_BUILD_TYPE=Release
- name: build
run: cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI Luau.Ast.CLI Luau.Harness.CLI --config Release -j 2
- name: pack
if: matrix.os.name != 'windows'
run: zip slua-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip slua*
- name: pack
if: matrix.os.name == 'windows'
run: 7z a slua-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip .\Release\slua*.exe
- name: upload release asset
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "${{ github.event.release.tag_name }}" slua-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip
package:
strategy:
matrix:
# Use older Ubuntu for glibc compatibility reasons
os: [ubuntu-22.04]
addrsize: ["64", "32"]
# "optimized" builds with the stock SL release flags (NDEBUG intact, no
# asserts) for benchmarking; "default" keeps the local flag adjustments
# from build-cmd.sh
variant: [default, optimized]
name: ${{matrix.os}}-${{matrix.addrsize}}-${{matrix.variant}}
runs-on: ${{matrix.os}}
env:
SLUA_OPTIMIZED_BUILD: ${{ matrix.variant == 'optimized' && '1' || '' }}
container:
image: debian:buster
env:
DEBIAN_FRONTEND: noninteractive
continue-on-error: false
steps:
- name: install dependencies
run: |
# buster is out-of-support, point the apt lists at the archive
sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list
# First, enable multiarch in dpkg/apt land
dpkg --add-architecture i386
# Get both updated amd64 and 'new to us' i386 packages
apt-get update
# 64-bit tools. The debian:buster image has very, very old packages in it.
# The 'git' it includes does not support the recursive git submodule mode of
# the various checkout actions so update it to 2.18 or better.
apt-get install -y git jq python3-pip gettext bison mawk
# Multiarch tools and libraries. Get the compiler and library tooling needed
# for i386 and amd64 building.
apt-get install -y gcc-8-multilib gcc-8-base:amd64 gcc-8-base:i386 libgcc-8-dev:amd64 libgcc-8-dev:i386 libgcc1:amd64 libgcc1:i386
apt-get install -y libglib2.0-0:amd64 libglib2.0-0:i386 libglib2.0-bin libglib2.0-data libglib2.0-dev:amd64 libglib2.0-dev:i386 libglib2.0-dev-bin
apt-get install -y libstdc++-8-dev:amd64 libstdc++-8-dev:i386 libstdc++6:amd64 libstdc++6:i386 zlib1g:amd64 zlib1g:i386 zlib1g-dev:amd64 zlib1g-dev:i386
apt-get install -y build-essential libpthread-stubs0-dev clang-11
apt-get install -y gcc-multilib g++-multilib cmake
# Finally, autobuild
pip3 --no-cache-dir install pydot==1.4.2 pyzstd==0.15.10 autobuild
- name: configure tools
run: |
# Don't muck with line endings and make things dirty on checkout
git config --global core.autocrlf false
# There's gonna be a lot of legitimate dubious ownership
git config --global --add safe.directory '*'
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-11 100
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-11 100
- uses: actions/checkout@v3
- uses: secondlife/action-autobuild@v5
with:
addrsize: ${{ matrix.addrsize }}
token: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }}
setup-python: false
setup-autobuild: false
# Optimized variants need a predictable artifact name so the rename
# steps below can replace the artifact; the default (package basename)
# would also collide with the default variant's artifact
artifact-name: ${{ matrix.variant == 'optimized' && format('ServerLuaOptimized-{0}', matrix.addrsize) || '' }}
# Rename the optimized package so it doesn't collide with the default
# variant's release asset. The tarball contents are untouched, so the
# hashes recorded in autobuild-results.json remain valid.
- name: Rename optimized package
if: matrix.variant == 'optimized'
run: |
for f in ServerLua-*.tar.zst; do mv "$f" "ServerLuaOptimized${f#ServerLua}"; done
sed -i 's/ServerLua/ServerLuaOptimized/g' autobuild-results.json
- name: Replace artifact with renamed package
if: matrix.variant == 'optimized'
uses: actions/upload-artifact@v4
with:
name: ServerLuaOptimized-${{ matrix.addrsize }}
overwrite: true
path: |
ServerLuaOptimized-*.tar.zst
autobuild-results.json
autobuild-graph.mermaid
release:
name: "Upload autobuild packages to release"
needs: "package"
runs-on: "ubuntu-22.04"
steps:
- uses: secondlife/action-autobuild-release@v3
web:
needs: ["release"]
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
- name: upload release asset
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp Luau.Web.js SLua.Web.js
gh release upload "${{ github.event.release.tag_name }}" SLua.Web.js