Merge branch 'main' of github.com:geode-sdk/TulipHook #97
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: Build TulipHook | |
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_identifier: "win" | |
os: windows-2022 | |
extra_flags: '-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug' | |
out_paths: './build/src/TulipHook.lib ./build/test/TulipHookTest.exe' | |
cli_cmd: '' | |
- name: "macOS" | |
os_identifier: "mac" | |
os: macos-latest | |
extra_flags: "-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug" | |
out_paths: './build/src/libTulipHook.a ./build/test/TulipHookTest' | |
cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode' | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x86 | |
if: matrix.config.os_identifier == 'win' | |
- name: Configure ccache | |
uses: hendrikmuhs/ccache-action@v1.2.8 | |
with: | |
key: v1-${{ matrix.config.os }}-${{ github.ref }} | |
- name: Update ccache and ninja | |
shell: bash | |
run: | | |
choco install ccache | |
choco install ninja | |
ccache --version | |
echo "==============" | |
ninja --version | |
if: matrix.config.os_identifier == 'win' | |
- name: Install ninja-build tool | |
uses: seanmiddleditch/gha-setup-ninja@v3 | |
if: matrix.config.os_identifier == 'mac' | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{ github.workspace }} | |
run: | | |
cmake -G Ninja -B ./build ${{ matrix.config.extra_flags }} | |
- name: Build | |
shell: bash | |
working-directory: ${{ github.workspace }} | |
run: | | |
cmake --build ./build --parallel | |
- name: Move to output folder | |
shell: bash | |
working-directory: ${{ github.workspace }} | |
run: | | |
mkdir ./out | |
ls ./build/src | |
mv ${{ matrix.config.out_paths }} ./out | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: output-${{ matrix.config.os }} | |
path: ${{ github.workspace }}/out | |