2022-07-30 12:24:03 -04:00
|
|
|
name: Build Binaries
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
2022-10-23 07:56:16 -04:00
|
|
|
branches:
|
2022-07-30 12:24:03 -04:00
|
|
|
- '**' # every branch
|
|
|
|
- '!no-build-**' # unless marked as no-build
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- name: "Windows"
|
2022-10-23 07:56:16 -04:00
|
|
|
os_identifier: "win"
|
2022-07-30 12:24:03 -04:00
|
|
|
os: windows-2019
|
|
|
|
prefixes: ''
|
2022-11-16 09:41:14 -05:00
|
|
|
extra_flags: '-G "Visual Studio 16 2019" -T host=x86 -A win32 -DGEODE_DEBUG=On'
|
2022-10-12 21:57:07 -04:00
|
|
|
out_paths: './bin/nightly/Geode.dll ./bin/nightly/GeodeBootstrapper.dll ./bin/nightly/Geode.lib ./bin/nightly/XInput9_1_0.dll'
|
2022-10-14 14:22:51 -04:00
|
|
|
cli_cmd: ''
|
|
|
|
|
2022-07-30 12:24:03 -04:00
|
|
|
- name: "macOS"
|
2022-10-23 07:56:16 -04:00
|
|
|
os_identifier: "mac"
|
2022-07-30 12:24:03 -04:00
|
|
|
os: macos-latest
|
|
|
|
prefixes: 'PATH="/usr/local/opt/ccache/libexec:$PATH"'
|
2022-11-16 09:41:14 -05:00
|
|
|
extra_flags: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DGEODE_DEBUG=On"
|
2022-10-23 08:23:55 -04:00
|
|
|
out_paths: './bin/nightly/Geode.dylib ./bin/nightly/GeodeBootstrapper.dylib ./loader/include/link/libfmod.dylib'
|
2022-10-14 14:22:51 -04:00
|
|
|
cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode'
|
|
|
|
|
2022-07-30 12:24:03 -04:00
|
|
|
name: ${{ matrix.config.name }}
|
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-08-02 06:04:11 -04:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
with:
|
|
|
|
arch: x86
|
2022-10-23 07:56:16 -04:00
|
|
|
if: matrix.config.os_identifier == 'win'
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
- name: Configure ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
with:
|
|
|
|
key: ${{ matrix.config.os }}
|
|
|
|
|
2022-10-14 14:22:51 -04:00
|
|
|
- name: Download CLI
|
|
|
|
uses: robinraju/release-downloader@v1.5
|
|
|
|
with:
|
|
|
|
repository: geode-sdk/cli
|
|
|
|
latest: true
|
2022-10-23 07:56:16 -04:00
|
|
|
fileName: "*-${{ matrix.config.os_identifier }}.zip"
|
2022-10-14 14:22:51 -04:00
|
|
|
tarBall: false
|
|
|
|
zipBall: false
|
2022-10-16 13:12:05 -04:00
|
|
|
out-file-path: "cli"
|
2022-10-14 14:22:51 -04:00
|
|
|
|
|
|
|
- name: Unzip CLI
|
|
|
|
run: |
|
2022-10-23 07:56:16 -04:00
|
|
|
7z x "${{ github.workspace }}/cli/*-${{ matrix.config.os_identifier }}.zip" -o"${{ github.workspace }}/cli"
|
2022-10-14 14:22:51 -04:00
|
|
|
|
|
|
|
- name: Add CLI to Path
|
|
|
|
run: |
|
|
|
|
${{ matrix.config.cli_cmd }}
|
|
|
|
echo "${{ github.workspace }}/cli" >> $GITHUB_PATH
|
2022-10-23 08:23:55 -04:00
|
|
|
|
2022-07-30 12:24:03 -04:00
|
|
|
- name: Configure CMake
|
|
|
|
run: |
|
2022-10-14 14:22:51 -04:00
|
|
|
${{ matrix.config.prefixes }} cmake -B ${{ github.workspace }}/build ${{ matrix.config.extra_flags }} -DGEODE_DISABLE_CLI_CALLS=ON -DCLI_PATH="${{ github.workspace }}/cli"
|
2022-10-23 08:23:55 -04:00
|
|
|
|
2022-07-30 12:24:03 -04:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cd build
|
2022-10-11 18:36:15 -04:00
|
|
|
cmake --build . --config RelWithDebInfo
|
2022-10-23 08:23:55 -04:00
|
|
|
|
2022-07-30 12:24:03 -04:00
|
|
|
- name: Move to output folder
|
|
|
|
shell: bash
|
|
|
|
working-directory: ${{ github.workspace }}
|
|
|
|
run: |
|
|
|
|
mkdir ./out
|
|
|
|
mv ${{ matrix.config.out_paths }} ./out
|
2022-10-23 07:56:16 -04:00
|
|
|
|
|
|
|
- name: Get version
|
|
|
|
uses: juliangruber/read-file-action@v1.1.6
|
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}/VERSION
|
|
|
|
id: version
|
|
|
|
|
|
|
|
- name: Delete resource cache file
|
|
|
|
run: |
|
|
|
|
rm ./bin/nightly/resources/.geode_cache
|
|
|
|
- name: Upload resources
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: resources
|
|
|
|
path: ./bin/nightly/resources
|
|
|
|
if: matrix.config.os_identifier == 'win'
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-10-23 07:56:16 -04:00
|
|
|
name: geode-v${{ steps.version.outputs.content }}-${{ matrix.config.os_identifier }}
|
2022-07-30 12:24:03 -04:00
|
|
|
path: ./out
|
|
|
|
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
2022-10-23 07:56:16 -04:00
|
|
|
if: github.ref == 'refs/heads/main'
|
2022-07-30 12:24:03 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}
|
|
|
|
|
|
|
|
- uses: vimtor/action-zip@v1
|
|
|
|
with:
|
2022-11-19 20:54:37 -05:00
|
|
|
files: Geode.dylib GeodeBootstrapper.dylib
|
2022-07-30 12:24:03 -04:00
|
|
|
dest: macOS.zip
|
|
|
|
|
|
|
|
- uses: vimtor/action-zip@v1
|
|
|
|
with:
|
2022-11-19 20:54:37 -05:00
|
|
|
files: Geode.dll GeodeBootstrapper.dll Geode.lib
|
2022-07-30 12:24:03 -04:00
|
|
|
dest: Windows.zip
|
|
|
|
|
|
|
|
- name: Update release
|
|
|
|
uses: IsaacShelton/update-existing-release@v1.3.1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-11-19 20:54:37 -05:00
|
|
|
files: ./macOS.zip ./Windows.zip
|
2022-07-30 12:24:03 -04:00
|
|
|
release: Nightly
|
2022-10-23 08:23:55 -04:00
|
|
|
prerelease: true
|