Skip to content

Commit bcabca6

Browse files
Upgrading CapNProto to the most recent version.
capnproto: Adding libs/EXTERNAL/capnproto/ as an external git subtree from https://github.com/capnproto/capnproto.git v1.0.2
2 parents 73e711d + fb203c8 commit bcabca6

File tree

491 files changed

+228268
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

491 files changed

+228268
-0
lines changed

libs/EXTERNAL/capnproto/.cirrus.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
env:
2+
CIRRUS_CLONE_DEPTH: 1
3+
4+
freebsd_task:
5+
matrix:
6+
- name: FreeBSD 13.0 (GCC 10 from packages)
7+
# RunCatchingExceptionsOtherException fails on 13.0 with system Clang
8+
# 11.0 and ports Clang 10/11 as well, so GCC 10 is used instead.
9+
freebsd_instance:
10+
image_family: freebsd-13-0
11+
preinstall_script:
12+
# Stock clang11 fails some exception unit tests
13+
pkg install -y gcc10
14+
env:
15+
CC: gcc10
16+
CXX: g++10
17+
- name: FreeBSD 12.2 (System Clang 10)
18+
freebsd_instance:
19+
image_family: freebsd-12-2
20+
- name: FreeBSD 11.4 (System Clang 10)
21+
freebsd_instance:
22+
image_family: freebsd-11-4
23+
install_script:
24+
pkg install -y automake autoconf libtool
25+
compiler_version_script:
26+
${CXX:-"c++"} --version
27+
autoreconf_script:
28+
- cd c++ && autoreconf -i
29+
configure_script:
30+
- cd c++ && ./configure
31+
build_script:
32+
- make -C c++
33+
test_script:
34+
- make -C c++ check
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
name: Quick Tests
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- 'doc/**'
7+
push:
8+
branches:
9+
- master
10+
- 'release-*'
11+
12+
jobs:
13+
Linux-musl:
14+
runs-on: ubuntu-20.04
15+
container: alpine:3.16.3
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: install dependencies
19+
run: apk add autoconf automake bash build-base cmake libtool libucontext-dev linux-headers openssl-dev
20+
- name: super-test
21+
run: ./super-test.sh quick
22+
Linux-old:
23+
runs-on: ubuntu-20.04
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
compiler: [g++-7, clang-6.0]
28+
steps:
29+
- uses: actions/checkout@v2
30+
- name: install dependencies
31+
run: |
32+
export DEBIAN_FRONTEND=noninteractive
33+
sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }}
34+
- name: super-test
35+
run: |
36+
./super-test.sh quick ${{ matrix.compiler }}
37+
Linux:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
compiler: [g++-12, clang-14]
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: install dependencies
46+
run: |
47+
export DEBIAN_FRONTEND=noninteractive
48+
sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }}
49+
- name: super-test
50+
run: |
51+
./super-test.sh quick ${{ matrix.compiler }}
52+
Linux-lock-tracking:
53+
runs-on: ubuntu-20.04
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
compiler: [clang-9]
58+
features: ["-DKJ_TRACK_LOCK_BLOCKING=1 -DKJ_SAVE_ACQUIRED_LOCK_INFO=1 -DKJ_CONTENTION_WARNING_THRESHOLD=200"]
59+
steps:
60+
- uses: actions/checkout@v2
61+
- name: install dependencies
62+
run: |
63+
export DEBIAN_FRONTEND=noninteractive
64+
sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }}
65+
- name: super-test
66+
run: |
67+
# librt is used for timer_create in the unit tests for lock tracking (mutex-test.c++).
68+
./super-test.sh quick ${{ matrix.compiler }} cpp-features "${{matrix.features}}" extra-libs "-lrt"
69+
ManyLinux:
70+
runs-on: ubuntu-20.04
71+
strategy:
72+
fail-fast: false
73+
matrix:
74+
include:
75+
- cross-compiler: manylinux2014-x64
76+
- cross-compiler: manylinux2014-x86
77+
docker-run-args: --platform linux/386
78+
steps:
79+
- uses: actions/checkout@v2
80+
- name: install dockcross
81+
run: |
82+
docker run ${{ matrix.docker-run-args }} --rm dockcross/${{ matrix.cross-compiler }} > ./dockcross
83+
chmod +x ./dockcross
84+
- name: super-test
85+
run: |
86+
./dockcross ./super-test.sh quick g++
87+
MacOS:
88+
runs-on: macos-latest
89+
strategy:
90+
fail-fast: false
91+
steps:
92+
- uses: actions/checkout@v2
93+
- name: install dependencies
94+
run: |
95+
brew install autoconf automake libtool pkg-config
96+
- name: super-test
97+
run: |
98+
./super-test.sh quick
99+
MSVC:
100+
runs-on: ${{ matrix.os }}
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
os: ['windows-2019', 'windows-latest']
105+
include:
106+
- os: windows-2019
107+
target: 'Visual Studio 16 2019'
108+
arch: -A x64
109+
- os: windows-latest
110+
target: 'Visual Studio 17 2022'
111+
arch: -A x64
112+
steps:
113+
- uses: actions/checkout@v2
114+
- name: Include $CONDA in $PATH
115+
run: |
116+
echo "$Env:CONDA\condabin" >> $env:GITHUB_PATH
117+
- name: Install dependencies via Conda
118+
run: |
119+
conda update -n base -c defaults -q conda
120+
conda install -n base -c defaults -q ninja openssl zlib
121+
- name: Build and test
122+
shell: cmd
123+
run: |
124+
echo "Activate conda base environment"
125+
call activate base
126+
echo "Building Cap'n Proto with ${{ matrix.target }}"
127+
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
128+
cmake --build build-output --config debug --target install
129+
130+
echo "Building Cap'n Proto samples with ${{ matrix.target }}"
131+
cmake -Hc++/samples -Bbuild-output-samples ${{ matrix.arch }} -G "${{ matrix.target }}" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH=%CD%\capnproto-c++-install
132+
cmake --build build-output-samples --config debug
133+
134+
cd build-output\src
135+
ctest -V -C debug
136+
MinGW:
137+
runs-on: windows-latest
138+
strategy:
139+
fail-fast: false
140+
steps:
141+
- uses: actions/checkout@v2
142+
- name: Build and test
143+
shell: cmd
144+
run: |
145+
echo "Deleting broken Postgres install until https://github.com/actions/virtual-environments/issues/1089 is fixed..."
146+
rmdir /s /q C:\PROGRA~1\POSTGR~1
147+
148+
echo "Building Cap'n Proto with MinGW"
149+
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++"
150+
cmake --build build-output --target install -- -j2
151+
152+
echo "Building Cap'n Proto samples with MinGW"
153+
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"
154+
cmake --build build-output-samples
155+
156+
cd build-output\src
157+
ctest -V -C debug
158+
# Cygwin:
159+
# runs-on: windows-latest
160+
# strategy:
161+
# fail-fast: false
162+
# steps:
163+
# - run: git config --global core.autocrlf false
164+
# - uses: actions/checkout@v2
165+
# # TODO(someday): If we could cache the Cygwin installation we wouldn't have to spend three
166+
# # minutes installing it for every build. Unfortuntaley, actions/cache@v1 does not preserve
167+
# # DOS file attributes, which corrupts the Cygwin install. In particular, Cygwin marks
168+
# # symlinks with the "DOS SYSTEM" attribute. We could cache just the downloaded packages,
169+
# # but it turns out that only saves a couple seconds; most of the time is spend unpacking.
170+
# - name: Install Cygwin
171+
# run: |
172+
# choco config get cacheLocation
173+
# choco install --no-progress cygwin
174+
# - name: Install Cygwin additional packages
175+
# shell: cmd
176+
# run: |
177+
# 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
178+
# - name: Build and test
179+
# shell: cmd
180+
# run: |
181+
# C:\tools\cygwin\bin\bash -lc 'export PATH=/usr/local/bin:/usr/bin:/bin; cd /cygdrive/d/a/capnproto/capnproto; ./super-test.sh quick'
182+
Linux-bazel-clang:
183+
runs-on: ubuntu-20.04
184+
strategy:
185+
fail-fast: false
186+
matrix:
187+
clang_version: [16]
188+
steps:
189+
- uses: actions/checkout@v3
190+
- uses: bazelbuild/setup-bazelisk@v2
191+
- name: install dependencies
192+
run: |
193+
export DEBIAN_FRONTEND=noninteractive
194+
sudo apt-get install -y build-essential git
195+
# todo: replace with apt-get when clang-16 is part of ubuntu lts
196+
- name: install clang
197+
uses: egor-tensin/setup-clang@v1
198+
with:
199+
version: ${{ matrix.clang_version }}
200+
- name: super-test
201+
run: |
202+
cd c++
203+
bazel test --verbose_failures --test_output=errors //...
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Release Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 'release-*'
8+
- 'fix-release*'
9+
10+
jobs:
11+
Linux:
12+
runs-on: ubuntu-20.04
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
# We can only run extended tests with the default version of g++, because it has to match
17+
# the version of g++-multilib for 32-bit cross-compilation, and alternate versions of
18+
# g++-multilib generally aren't available. Clang is more lenient, but we might as well be
19+
# consistent. The quick tests should be able to catch issues with older and newer compiler
20+
# versions.
21+
compiler: [g++, clang]
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: install dependencies
25+
run: |
26+
export DEBIAN_FRONTEND=noninteractive
27+
sudo apt-get update
28+
sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev valgrind gcc-multilib g++-multilib ${{ matrix.compiler }}
29+
- name: super-test
30+
run: |
31+
./super-test.sh ${{ matrix.compiler }}
32+
MacOS:
33+
runs-on: macos-latest
34+
strategy:
35+
fail-fast: false
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: install dependencies
39+
run: |
40+
brew install autoconf automake libtool pkg-config
41+
- name: super-test
42+
run: |
43+
./super-test.sh
44+
MinGW-Wine:
45+
runs-on: ubuntu-20.04
46+
strategy:
47+
fail-fast: false
48+
steps:
49+
- uses: actions/checkout@v2
50+
# See: https://github.com/actions/virtual-environments/issues/4589#issuecomment-1100899313
51+
# GitHub's Ubuntu image installs all kinds of stuff from non-Ubuntu repositories which cause
52+
# conflicts with Ubuntu packages ultimately preventing installation of wine32. Let's try to
53+
# fix that...
54+
- name: remove unwanted packages and repositories
55+
run: |
56+
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
57+
sudo apt-get update -qq
58+
sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
59+
sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
60+
- name: install dependencies
61+
run: |
62+
export DEBIAN_FRONTEND=noninteractive
63+
sudo dpkg --add-architecture i386
64+
sudo apt-get update
65+
sudo apt-get install -y build-essential git cmake mingw-w64 wine-stable wine64 wine32 wine-binfmt
66+
sudo update-binfmts --import wine
67+
- name: 64-bit Build and Test
68+
run: |
69+
./super-test.sh mingw x86_64-w64-mingw32
70+
- name: 32-bit Build and Test
71+
run: |
72+
./super-test.sh mingw i686-w64-mingw32
73+
cmake-packaging:
74+
runs-on: ubuntu-20.04
75+
strategy:
76+
fail-fast: false
77+
steps:
78+
- uses: actions/checkout@v2
79+
- name: install dependencies
80+
run: |
81+
export DEBIAN_FRONTEND=noninteractive
82+
sudo apt-get install -y build-essential git cmake
83+
- name: autotools-shared
84+
run: |
85+
./super-test.sh cmake-package autotools-shared
86+
- name: autotools-static
87+
run: |
88+
./super-test.sh cmake-package autotools-static
89+
- name: cmake-shared
90+
run: |
91+
./super-test.sh cmake-package cmake-shared
92+
- name: cmake-static
93+
run: |
94+
./super-test.sh cmake-package cmake-static
95+
Android:
96+
runs-on: ubuntu-20.04
97+
strategy:
98+
fail-fast: false
99+
steps:
100+
- uses: actions/checkout@v2
101+
- name: install dependencies
102+
run: |
103+
export DEBIAN_FRONTEND=noninteractive
104+
sudo apt-get install -y build-essential git
105+
- name: fetch Android tools
106+
if: steps.cache-android-sdk.outputs.cache-hit != 'true'
107+
run: |
108+
# The installed Android SDK is broken.
109+
unset ANDROID_SDK_ROOT
110+
unset ANDROID_HOME
111+
112+
mkdir android-sdk
113+
cd android-sdk
114+
curl -o commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip
115+
unzip commandlinetools.zip
116+
(yes || true) | tools/bin/sdkmanager --sdk_root=$PWD platform-tools 'platforms;android-25' 'system-images;android-25;google_apis;armeabi-v7a' emulator 'build-tools;25.0.2' ndk-bundle
117+
- name: 32-bit Build and Test
118+
run: |
119+
# The installed Android SDK is broken.
120+
unset ANDROID_SDK_ROOT
121+
unset ANDROID_HOME
122+
123+
echo | android-sdk/tools/bin/avdmanager create avd -n capnp -k 'system-images;android-25;google_apis;armeabi-v7a' -b google_apis/armeabi-v7a
124+
125+
# avdmanager seems to set image.sysdir.1 incorrectly in the AVD's config.ini, which
126+
# causes the emulator to fail. I don't know why. I don't know how to fix it, other than
127+
# to patch the config like so.
128+
sed -i -re 's,^image\.sysdir\.1=android-sdk/,image.sysdir.1=,g' $HOME/.android/avd/capnp.avd/config.ini
129+
130+
./super-test.sh android $PWD/android-sdk arm-linux-androideabi armv7a-linux-androideabi24

0 commit comments

Comments
 (0)