Attempts to fix TLS errors (again) #31
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: C/C++ CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "Windows MSVC17 shared library" | |
os: windows-2022 | |
generator: -G "Visual Studio 17 2022" -A x64 | |
# don't use Debug to work around issue of FindOpenSSL.cmake which leaves us with | |
# -- Found OpenSSL: optimized;D:/a/sockpuppet/sockpuppet/build/external/libressl/install/lib/crypto.lib;debug;C:/Program Files/OpenSSL/lib/VC/libcrypto64MDd.lib (found version "2.0.0") | |
# which fails at link time | |
type: Release | |
- name: "Unix GCC shared library" | |
os: ubuntu-latest | |
generator: -G "Unix Makefiles" | |
type: Debug | |
- name: "OSX clang shared library" | |
os: macos-latest | |
generator: -G "Unix Makefiles" | |
type: Debug | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: cache externals restore | |
id: cache-externals-restore | |
uses: actions/cache/restore@v3 | |
with: | |
path: build/external/libressl/install | |
key: ${{ matrix.os }}-externals-${{ hashFiles('external/CMakeLists.txt') }} | |
- name: configure externals | |
if: steps.cache-externals-restore.outputs.cache-hit != 'true' | |
run: cmake -B build/external -S external ${{ matrix.generator }} -DCMAKE_BUILD_TYPE:STRING=${{ matrix.type }} | |
- name: build externals | |
if: steps.cache-externals-restore.outputs.cache-hit != 'true' | |
run: cmake --build build/external --config ${{ matrix.type }} | |
- name: cache externals save | |
id: cache-externals-save | |
uses: actions/cache/save@v3 | |
with: | |
path: build/external/libressl/install | |
key: ${{ steps.cache-externals-restore.outputs.cache-primary-key }} | |
- name: configure library | |
run: > | |
cmake -B build -S . ${{ matrix.generator }} | |
-DBUILD_SHARED_LIBS:BOOL=ON | |
-DWITH_TLS:BOOL=ON | |
-DOPENSSL_ROOT_DIR:PATH=build/external/libressl/install | |
-DCMAKE_BUILD_TYPE:STRING=${{ matrix.type }} | |
- name: build library | |
run: cmake --build build --config ${{ matrix.type }} | |
- name: build & run tests | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
run: cmake --build build --target run_tests --config ${{ matrix.type }} |