jak-project/.github/workflows/windows-build-msvc.yaml

66 lines
2 KiB
YAML
Raw Normal View History

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: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install NASM
# TODO - Simplify this with just the first command once choco 2.0 rolls out everywhere
run: |
$chocoVersion = choco --version
if ($chocoVersion.StartsWith("2.")) {
choco install nasm --source="${{ github.workspace }}/third-party/nasm"
} else {
choco install ${{ github.workspace }}/third-party/nasm/old/nasm.2.15.05.nupkg
}
- name: Setup sccache
build(deps): bump hendrikmuhs/ccache-action from 1.2.13 to 1.2.14 (#3650) Bumps [hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action) from 1.2.13 to 1.2.14. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/hendrikmuhs/ccache-action/releases">hendrikmuhs/ccache-action's releases</a>.</em></p> <blockquote> <h2>v1.2.14</h2> <h2>What's Changed</h2> <ul> <li>Add sccache to PATH after installation by <a href="https://github.com/kendalharland"><code>@​kendalharland</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/204">hendrikmuhs/ccache-action#204</a></li> <li>Make ccache-action respect environment variables by <a href="https://github.com/TrentHouliston"><code>@​TrentHouliston</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/217">hendrikmuhs/ccache-action#217</a></li> <li>updates</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/kendalharland"><code>@​kendalharland</code></a> made their first contribution in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/204">hendrikmuhs/ccache-action#204</a></li> <li><a href="https://github.com/cclauss"><code>@​cclauss</code></a> made their first contribution in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/213">hendrikmuhs/ccache-action#213</a></li> <li><a href="https://github.com/TrentHouliston"><code>@​TrentHouliston</code></a> made their first contribution in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/217">hendrikmuhs/ccache-action#217</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/hendrikmuhs/ccache-action/compare/v1...v1.2.14">https://github.com/hendrikmuhs/ccache-action/compare/v1...v1.2.14</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/ed74d11c0b343532753ecead8a951bb09bb34bc9"><code>ed74d11</code></a> Bump <code>@​types/node</code> from 22.0.0 to 22.1.0 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/222">#222</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/a92dd99d2cf20a1db8898b00bb383b234fb1cf15"><code>a92dd99</code></a> Bump <code>@​types/node</code> from 20.14.11 to 22.0.0 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/220">#220</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/aa7d29411285c29f578109e54b7a8d8155c2fbb3"><code>aa7d294</code></a> Bump typescript from 5.5.3 to 5.5.4 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/218">#218</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/6f0874030891bf49d844fff92b862568f093dabe"><code>6f08740</code></a> Make ccache-action respect environment variables (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/217">#217</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/ed979992cda44142d976add1d5a7d6f39f7e8b67"><code>ed97999</code></a> Bump <code>@​types/node</code> from 20.14.10 to 20.14.11 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/216">#216</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/ca1e5062f3378412bbfeb780d1ebe3c2a4913081"><code>ca1e506</code></a> Bump actions/checkout from 2 to 4 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/214">#214</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/069136ab7ab2267ea6624fde73f80d7d472d323e"><code>069136a</code></a> Bump <code>@​types/node</code> from 20.14.9 to 20.14.10 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/212">#212</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/3cf745af56c860cc76c89ffd830efec6aef03b56"><code>3cf745a</code></a> Bump typescript from 5.5.2 to 5.5.3 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/211">#211</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/9a0cc152966f2c3f3df86a6e0364da1608924006"><code>9a0cc15</code></a> Keep GitHub Actions up to date with GitHub's Dependabot (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/213">#213</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/b7c0e162a73e852cdd80bd368aa77e7801fce009"><code>b7c0e16</code></a> Bump <code>@​types/node</code> from 20.14.8 to 20.14.9 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/210">#210</a>)</li> <li>Additional commits viewable in <a href="https://github.com/hendrikmuhs/ccache-action/compare/v1.2.13...v1.2.14">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hendrikmuhs/ccache-action&package-manager=github_actions&previous-version=1.2.13&new-version=1.2.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 09:26:37 -04:00
uses: hendrikmuhs/ccache-action@v1.2.14
with:
variant: sccache
key: windows-2022-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
restore-keys: windows-2022-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}
max-size: 1000M
- uses: ilammy/msvc-dev-cmd@v1
# Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598
- name: Remove Strawberry Perl from PATH
run: |
$env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", ""
"PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: CMake Generation - MSVC
shell: cmd
run: cmake -B build --preset=${{ inputs.cmakePreset }} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache .
- name: Build Project
shell: cmd
run: |
set CL=/MP
2022-12-22 18:12:59 -05:00
cmake --build build --parallel %NUMBER_OF_PROCESSORS%
- name: Run Tests
timeout-minutes: 10
env:
GTEST_OUTPUT: "xml:opengoal-test-report.xml"
run: |
./build/bin/goalc-test.exe --gtest_color=yes --gtest_brief=0 --gtest_filter="-*MANUAL_TEST*"