CI: speedup AppVeyor builds by ~30% (#3422)

AppVeyor build VMs should provide at least two cores. Parallelize builds
and tests.
In addition, enable output on failure and disable verbose test output.
This commit is contained in:
Florian Albrechtskirchinger 2022-04-06 08:26:49 +02:00 committed by GitHub
parent c2054b96b9
commit fa91409a73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,15 +66,15 @@ before_build:
- cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On "%CMAKE_OPTIONS%" - cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On "%CMAKE_OPTIONS%"
build_script: build_script:
- cmake --build . --config "%configuration%" - cmake --build . --config "%configuration%" --parallel 2
test_script: test_script:
- if "%configuration%"=="Release" ctest -C "%configuration%" -V -j - if "%configuration%"=="Release" ctest -C "%configuration%" --parallel 2 --output-on-failure
# On Debug builds, skip test-unicode_all # On Debug builds, skip test-unicode_all
# as it is extremely slow to run and cause # as it is extremely slow to run and cause
# occasional timeouts on AppVeyor. # occasional timeouts on AppVeyor.
# More info: https://github.com/nlohmann/json/pull/1570 # More info: https://github.com/nlohmann/json/pull/1570
- if "%configuration%"=="Debug" ctest --exclude-regex "test-unicode" -C "%configuration%" -V -j - if "%configuration%"=="Debug" ctest --exclude-regex "test-unicode" -C "%configuration%" --parallel 2 --output-on-failure
# only build PRs and commits to develop branch # only build PRs and commits to develop branch
# (see https://help.appveyor.com/discussions/questions/55079-two-builds-per-commit-to-pull-request) # (see https://help.appveyor.com/discussions/questions/55079-two-builds-per-commit-to-pull-request)