Fix Windows build #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
windows-2019: | |
name: Build on Windows 2019 | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
buildmode: [Debug] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install openssl | |
uses: crazy-max/ghaction-chocolatey@v3 | |
with: | |
args: install openssl --version 3.1.1 -y --no-progress | |
- name: Install curl | |
uses: crazy-max/ghaction-chocolatey@v3 | |
with: | |
args: install curl -y --no-progress | |
- name: Add dependencies in the path | |
run: | | |
$CURL_DIR_NAME = Get-ChildItem -Path C:\ProgramData\chocolatey\lib\curl\tools\curl* -Name | |
$CURL_PATH = "C:\ProgramData\chocolatey\lib\curl\tools\${CURL_DIR_NAME}" | |
echo "OPENSSL_ROOT_DIR=C:\Program Files\OpenSSL" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "CURL_LIBRARY=${CURL_PATH}\lib\libcurl.dll.a" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "CURL_INCLUDE_DIR=${CURL_PATH}\include" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Configure CMake | |
run: | | |
cmake -A "x64" -DCURL_LIBRARY="$env:CURL_LIBRARY" -DCURL_INCLUDE_DIR="$env:CURL_INCLUDE_DIR" -DCMAKE_BUILD_TYPE=${{matrix.buildmode}} -S . -B build | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build . --config ${{matrix.buildmode}} --parallel 2 | |
- name: Local Tests | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{matrix.buildmode}} --output-on-failure --exclude-regex api_test | |
- name: Public API Tests # Tries several times to avoid random timeout errors not coming from coincenter | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{matrix.buildmode}} --output-on-failure --tests-regex api_test --repeat until-pass:10 |