Skip to content

support custom allocators (like uv_replace_allocator()) #916

support custom allocators (like uv_replace_allocator())

support custom allocators (like uv_replace_allocator()) #916

Workflow file for this run

name: C/C++ CI
on:
workflow_dispatch:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macOS, windows]
tls: [ openssl, mbedtls ]
steps:
- name: Install tools
if: matrix.os == 'ubuntu'
run: |
sudo apt update
sudo apt install -y valgrind softhsm
- name: Install tools
if: matrix.os == 'macOS'
run: |
brew install pkg-config softhsm
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: '53bef8994c541b6561884a8395ea35715ece75db'
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v4
with:
go-version: ~1.20
- name: build test server
run: |
cd ./tests/test_server
go build -o ${{ github.workspace }}/build/ .
- name: start test server
if: matrix.os != 'windows'
run: |
${{ github.workspace }}/build/test-server -ca-key ./tests/certs/ca.key -ca ./tests/certs/ca.pem &
- name: start test server
if: matrix.os == 'windows'
run: |
Start-Process -FilePath ${{ github.workspace }}/build/test-server -ArgumentList "-ca-key","./tests/certs/ca.key","-ca","./tests/certs/ca.pem"
- uses: lukka/run-cmake@v10
name: Build and Test
with:
configurePreset: ci-${{ matrix.os }}
configurePresetAdditionalArgs: "[ `-DTLSUV_TLSLIB=${{ matrix.tls }}`, `-DVCPKG_MANIFEST_FEATURES='test;samples;${{ matrix.tls }}'` ]"
buildPreset: ci-${{ matrix.os }}
testPreset: ci-${{ matrix.os }}
testPresetAdditionalArgs: "[ `--output-on-failure`, `--no-compress-output` ]"
- name: Memory Check
uses: lukka/run-cmake@v10
if: always() && matrix.os == 'ubuntu'
with:
configurePreset: ci-${{ matrix.os }}
configurePresetAdditionalArgs: "[ `-DTLSUV_TLSLIB=${{ matrix.tls }}`,`-DVCPKG_MANIFEST_FEATURES='${{ matrix.tls }};test;samples'` ]"
buildPreset: ci-${{ matrix.os }}
testPreset: ci-${{ matrix.os }}
testPresetAdditionalArgs: "[ `--test-dir`, `${{ github.workspace }}/build`, `--output-on-failure`, `--no-compress-output`, `-T`, `MemCheck` ]"
- name: upload test report
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.tls }}-TestReport
path: ${{ github.workspace }}/build/Testing/