mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 00:57:44 -04:00
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
|
name: Windows Build MSVC
|
||
|
|
||
|
on:
|
||
|
workflow_call:
|
||
|
inputs:
|
||
|
cmakePreset:
|
||
|
required: true
|
||
|
type: string
|
||
|
cachePrefix:
|
||
|
required: true
|
||
|
type: string
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
name: MSVC
|
||
|
runs-on: windows-2022
|
||
|
timeout-minutes: 45
|
||
|
|
||
|
env: # overrides: https://github.com/mbitsnbites/buildcache/blob/master/doc/configuration.md
|
||
|
BUILDCACHE_MAX_CACHE_SIZE: 1000000000 # 1gb
|
||
|
BUILDCACHE_COMPRESS_FORMAT: ZSTD
|
||
|
BUILDCACHE_COMPRESS_LEVEL: 19
|
||
|
BUILDCACHE_DIRECT_MODE: true
|
||
|
BUILDCACHE_LOG_FILE: ${{ github.workspace }}/buildcache.log
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout Repository
|
||
|
uses: actions/checkout@v3
|
||
|
|
||
|
- name: Install NASM
|
||
|
run: choco install ${{ github.workspace }}/third-party/nasm/nasm.2.15.05.nupkg
|
||
|
|
||
|
- name: Setup Buildcache
|
||
|
uses: mikehardy/buildcache-action@v1.3.0
|
||
|
with:
|
||
|
cache_key: windows-2022-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}
|
||
|
|
||
|
- uses: ilammy/msvc-dev-cmd@v1
|
||
|
|
||
|
- name: CMake Generation - MSVC
|
||
|
shell: cmd
|
||
|
run: cmake -B build --preset=${{ inputs.cmakePreset }} -DCMAKE_C_COMPILER_LAUNCHER=${{ github.workspace }}/buildcache/bin/buildcache.exe -DCMAKE_CXX_COMPILER_LAUNCHER=${{ github.workspace }}/buildcache/bin/buildcache.exe .
|
||
|
|
||
|
- name: Build Project
|
||
|
shell: cmd
|
||
|
run: |
|
||
|
set CL=/MP
|
||
|
cmake --build build -j 2
|
||
|
|
||
|
- name: Run Tests
|
||
|
timeout-minutes: 10
|
||
|
run: ./build/bin/goalc-test.exe --gtest_color=yes --gtest_filter="-*MANUAL_TEST*"
|