Update windows.yml #127
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: Linux | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
OUTPUT_DIR: ${{github.workspace}}/output | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally | |
# well on Windows or Mac. You can convert this to a matrix build if you need | |
# cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: sudo apt-get install libc6-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libgl-dev libluajit-5.1-dev | |
- name: Create Output Directory | |
run: mkdir ${{env.OUTPUT_DIR}} | |
- name: Checkout Submodules | |
run: git submodule update --init --recursive | |
- name: Configure CMake | |
run: | | |
cmake -B ${{github.workspace}}/build \ | |
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${{env.OUTPUT_DIR}} \ | |
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${{env.OUTPUT_DIR}} \ | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target procyon-lua | |
- name: Cleanup | |
run: rm ${{env.OUTPUT_DIR}}/genhexer | |
- name: Strip Binaries | |
run: strip --strip-unneeded ${{env.OUTPUT_DIR}}/* | |
- name: Copy Misc. Files | |
run: | | |
mkdir ${{env.OUTPUT_DIR}}/script && \ | |
cp lua/sample/main.lua ${{env.OUTPUT_DIR}}/script/main.lua && \ | |
cp lua/sample/util.lua ${{env.OUTPUT_DIR}}/script/util.lua && \ | |
cp lua/sample/sprites.png ${{env.OUTPUT_DIR}}/sprites.png && \ | |
cp lua/sample/CREDIT ${{env.OUTPUT_DIR}}/CREDIT && \ | |
cp lua/README.md ${{env.OUTPUT_DIR}}/README.md && \ | |
cp -r include ${{env.OUTPUT_DIR}}/include | |
- name: Set-Executable | |
run: chmod +x ${{env.OUTPUT_DIR}}/procyon-lua | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: linux-${{env.BUILD_TYPE}} | |
path: ${{env.OUTPUT_DIR}} |