try to fix workflow luajit #1033
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: release | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
env: | |
luajit_ver: 2.1.0-beta3 | |
sdl_ver: 2.24.0 | |
emsdk_ver: 3.1.28 | |
jobs: | |
build: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Cache emsdk | |
id: cache-emsdk | |
uses: actions/cache@main | |
with: | |
path: emsdk | |
key: ${{ runner.os }}-${{ env.emsdk_ver }} | |
- name: Cache libs | |
id: cache-libs | |
uses: actions/cache@main | |
with: | |
path: | | |
external | |
key: ${{ runner.os }}-${{ env.luajit_ver }}-${{ env.sdl_ver }}-5 | |
- name: Install Packages | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y gcc-mingw-w64-i686 mingw-w64-i686-dev binutils-mingw-w64-i686 gcc-multilib wget libsdl2-dev libasound2-dev libsamplerate-dev | |
sudo apt-get install -y build-essential git curl | |
- if: ${{ steps.cache-emsdk.outputs.cache-hit != 'true' }} | |
name: emsdk | |
run: | | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk | |
./emsdk install ${{ env.emsdk_ver }} | |
./emsdk activate ${{ env.emsdk_ver }} | |
- name: build | |
run: | | |
./contrib/build-release.sh | |
- name: emscripten | |
run: | | |
curl -R -O https://www.lua.org/ftp/lua-5.4.6.tar.gz | |
tar zxf lua-5.4.6.tar.gz | |
mv -f lua-5.4.6/src src/lua | |
rm -f src/lua/luac.c src/lua/lua.c | |
. ./emsdk/emsdk_env.sh | |
./contrib/make-emscripten.sh | |
- name: Create Artifact | |
run: | | |
mkdir -p artifact/rein | |
cp -r release/* artifact/rein | |
mkdir -p ./artifact/rein/rein-em | |
cp rein.data rein.wasm rein.js ./artifact/rein/rein-em | |
cp contrib/rein.html ./artifact/rein/rein-em | |
- name: Publish Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rein | |
path: artifact | |
retention-days: 1 | |
- name: Create zip | |
run: | | |
ls -R artifact/rein | |
cd artifact | |
chmod +x rein/rein.x86-64.linux | |
zip -r ../rein.zip rein/ | |
- name: Create release and upload artifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
sudo apt-get install -y libfuse2 | |
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage | |
chmod +x pyuploadtool-x86_64.AppImage | |
./pyuploadtool-x86_64.AppImage rein.zip |