add HDR support #19
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: Lua | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up apt | |
run: > | |
sudo dpkg --add-architecture i386 && sudo apt-get update | |
&& sudo apt-get install gcc-mingw-w64 luajit libc6-dev-i386 libc6:i386 libstdc++6:i386 linux-libc-dev:i386 gcc-multilib | |
- name: Set up gluac | |
run: | | |
curl -L 'https://github.com/Metastruct/gtravis/releases/download/travisbins/gluac.tar.xz' |tar -xJf - | |
- name: Set up luajitw64 | |
run: | | |
curl -L 'https://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz' |tar -xzf - \ | |
&& pushd LuaJIT-2.1.0-beta3/src/ \ | |
&& make HOST_CC="gcc" CROSS=x86_64-w64-mingw32- TARGET_SYS=Windows BUILDMODE=static \ | |
&& popd | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Set up nvm npm + install deps | |
run: npm install | |
- name: Build | |
run: | | |
export LD_LIBRARY_PATH=`pwd`/gluac${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH:-} \ | |
&& export PATH=$PATH:`pwd`/gluac \ | |
&& ls *.lua | xargs -- gluac -p -- \ | |
&& CC=x86_64-w64-mingw32-gcc NM=x86_64-w64-mingw32-nm make luastaticlib=./LuaJIT-2.1.0-beta3/src/libluajit.a luaincludedir=./LuaJIT-2.1.0-beta3/src/ | |
- name: Upload | |
uses: actions/upload-artifact@v2 | |
with: | |
name: reslister | |
path: reslister.exe | |
- name: Create Draft Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: latest | |
release_name: reslister | |
draft: true | |
prerelease: false | |
- uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./reslister.exe | |
asset_name: reslister.exe | |
asset_content_type: application/vnd.microsoft.portable-executable | |
- uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ steps.create_release.outputs.id }} | |
overwrite: true |