Skip to content

Commit

Permalink
Fix ASan issue on Windows workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-park committed Jan 19, 2024
1 parent 318e6ea commit 4a71284
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ jobs:
strategy:
fail-fast: false
matrix:
preset: [linux-clang, linux-gcc, macos, windows]
preset: [linux-clang, linux-gcc, macos, windows-ninja]
config: [Debug, Release]
abstract: [OFF, ON]
sanitize: [address, thread, undefined, leak, memory]
exclude:
- { preset: linux-gcc, sanitize: memory }
- { preset: macos, sanitize: leak }
- { preset: macos, sanitize: memory }
- { preset: windows, sanitize: thread }
- { preset: windows, sanitize: undefined }
- { preset: windows, sanitize: leak }
- { preset: windows, sanitize: memory }
- { preset: windows-ninja, sanitize: thread }
- { preset: windows-ninja, sanitize: undefined }
- { preset: windows-ninja, sanitize: leak }
- { preset: windows-ninja, sanitize: memory }
include:
- { preset: linux-clang, os: ubuntu-latest }
- { preset: linux-gcc, os: ubuntu-latest }
- { preset: macos, os: macos-latest }
- { preset: windows, os: windows-latest }
- { preset: windows-ninja, os: windows-latest }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,6 +34,17 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- name: Install dependencies on Windows
if: runner.os == 'Windows'
run: |
choco install ninja
- name: Choose the latest MSVC toolset
if: runner.os == 'Windows'
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
toolset: 14.38

- name: Configure
run: >
Expand Down
8 changes: 8 additions & 0 deletions cmake/preset/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++"
}
},
{
"name": "msvc",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl"
}
}
],
"buildPresets": [
Expand Down
24 changes: 24 additions & 0 deletions cmake/preset/windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
"default"
]
},
{
"name": "windows-ninja",
"inherits": [
"host-windows",
"target-windows",
"ninja",
"default"
]
},
{
"name": "windows-arm",
"inherits": [
Expand Down Expand Up @@ -58,6 +67,13 @@
"host-windows"
]
},
{
"name": "windows-ninja",
"configurePreset": "windows-ninja",
"inherits": [
"host-windows"
]
},
{
"name": "windows-arm",
"configurePreset": "windows-arm",
Expand Down Expand Up @@ -96,6 +112,14 @@
"options"
]
},
{
"name": "windows-ninja",
"configurePreset": "windows-ninja",
"inherits": [
"host-windows",
"options"
]
},
{
"name": "windows-arm",
"configurePreset": "windows-arm",
Expand Down

0 comments on commit 4a71284

Please sign in to comment.