Fix ECC OpenSSL cmake check on Windows #195
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - master | |
| pull_request: | |
| jobs: | |
| linux_botan: | |
| name: Linux with Botan | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y libcppunit-dev libbotan-2-dev p11-kit | |
| - name: Build | |
| env: | |
| CXXFLAGS: -Werror -DBOTAN_NO_DEPRECATED_WARNINGS | |
| run: | | |
| ./autogen.sh | |
| ./configure --with-crypto-backend=botan | |
| make | |
| - name: Test | |
| run: | | |
| make check || (find . -name test-suite.log -exec cat {} \; && false) | |
| linux_ossl_1: | |
| name: Linux with OpenSSL 1.1.1 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y libcppunit-dev p11-kit | |
| # Replace installed OpenSSL with the supported version 1.1.1 | |
| curl -O http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb | |
| curl -O http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.24_amd64.deb | |
| curl -O http://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2.24_amd64.deb | |
| sudo dpkg -i --force-confnew openssl_1.1.1f-1ubuntu2.24_amd64.deb \ | |
| libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb \ | |
| libssl-dev_1.1.1f-1ubuntu2.24_amd64.deb | |
| - name: Build | |
| env: | |
| CXXFLAGS: -Werror | |
| run: | | |
| ./autogen.sh | |
| ./configure --with-crypto-backend=openssl | |
| make | |
| - name: Test | |
| run: | | |
| make check || (find . -name test-suite.log -exec cat {} \; && false) | |
| linux_ossl_30: | |
| name: Linux with OpenSSL 3.0 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y libcppunit-dev libssl-dev p11-kit | |
| - name: Build | |
| # Once all OpenSSL deprecations fixed, uncomment this | |
| # env: | |
| # CXXFLAGS: -Werror | |
| run: | | |
| ./autogen.sh | |
| ./configure --with-crypto-backend=openssl | |
| make | |
| - name: Test | |
| run: | | |
| make check || (find . -name test-suite.log -exec cat {} \; && false) | |
| macos: | |
| name: macOS (${{ matrix.backend }}) | |
| runs-on: macos-14 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - backend: openssl | |
| extra-options: --with-openssl=$(brew --prefix openssl@1.1) | |
| - backend: botan | |
| extra-options: --with-botan=$(brew --prefix botan@2) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare | |
| run: | | |
| brew install automake libtool cppunit botan@2 | |
| - name: Build | |
| env: | |
| CXXFLAGS: -Werror -DBOTAN_NO_DEPRECATED_WARNINGS | |
| run: | | |
| ./autogen.sh | |
| ./configure --with-crypto-backend=${{ matrix.backend }} ${{ matrix.extra-options }} | |
| make | |
| - name: Test | |
| run: | | |
| make check || (find . -name test-suite.log -exec cat {} \; && false) | |
| windows: | |
| name: Windows (${{ matrix.arch }}, ${{ matrix.backend }}) | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x64 | |
| backend: openssl | |
| target-platform: x64 | |
| vcpkg-triplet: x64-windows | |
| build-options: | |
| - arch: x64 | |
| backend: botan | |
| target-platform: x64 | |
| vcpkg-triplet: x64-windows | |
| build-options: -DENABLE_ECC=OFF -DENABLE_EDDSA=OFF | |
| - arch: x86 | |
| backend: openssl | |
| target-platform: Win32 | |
| vcpkg-triplet: x86-windows | |
| build-options: -DENABLE_ECC=OFF -DENABLE_EDDSA=OFF | |
| env: | |
| VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg-triplet }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.arch }} | |
| - name: Setup vcpkg | |
| run: | | |
| git clone https://github.com/Microsoft/vcpkg.git | |
| cd vcpkg | |
| .\bootstrap-vcpkg.bat | |
| echo "VCPKG_ROOT=${{ github.workspace }}\vcpkg" >> $env:GITHUB_ENV | |
| - name: Create vcpkg.json | |
| run: | | |
| @' | |
| { | |
| "dependencies": [ "openssl", "botan", "cppunit" ], | |
| "overrides": [ | |
| { "name": "openssl", "version": "1.1.1n" } | |
| ] | |
| } | |
| '@ | Out-File -FilePath vcpkg.json -Encoding utf8 | |
| - name: Install dependencies | |
| run: | | |
| cd vcpkg | |
| .\vcpkg.exe install --triplet=${{ matrix.vcpkg-triplet }} | |
| working-directory: ${{ github.workspace }} | |
| - name: Configure | |
| run: | | |
| cmake -B build ` | |
| -A ${{ matrix.target-platform }} ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" ` | |
| -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg-triplet }} ` | |
| -DWITH_CRYPTO_BACKEND=${{ matrix.backend }} ` | |
| ${{ matrix.build-options }} ` | |
| -DDISABLE_NON_PAGED_MEMORY=ON ` | |
| -DBUILD_TESTS=ON | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Test | |
| env: | |
| CTEST_OUTPUT_ON_FAILURE: 1 | |
| run: cmake --build build --config Release --target RUN_TESTS |