2022-07-30 12:24:03 -04:00
|
|
|
name: Build Binaries
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '**' # every branch
|
|
|
|
- '!no-build-**' # unless marked as no-build
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- name: "Windows"
|
|
|
|
os: windows-2019
|
|
|
|
prefixes: ''
|
|
|
|
extra_flags: '-G "Visual Studio 16 2019" -T host=x86 -A win32'
|
2022-10-09 11:52:18 -04:00
|
|
|
out_paths: './bin/nightly/geode.dll ./bin/nightly/GeodeBootstrapper.dll ./bin/nightly/geode.lib ./bin/nightly/XInput9_1_0.dll'
|
2022-07-30 12:24:03 -04:00
|
|
|
- name: "macOS"
|
|
|
|
os: macos-latest
|
|
|
|
prefixes: 'PATH="/usr/local/opt/ccache/libexec:$PATH"'
|
|
|
|
extra_flags: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON"
|
2022-10-09 11:52:18 -04:00
|
|
|
out_paths: './bin/nightly/Geode.dylib ./bin/nightly/GeodeBootstrapper.dylib'
|
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
|
|
|
|
if: matrix.config.os == 'windows-latest'
|
|
|
|
|
|
|
|
- name: Configure ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
with:
|
|
|
|
key: ${{ matrix.config.os }}
|
|
|
|
if: matrix.config.os == 'macos-latest'
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
run: |
|
2022-10-03 07:01:08 -04:00
|
|
|
${{ matrix.config.prefixes }} cmake -B ${{ github.workspace }}/build ${{ matrix.config.extra_flags }} -DGEODE_DISABLE_CLI_CALLS=ON
|
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-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
|
|
|
|
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.config.name }}
|
|
|
|
path: ./out
|
|
|
|
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}
|
|
|
|
|
|
|
|
- uses: vimtor/action-zip@v1
|
|
|
|
with:
|
|
|
|
files: macOS
|
|
|
|
dest: macOS.zip
|
|
|
|
|
|
|
|
- uses: vimtor/action-zip@v1
|
|
|
|
with:
|
|
|
|
files: Windows
|
|
|
|
dest: Windows.zip
|
|
|
|
|
|
|
|
- uses: vimtor/action-zip@v1
|
|
|
|
with:
|
|
|
|
files: loader/include
|
|
|
|
dest: Headers.zip
|
|
|
|
|
|
|
|
- name: Update release
|
|
|
|
uses: IsaacShelton/update-existing-release@v1.3.1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
files: ./macOS.zip ./Windows.zip ./Headers.zip
|
|
|
|
release: Nightly
|
|
|
|
prerelease: true
|