Repository navigation
42 lines (42 loc) · 1.85 KB
/
Copy pathci.yml
File metadata and controls
42 lines (42 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: build
on: [push, pull_request]
jobs:
unix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
config: [Debug, Release]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install OpenSSL
shell: bash
run: |
if [ "$RUNNER_OS" = Linux ]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
brew install openssl@3
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
- run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DVAULT_BUILD_EXAMPLES=ON -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR"
- run: cmake --build build --parallel
- run: ctest --test-dir build --output-on-failure --parallel 2
- run: cmake --install build --prefix "${{ runner.temp }}/vault-install"
- run: cmake -S test/consumer -B consumer-build -DCMAKE_PREFIX_PATH="${{ runner.temp }}/vault-install" -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR"
- run: cmake --build consumer-build --parallel
- run: ./consumer-build/consumer "${{ runner.temp }}/consumer.vault"
sanitizers:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: brew install openssl@3
- run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DVAULT_ENABLE_SANITIZERS=ON -DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)"
- run: cmake --build build --parallel
- run: ctest --test-dir build --output-on-failure
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: vcpkg install openssl:x64-windows
- run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVAULT_BUILD_EXAMPLES=ON
- run: cmake --build build --config Release --parallel
- run: ctest --test-dir build -C Release --output-on-failure