forked from capnproto/capnproto
-
Notifications
You must be signed in to change notification settings - Fork 0
207 lines (200 loc) · 7.91 KB
/
quick-test.yml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
name: Quick Tests
on:
pull_request:
paths-ignore:
- 'doc/**'
push:
branches:
- master
- 'release-*'
jobs:
Linux-musl:
runs-on: ubuntu-20.04
# We depend on both clang and libc++. Alpine Linux 3.17 seems to be the first version to include
# a libc++ package (based on LLVM 15), but building capnproto failed when I tried it.
# Alpine Linux 3.18's libc++ package is from LLVM 16, however, and worked out-of-the-box, so
# Clang 16 appears to be the earliest Clang version we can run easily on Alpine Linux.
container: alpine:3.18.2
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: apk add autoconf automake bash build-base cmake libtool libucontext-dev linux-headers openssl-dev clang16 libc++-dev
- name: super-test
run: ./super-test.sh quick clang-16
Linux-old:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
compiler: [g++-7, clang-6.0]
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }}
- name: super-test
run: |
./super-test.sh quick ${{ matrix.compiler }}
Linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [g++-12, clang-14]
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }}
- name: super-test
run: |
./super-test.sh quick ${{ matrix.compiler }}
Linux-lock-tracking:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
compiler: [clang-9]
features: ["-DKJ_TRACK_LOCK_BLOCKING=1 -DKJ_SAVE_ACQUIRED_LOCK_INFO=1 -DKJ_CONTENTION_WARNING_THRESHOLD=200"]
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }}
- name: super-test
run: |
# librt is used for timer_create in the unit tests for lock tracking (mutex-test.c++).
./super-test.sh quick ${{ matrix.compiler }} cpp-features "${{matrix.features}}" extra-libs "-lrt"
ManyLinux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- cross-compiler: manylinux2014-x64
- cross-compiler: manylinux2014-x86
docker-run-args: --platform linux/386
steps:
- uses: actions/checkout@v2
- name: install dockcross
run: |
docker run ${{ matrix.docker-run-args }} --rm dockcross/${{ matrix.cross-compiler }} > ./dockcross
chmod +x ./dockcross
- name: super-test
run: |
./dockcross ./super-test.sh quick g++
MacOS:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
brew install autoconf automake libtool pkg-config
- name: super-test
run: |
./super-test.sh quick
MSVC:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['windows-2019', 'windows-latest']
include:
- os: windows-2019
target: 'Visual Studio 16 2019'
arch: -A x64
- os: windows-latest
target: 'Visual Studio 17 2022'
arch: -A x64
steps:
- uses: actions/checkout@v2
- name: Include $CONDA in $PATH
run: |
echo "$Env:CONDA\condabin" >> $env:GITHUB_PATH
- name: Install dependencies via Conda
run: |
conda update -n base -c defaults -q conda
conda install -n base -c defaults -q ninja openssl zlib
- name: Build and test
shell: cmd
run: |
echo "Activate conda base environment"
call activate base
echo "Building Cap'n Proto with ${{ matrix.target }}"
cmake -Hc++ -Bbuild-output ${{ matrix.arch }} -G "${{ matrix.target }}" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX=%CD%\capnproto-c++-install
cmake --build build-output --config debug --target install
echo "Building Cap'n Proto samples with ${{ matrix.target }}"
cmake -Hc++/samples -Bbuild-output-samples ${{ matrix.arch }} -G "${{ matrix.target }}" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH=%CD%\capnproto-c++-install
cmake --build build-output-samples --config debug
cd build-output\src
ctest -V -C debug
MinGW:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Build and test
shell: cmd
run: |
echo "Deleting broken Postgres install until https://github.com/actions/virtual-environments/issues/1089 is fixed..."
rmdir /s /q C:\PROGRA~1\POSTGR~1
echo "Building Cap'n Proto with MinGW"
cmake -Hc++ -Bbuild-output -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=%CD%\capnproto-c++-install -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DCMAKE_CXX_STANDARD_LIBRARIES="-static-libgcc -static-libstdc++"
cmake --build build-output --target install -- -j2
echo "Building Cap'n Proto samples with MinGW"
cmake -Hc++/samples -Bbuild-output-samples -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH=%CD%\capnproto-c++-install -DCMAKE_SH="CMAKE_SH-NOTFOUND"
cmake --build build-output-samples
cd build-output\src
ctest -V -C debug
# Cygwin:
# runs-on: windows-latest
# strategy:
# fail-fast: false
# steps:
# - run: git config --global core.autocrlf false
# - uses: actions/checkout@v2
# # TODO(someday): If we could cache the Cygwin installation we wouldn't have to spend three
# # minutes installing it for every build. Unfortuntaley, actions/cache@v1 does not preserve
# # DOS file attributes, which corrupts the Cygwin install. In particular, Cygwin marks
# # symlinks with the "DOS SYSTEM" attribute. We could cache just the downloaded packages,
# # but it turns out that only saves a couple seconds; most of the time is spend unpacking.
# - name: Install Cygwin
# run: |
# choco config get cacheLocation
# choco install --no-progress cygwin
# - name: Install Cygwin additional packages
# shell: cmd
# run: |
# C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -l C:/tools/cygwin/packages -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,automake,libtool,gcc,gcc-g++,binutils,libssl-devel,make,zlib-devel,pkg-config,cmake,xxd
# - name: Build and test
# shell: cmd
# run: |
# C:\tools\cygwin\bin\bash -lc 'export PATH=/usr/local/bin:/usr/bin:/bin; cd /cygdrive/d/a/capnproto/capnproto; ./super-test.sh quick'
Linux-bazel-clang:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
clang_version: [16]
steps:
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y build-essential git
# todo: replace with apt-get when clang-16 is part of ubuntu lts
- name: install clang
uses: egor-tensin/setup-clang@v1
with:
version: ${{ matrix.clang_version }}
- name: super-test
run: |
cd c++
bazel test --verbose_failures --test_output=errors //...