Skip to content

Upgrade CapNProto from v0.9.1 to v1.0.2 #2575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/subtree_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
name="capnproto"
internal_path="libs/EXTERNAL/capnproto"
external_url="https://github.com/capnproto/capnproto.git"
default_external_ref="v0.9.1"/>
default_external_ref="v1.0.2"/>
<subtree
name="libinterchange"
internal_path="libs/EXTERNAL/libinterchange"
Expand Down
34 changes: 34 additions & 0 deletions libs/EXTERNAL/capnproto/.cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
env:
CIRRUS_CLONE_DEPTH: 1

freebsd_task:
matrix:
- name: FreeBSD 13.0 (GCC 10 from packages)
# RunCatchingExceptionsOtherException fails on 13.0 with system Clang
# 11.0 and ports Clang 10/11 as well, so GCC 10 is used instead.
freebsd_instance:
image_family: freebsd-13-0
preinstall_script:
# Stock clang11 fails some exception unit tests
pkg install -y gcc10
env:
CC: gcc10
CXX: g++10
- name: FreeBSD 12.2 (System Clang 10)
freebsd_instance:
image_family: freebsd-12-2
- name: FreeBSD 11.4 (System Clang 10)
freebsd_instance:
image_family: freebsd-11-4
install_script:
pkg install -y automake autoconf libtool
compiler_version_script:
${CXX:-"c++"} --version
autoreconf_script:
- cd c++ && autoreconf -i
configure_script:
- cd c++ && ./configure
build_script:
- make -C c++
test_script:
- make -C c++ check
116 changes: 90 additions & 26 deletions libs/EXTERNAL/capnproto/.github/workflows/quick-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,36 @@ on:
- 'release-*'

jobs:
Linux-musl:
runs-on: ubuntu-20.04
container: alpine:3.16.3
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: apk add autoconf automake bash build-base cmake libtool libucontext-dev linux-headers openssl-dev
- name: super-test
run: ./super-test.sh quick
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++-7, g++-10, clang-6.0, clang-10]
compiler: [g++-12, clang-14]
steps:
- uses: actions/checkout@v2
- name: install dependencies
Expand All @@ -26,7 +50,7 @@ jobs:
run: |
./super-test.sh quick ${{ matrix.compiler }}
Linux-lock-tracking:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand All @@ -42,6 +66,24 @@ jobs:
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:
Expand All @@ -59,13 +101,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['windows-2016', 'windows-latest']
os: ['windows-2019', 'windows-latest']
include:
- os: windows-2016
target: 'Visual Studio 15 2017'
- os: windows-2019
target: 'Visual Studio 16 2019'
arch: -A x64
- os: windows-latest
target: 'Visual Studio 16 2019'
target: 'Visual Studio 17 2022'
arch: -A x64
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -104,7 +146,7 @@ jobs:
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"
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"
Expand All @@ -113,27 +155,49 @@ jobs:

cd build-output\src
ctest -V -C debug
Cygwin:
runs-on: windows-latest
# 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:
- 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
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- name: install dependencies
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
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: |
C:\tools\cygwin\bin\bash -lc 'export PATH=/usr/local/bin:/usr/bin:/bin; cd /cygdrive/d/a/capnproto/capnproto; ./super-test.sh quick'
cd c++
bazel test --verbose_failures --test_output=errors //...
20 changes: 15 additions & 5 deletions libs/EXTERNAL/capnproto/.github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ on:

jobs:
Linux:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# We can only run extended tests with the default version of g++, because it has to match
# the verison of g++-multilib for 32-bit cross-compilation, and alternate versions of
# the version of g++-multilib for 32-bit cross-compilation, and alternate versions of
# g++-multilib generally aren't available. Clang is more lenient, but we might as well be
# consistent. The quick tests should be able to catch issues with older and newer compiler
# versions.
Expand Down Expand Up @@ -42,11 +42,21 @@ jobs:
run: |
./super-test.sh
MinGW-Wine:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
# See: https://github.com/actions/virtual-environments/issues/4589#issuecomment-1100899313
# GitHub's Ubuntu image installs all kinds of stuff from non-Ubuntu repositories which cause
# conflicts with Ubuntu packages ultimately preventing installation of wine32. Let's try to
# fix that...
- name: remove unwanted packages and repositories
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
Expand All @@ -61,7 +71,7 @@ jobs:
run: |
./super-test.sh mingw i686-w64-mingw32
cmake-packaging:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
Expand All @@ -83,7 +93,7 @@ jobs:
run: |
./super-test.sh cmake-package cmake-static
Android:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
Expand Down
8 changes: 8 additions & 0 deletions libs/EXTERNAL/capnproto/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# Ekam build artifacts.
/c++/tmp/
/c++/bin/
/c++/deps/

# setup-ekam.sh
/c++/.ekam
Expand Down Expand Up @@ -71,6 +72,13 @@
/c++/m4/ltversion.m4
/c++/m4/lt~obsolete.m4
/c++/samples/addressbook
/c++/.cache/

# editor artefacts
*~

# cross-compiling / glibc testing
/dockcross

# bazel output
bazel-*
4 changes: 3 additions & 1 deletion libs/EXTERNAL/capnproto/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cmake_minimum_required(VERSION 3.4...3.13) # ! This line is edited to get rid of a CMake deprecation error
cmake_minimum_required(VERSION 3.16)
project("Cap'n Proto Root" CXX)
include(CTest)

add_subdirectory(c++)
1 change: 1 addition & 0 deletions libs/EXTERNAL/capnproto/c++/.bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ekam-provider
26 changes: 26 additions & 0 deletions libs/EXTERNAL/capnproto/c++/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
common --enable_platform_specific_config

build:unix --cxxopt='-std=c++14' --host_cxxopt='-std=c++14' --force_pic --verbose_failures
build:unix --cxxopt='-Wall' --host_cxxopt='-Wall'
build:unix --cxxopt='-Wextra' --host_cxxopt='-Wextra'
build:unix --cxxopt='-Wno-strict-aliasing' --host_cxxopt='-Wno-strict-aliasing'
build:unix --cxxopt='-Wno-sign-compare' --host_cxxopt='-Wno-sign-compare'
build:unix --cxxopt='-Wno-unused-parameter' --host_cxxopt='-Wno-unused-parameter'

build:linux --config=unix
build:macos --config=unix

# See https://bazel.build/configure/windows#symlink
startup --windows_enable_symlinks
# We use LLVM's MSVC-compatible compiler driver to compile our code on Windows
# under Bazel. MSVC is natively supported when using CMake builds.
build:windows --compiler=clang-cl

build:windows --cxxopt='/std:c++14' --host_cxxopt='/std:c++14' --verbose_failures
build:windows --cxxopt='/wo4503' --host_cxxopt='/wo4503'
# The `/std:c++14` argument is unused during boringssl compilation and we don't
# want a warning when compiling each file.
build:windows --cxxopt='-Wno-unused-command-line-argument' --host_cxxopt='-Wno-unused-command-line-argument'

# build with ssl, zlib and bazel by default
build --//src/kj:openssl=True --//src/kj:zlib=True --//src/kj:brotli=True
1 change: 1 addition & 0 deletions libs/EXTERNAL/capnproto/c++/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.1.2
Empty file.
Loading
Loading