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

76 lines
2.4 KiB
YAML
Raw Normal View History

name: Windows Build Clang
on:
workflow_call:
inputs:
cmakePreset:
required: true
type: string
cachePrefix:
required: true
type: string
uploadArtifacts:
required: false
type: boolean
default: false
jobs:
build:
name: Clang
runs-on: windows-2022
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
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.12 to 1.2.13 (#3497) Bumps [hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action) from 1.2.12 to 1.2.13. <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.13</h2> <h2>What's Changed</h2> <ul> <li>add emscripten to the compiler list by <a href="https://github.com/mmomtchev"><code>@​mmomtchev</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/187">hendrikmuhs/ccache-action#187</a></li> <li>Bump <code>@​actions/cache</code> from 3.2.3 to 3.2.4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/183">hendrikmuhs/ccache-action#183</a></li> <li>Bump typescript from 5.3.3 to 5.4.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/190">hendrikmuhs/ccache-action#190</a></li> <li>Bump typescript from 5.4.2 to 5.4.3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/191">hendrikmuhs/ccache-action#191</a></li> <li>fix: early exit process so node doesn't wait for hanging promises by <a href="https://github.com/chirag-droid"><code>@​chirag-droid</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/182">hendrikmuhs/ccache-action#182</a></li> <li>Bump typescript from 5.4.3 to 5.4.5 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/193">hendrikmuhs/ccache-action#193</a></li> <li>Update windows by <a href="https://github.com/virtuald"><code>@​virtuald</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/180">hendrikmuhs/ccache-action#180</a></li> <li>Bump <code>@​types/node</code> from 20.11.10 to 20.12.7 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/194">hendrikmuhs/ccache-action#194</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/mmomtchev"><code>@​mmomtchev</code></a> made their first contribution in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/187">hendrikmuhs/ccache-action#187</a></li> <li><a href="https://github.com/chirag-droid"><code>@​chirag-droid</code></a> made their first contribution in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/182">hendrikmuhs/ccache-action#182</a></li> <li><a href="https://github.com/virtuald"><code>@​virtuald</code></a> made their first contribution in <a href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/180">hendrikmuhs/ccache-action#180</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/hendrikmuhs/ccache-action/compare/v1.2.12...v1.2.13">https://github.com/hendrikmuhs/ccache-action/compare/v1.2.12...v1.2.13</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/c92f40bee50034e84c763e33b317c77adaa81c92"><code>c92f40b</code></a> Bump <code>@​types/node</code> from 20.11.10 to 20.12.7 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/194">#194</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/ff9f6cc67d49b9acaa9e102f80d1ea8a0c86a6dd"><code>ff9f6cc</code></a> update checksum</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/985163732c9a0ab6be742a4db87bb36d07d6ca9f"><code>9851637</code></a> update code</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/40738ee8f3bcf20e438d29f613fb2ef1b5cff79d"><code>40738ee</code></a> Update windows (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/180">#180</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/ba6e323cc10f37a14582696e025efe365df0b125"><code>ba6e323</code></a> Bump typescript from 5.4.3 to 5.4.5 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/193">#193</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/550708f4f24caa1472defc821c356d0e72d45643"><code>550708f</code></a> fix: early exit process so node doesn't wait for hanging promises (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/182">#182</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/259dcb3149e7662420f6b796600eac9008bb2d4e"><code>259dcb3</code></a> Bump typescript from 5.4.2 to 5.4.3 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/191">#191</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/a16392ef06bb17357c33855e071f12873d87b163"><code>a16392e</code></a> update code</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/3818c2034d1b62be7cc5e8e097c7c3996d94a068"><code>3818c20</code></a> Bump typescript from 5.3.3 to 5.4.2 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/190">#190</a>)</li> <li><a href="https://github.com/hendrikmuhs/ccache-action/commit/b647aa998265c7332fbcd30509be75d7ed682458"><code>b647aa9</code></a> Bump <code>@​actions/cache</code> from 3.2.3 to 3.2.4 (<a href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/183">#183</a>)</li> <li>Additional commits viewable in <a href="https://github.com/hendrikmuhs/ccache-action/compare/v1.2.12...v1.2.13">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.12&new-version=1.2.13)](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> Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-05-01 15:53:40 -04:00
uses: hendrikmuhs/ccache-action@v1.2.13
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
# https://github.com/actions/runner-images/issues/5459
# Causes binaries to be built differently, get rid of this garbage
- 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
shell: cmd
run: cmake -B build --preset=${{ inputs.cmakePreset }} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache .
- name: Build Project
shell: cmd
2022-12-22 18:12:59 -05:00
run: cmake --build build --parallel %NUMBER_OF_PROCESSORS%
- name: Run Tests
env:
GTEST_OUTPUT: "xml:opengoal-test-report.xml"
run: ./build/bin/goalc-test.exe --gtest_color=yes --gtest_brief=0 --gtest_filter="-*MANUAL_TEST*"
- name: Upload artifact
build(deps): bump actions/upload-artifact from 3 to 4 (#3284) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p> <blockquote> <h2>v4.0.0</h2> <h2>What's Changed</h2> <p>The release of upload-artifact@v4 and download-artifact@v4 are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.</p> <p>For more information, see the <a href="https://github.com/actions/toolkit/tree/main/packages/artifact"><code>@​actions/artifact</code></a> documentation.</p> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/vmjoseph"><code>@​vmjoseph</code></a> made their first contribution in <a href="https://redirect.github.com/actions/upload-artifact/pull/464">actions/upload-artifact#464</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v3...v4.0.0">https://github.com/actions/upload-artifact/compare/v3...v4.0.0</a></p> <h2>v3.1.3</h2> <h2>What's Changed</h2> <ul> <li>chore(github): remove trailing whitespaces by <a href="https://github.com/ljmf00"><code>@​ljmf00</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/313">actions/upload-artifact#313</a></li> <li>Bump <code>@​actions/artifact</code> version to v1.1.2 by <a href="https://github.com/bethanyj28"><code>@​bethanyj28</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/436">actions/upload-artifact#436</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v3...v3.1.3">https://github.com/actions/upload-artifact/compare/v3...v3.1.3</a></p> <h2>v3.1.2</h2> <ul> <li>Update all <code>@actions/*</code> NPM packages to their latest versions- <a href="https://redirect.github.com/actions/upload-artifact/issues/374">#374</a></li> <li>Update all dev dependencies to their most recent versions - <a href="https://redirect.github.com/actions/upload-artifact/issues/375">#375</a></li> </ul> <h2>v3.1.1</h2> <ul> <li>Update actions/core package to latest version to remove <code>set-output</code> deprecation warning <a href="https://redirect.github.com/actions/upload-artifact/issues/351">#351</a></li> </ul> <h2>v3.1.0</h2> <h2>What's Changed</h2> <ul> <li>Bump <code>@​actions/artifact</code> to v1.1.0 (<a href="https://redirect.github.com/actions/upload-artifact/pull/327">actions/upload-artifact#327</a>) <ul> <li>Adds checksum headers on artifact upload (<a href="https://redirect.github.com/actions/toolkit/pull/1095">actions/toolkit#1095</a>) (<a href="https://redirect.github.com/actions/toolkit/pull/1063">actions/toolkit#1063</a>)</li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/upload-artifact/commit/c7d193f32edcb7bfad88892161225aeda64e9392"><code>c7d193f</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/466">#466</a> from actions/v4-beta</li> <li><a href="https://github.com/actions/upload-artifact/commit/13131bb095770b4070a7477c3cd2d96e1c16d9f4"><code>13131bb</code></a> licensed cache</li> <li><a href="https://github.com/actions/upload-artifact/commit/4a6c273b9834f66a1d05c170dc3f80f9cdb9def1"><code>4a6c273</code></a> Merge branch 'main' into v4-beta</li> <li><a href="https://github.com/actions/upload-artifact/commit/f391bb91a3d3118aeca171c365bb319ece276b37"><code>f391bb9</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/465">#465</a> from actions/robherley/v4-documentation</li> <li><a href="https://github.com/actions/upload-artifact/commit/9653d03c4b74c32144e02dae644fea70e079d4b3"><code>9653d03</code></a> Apply suggestions from code review</li> <li><a href="https://github.com/actions/upload-artifact/commit/875b63076402f25ef9d52c294c86ba4f97810575"><code>875b630</code></a> add limitations section</li> <li><a href="https://github.com/actions/upload-artifact/commit/ecb21463e93740a6be75c3116242169bfdbcb15a"><code>ecb2146</code></a> add compression example</li> <li><a href="https://github.com/actions/upload-artifact/commit/5e7604f84a055838f64ed68bb9904751523081ae"><code>5e7604f</code></a> trim some repeated info</li> <li><a href="https://github.com/actions/upload-artifact/commit/d6437d07581fe318a364512e6cf6b1dca6b4f92c"><code>d6437d0</code></a> naming</li> <li><a href="https://github.com/actions/upload-artifact/commit/1b561557037b4957d7d184e9aac02bec86c771eb"><code>1b56155</code></a> s/v4-beta/v4/g</li> <li>Additional commits viewable in <a href="https://github.com/actions/upload-artifact/compare/v3...v4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=3&new-version=4)](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-01-04 01:32:40 -05:00
uses: actions/upload-artifact@v4
if: ${{ inputs.uploadArtifacts }}
with:
name: opengoal-windows-${{ inputs.cachePrefix }}
if-no-files-found: error
path: ./build/bin