Update build.yml #20
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
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml | |
name: build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: RelWithDebInfo | |
jobs: | |
web: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
target: x86_64-unknown-linux-gnu | |
- uses: Swatinem/rust-cache@v1 | |
- uses: actions/checkout@v4 | |
with: | |
repository: Rerumu/Wasynth | |
path: Wasynth | |
- name: Build Wasynth | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --target x86_64-unknown-linux-gnu --bin wasm2luau --release --manifest-path ./Wasynth/codegen/luau/Cargo.toml | |
- run: mv ./Wasynth/target/x86_64-unknown-linux-gnu/release/wasm2luau ./ | |
- uses: actions/checkout@v4 | |
with: | |
repository: emscripten-core/emsdk | |
path: emsdk | |
- name: emsdk install | |
run: | | |
cd emsdk | |
./emsdk install latest | |
./emsdk activate latest | |
# - name: Add Wasynth | |
# run: | | |
# curl -L -o ./wasm2luau https://github.com/Rerumu/Wasynth/releases/latest/download/wasm2luau | |
# chmod +x ./wasm2luau | |
# ls -la "./" | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: make | |
run: | | |
source emsdk/emsdk_env.sh | |
emcmake cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
cmake --build . --target Luau.LuauCeption.Compiler Luau.LuauCeption.VM Luau.LuauCeption.Full --config RelWithDebInfo -j 2 | |
ls -la "./" | |
- name: convert | |
run: | | |
./wasm2luau Luau.LuauCeption.Compiler.wasm > Luau.LuauCeption.Compiler.luau | |
./wasm2luau Luau.LuauCeption.VM.wasm > Luau.LuauCeption.VM.luau | |
./wasm2luau Luau.LuauCeption.Full.wasm > Luau.LuauCeption.Full.luau | |
- name: Upload files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Luau.LuauCeption | |
path: | | |
./Luau.LuauCeption.Compiler.luau | |
./Luau.LuauCeption.VM.luau | |
./Luau.LuauCeption.Full.luau | |
overwrite: true |