load system CA on android from proper location #1028
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: C/C++ CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: ${{ matrix.target }}-${{ matrix.tls }} | |
runs-on: ${{ matrix.image }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: ubuntu | |
tls: openssl | |
target: x64-linux | |
- image: ubuntu | |
tls: mbedtls | |
target: x64-linux | |
- image: macOS | |
tls: openssl | |
target: arm64-osx | |
- image: macOS | |
tls: mbedtls | |
target: arm64-osx | |
- image: windows | |
tls: openssl | |
target: x64-windows-static-md | |
- image: windows | |
tls: openssl | |
target: x64-mingw-static | |
- image: windows | |
tls: mbedtls | |
target: x64-windows-static-md | |
steps: | |
- name: Install tools | |
if: matrix.image == 'ubuntu' | |
run: | | |
sudo apt update | |
sudo apt install -y valgrind softhsm | |
- name: Install tools | |
if: matrix.image == 'macOS' | |
run: | | |
brew install pkg-config softhsm | |
- name: Add msbuild to PATH | |
if: matrix.image == 'windows' | |
uses: microsoft/setup-msbuild@v2 | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- uses: lukka/get-cmake@latest | |
- name: Cache ${{ matrix.target }} deps | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
save-always: 'true' | |
path: vcpkg/packages | |
key: dependencies-${{ matrix.target }}-${{ hashFiles('./vcpkg.json') }} | |
- uses: lukka/run-vcpkg@v11 | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target }} | |
with: | |
doNotCache: true | |
runVcpkgInstall: true | |
runVcpkgFormatString: '[`install`, `--x-install-root`, `$[env.VCPKG_INSTALLED_DIR]`, `--x-feature=all-deps`]' | |
- uses: lukka/run-cmake@v10 | |
name: Configure build | |
with: | |
configurePreset: ${{ matrix.target }} | |
configurePresetAdditionalArgs: "[ `-DTLSUV_TLSLIB=${{ matrix.tls }}`, `-DVCPKG_MANIFEST_FEATURES='test;samples;${{ matrix.tls }}'` ]" | |
- name: Build | |
id: build | |
run: | | |
cmake --build build | |
- name: Setup Golang with cache | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: tests/test_server/go.mod | |
cache-dependency-path: tests/test_server/go.sum | |
- name: build test server | |
run: | | |
cd ./tests/test_server | |
go build -o ${{ github.workspace }}/build/ . | |
- name: start test server | |
if: matrix.image != 'windows' | |
run: | | |
${{ github.workspace }}/build/test-server -ca-key ./tests/certs/ca.key -ca ./tests/certs/ca.pem & | |
- name: start test server | |
if: matrix.image == 'windows' | |
run: | | |
Start-Process -FilePath ${{ github.workspace }}/build/test-server -ArgumentList "-ca-key","./tests/certs/ca.key","-ca","./tests/certs/ca.pem" | |
- name: Test | |
env: | |
TLSUV_TEST_LOG: 7 | |
if: steps.build.outcome == 'success' | |
run: | | |
cd build | |
ctest --output-on-failure --no-compress-output -T test | |
- name: Memory Check | |
if: steps.build.outcome == 'success' && matrix.image == 'ubuntu' | |
env: | |
TLSUV_TEST_LOG: 7 | |
run: | | |
cd build | |
ctest --output-on-failure --no-compress-output -T memcheck | |
- name: upload test summary | |
if: always() | |
uses: mikepenz/action-junit-report@v4 | |
with: | |
detailed_summary: 'true' | |
report_paths: ${{ github.workspace }}/build/**/TEST-*.xml | |
- name: upload test report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.target }}-${{ matrix.tls }}-TestReport | |
path: ${{ github.workspace }}/build/Testing/ |