Skip to content

Commit

Permalink
Add windows CI build with fetching of googletest+json
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed May 27, 2024
1 parent d4d3c23 commit c7a574d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/build-fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,56 @@ jobs:
if: ${{!cancelled()}}
run: |
ccache -s
windows:
env:
CCACHE_DIR: "${{github.workspace}}\\.ccache"
CCACHE_MAXSIZE: "100Mi"
CMAKE_PRESET: fast
runs-on: windows-latest
steps:
- name: Install dependencies
run: |
choco install ninja ccache
- name: Check out Celeritas
uses: actions/checkout@v4
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{env.CCACHE_DIR}}
key: ccache-fast-windows-${{github.run_id}}
restore-keys: |
ccache-fast
- name: Zero ccache stats
run: |
ccache -z
- name: Configure Celeritas
shell: pwsh
run: |
Copy-Item scripts/cmake-presets/ci-windows-github.json -Destination CMakeUserPresets.json
cmake --preset=$Env:CMAKE_PRESET `
-DCeleritas_GIT_DESCRIBE="${{github.event.pull_request
&& format(';-pr.{0};', github.event.pull_request.number)
|| format(';-{0};', github.ref_name)}}"
- name: Build all
run: |
cmake --build --preset=$Env:CMAKE_PRESET
- name: Test all
continue-on-error: true
run: |
ctest --preset=$Env:CMAKE_PRESET
- name: Install
working-directory: build
run: |
cmake --install --preset=$Env:CMAKE_PRESET
- name: Check installation
working-directory: install
run: |
./bin/celer-sim --version
- name: Show ccache stats
if: ${{!cancelled()}}
run: |
ccache -s
# vim: set nowrap tw=100:
11 changes: 10 additions & 1 deletion scripts/cmake-presets/ci-windows-github.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cacheVariables": {
"BUILD_SHARED_LIBS": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILD_DEMOS": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILD_TESTS": {"type": "BOOL", "value": "ON"},
"CELERITAS_BUILD_TESTS": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILD_DOCS": {"type": "BOOL", "value": "OFF"},
"CELERITAS_DEBUG": {"type": "BOOL", "value": "ON"},
"CELERITAS_TEST_VERBOSE":{"type": "BOOL", "value": "OFF"},
Expand All @@ -34,6 +34,15 @@
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install"
}
},
{
"name": "fast",
"inherits": ["base"],
"displayName": "fast build with testing and JSON",
"cacheVariables": {
"CELERITAS_BUILD_TESTS": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_JSON": {"type": "BOOL", "value": "ON"}
}
},
{
"name": "ultralite",
"inherits": ["base"],
Expand Down

0 comments on commit c7a574d

Please sign in to comment.