-
Notifications
You must be signed in to change notification settings - Fork 4
99 lines (87 loc) · 2.84 KB
/
Copy pathci.yml
File metadata and controls
99 lines (87 loc) · 2.84 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI
on:
push:
branches:
- main
- master
pull_request:
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Checkout picoquic
uses: actions/checkout@v5
with:
repository: private-octopus/picoquic
ref: master
path: third_party/picoquic
- name: Checkout picotls
uses: actions/checkout@v5
with:
repository: private-octopus/picotls
ref: master
path: third_party/picotls
submodules: recursive
- name: Show toolchain
shell: bash
run: |
cmake --version
if command -v c++ >/dev/null 2>&1; then c++ --version; fi
if command -v cl >/dev/null 2>&1; then cl; fi
- name: Set up Windows dependencies
if: runner.os == 'Windows'
shell: pwsh
run: |
# picotls requires pkg-config at configure time (even on Windows where
# brotli is absent); install the lightweight pkgconfiglite shim.
choco install pkgconfiglite --no-progress -y
$candidates = @(
"C:\Program Files\OpenSSL",
"C:\Program Files\OpenSSL-Win64",
"C:\OpenSSL-Win64"
)
$opensslFound = $false
foreach ($candidate in $candidates) {
if (Test-Path "$candidate\include\openssl\ssl.h") {
"OPENSSL_ROOT_DIR=$candidate" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Host "OpenSSL found at $candidate"
$opensslFound = $true
break
}
}
if (-not $opensslFound) {
choco install openssl --no-progress -y
foreach ($candidate in $candidates) {
if (Test-Path "$candidate\include\openssl\ssl.h") {
"OPENSSL_ROOT_DIR=$candidate" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Host "OpenSSL installed at $candidate"
break
}
}
}
- name: Configure
shell: bash
run: |
args=(
cmake -S . -B build
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
"-DOPENMOQ_PICOQUIC_SOURCE_DIR=${{ github.workspace }}/third_party/picoquic"
"-DOPENMOQ_PICOTLS_SOURCE_DIR=${{ github.workspace }}/third_party/picotls"
)
if [ -n "${OPENSSL_ROOT_DIR:-}" ]; then
args+=("-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}")
fi
"${args[@]}"
- name: Build
run: cmake --build build --parallel
- name: Test
run: ctest --test-dir build -C Debug --output-on-failure