chore: Update Visual Studio CI to VS 2022, and add VS Debug builds (#5240)

* Debug builds do not run tests, because they take too long.
This commit is contained in:
Ed Hennis
2025-01-24 18:46:47 -05:00
committed by GitHub
parent 5fbee8c824
commit ed4870cdb4

View File

@@ -24,16 +24,18 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
generator: version:
- Visual Studio 16 2019 - generator: Visual Studio 17 2022
runs-on: windows-2022
configuration: configuration:
- Release - type: Release
# Github hosted runners tend to hang when running Debug unit tests. tests: true
# Instead of trying to work around it, disable the Debug job until - type: Debug
# something beefier (i.e. a heavy self-hosted runner) becomes # Skip running unit tests on debug builds, because they
# available. # take an unreasonable amount of time
# - Debug tests: false
runs-on: windows-2019 runtime: d
runs-on: ${{ matrix.version.runs-on }}
env: env:
build_dir: .build build_dir: .build
steps: steps:
@@ -68,7 +70,9 @@ jobs:
run: | run: |
conan profile new default --detect conan profile new default --detect
conan profile update settings.compiler.cppstd=20 default conan profile update settings.compiler.cppstd=20 default
conan profile update settings.compiler.runtime=MT${{ matrix.configuration == 'Debug' && 'd' || '' }} default conan profile update \
settings.compiler.runtime=MT${{ matrix.configuration.runtime }} \
default
- name: build dependencies - name: build dependencies
uses: ./.github/actions/dependencies uses: ./.github/actions/dependencies
env: env:
@@ -76,16 +80,18 @@ jobs:
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }} CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }} CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
with: with:
configuration: ${{ matrix.configuration }} configuration: ${{ matrix.configuration.type }}
- name: build - name: build
uses: ./.github/actions/build uses: ./.github/actions/build
with: with:
generator: '${{ matrix.generator }}' generator: '${{ matrix.version.generator }}'
configuration: ${{ matrix.configuration }} configuration: ${{ matrix.configuration.type }}
# Hard code for now. Move to the matrix if varied options are needed # Hard code for now. Move to the matrix if varied options are needed
cmake-args: '-Dassert=ON -Dreporting=OFF -Dunity=ON' cmake-args: '-Dassert=ON -Dreporting=OFF -Dunity=ON'
cmake-target: install cmake-target: install
- name: test - name: test
shell: bash shell: bash
if: ${{ matrix.configuration.tests }}
run: | run: |
${build_dir}/${{ matrix.configuration }}/rippled --unittest --unittest-jobs $(nproc) ${build_dir}/${{ matrix.configuration.type }}/rippled --unittest \
--unittest-jobs $(nproc)