Skip to content

Commit

Permalink
wf: msvc code check
Browse files Browse the repository at this point in the history
  • Loading branch information
fszontagh committed Dec 31, 2024
1 parent f3f8a11 commit 2dc05cc
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,39 @@ permissions:
contents: read

jobs:

prepare-conan-cache:
name: Prepare Conan cache for Windows
runs-on: windows-2022
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Cache Conan
id: cache-conan
uses: actions/cache@v4
with:
path: |
~/.conan2
build\generators
CMakeUserPresets.json
key: ${{ runner.os }}-win22-conan-${{ hashFiles('conanfile.txt') }}
restore-keys: ${{ runner.os }}-win22-conan

- name: Install Conan
if: steps.cache-conan.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install conan
- name: Set up Conan
if: steps.cache-conan.outputs.cache-hit != 'true'
run: |
New-Item -ItemType Directory -Force -Path build
cd build
conan profile detect
conan install .. -s compiler.cppstd=17 --build=never
analyze:
permissions:
contents: read # for actions/checkout to fetch code
Expand All @@ -36,6 +69,31 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache Conan
id: cache-conan
uses: actions/cache@v4
with:
path: |
~/.conan2
build\generators
CMakeUserPresets.json
key: ${{ runner.os }}-win22-conan-${{ hashFiles('conanfile.txt') }}
restore-keys: ${{ runner.os }}-win22-conan

- name: Install Conan
if: steps.cache-conan.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install conan
- name: Set up Conan
if: steps.cache-conan.outputs.cache-hit != 'true'
run: |
New-Item -ItemType Directory -Force -Path build
cd build
conan profile detect
conan install .. -s compiler.cppstd=17 --build=never
- name: Configure CMake
run: cmake -B ${{ env.build }}

Expand Down

0 comments on commit 2dc05cc

Please sign in to comment.