Skip to content

Update capnproto library to v0.9.1 #2065

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 4 commits into from
Jun 15, 2022
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.7.0"/>
default_external_ref="v0.9.1"/>
<subtree
name="libyosys"
internal_path="libs/EXTERNAL/libyosys"
Expand Down
139 changes: 139 additions & 0 deletions libs/EXTERNAL/capnproto/.github/workflows/quick-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Quick Tests

on:
pull_request:
paths-ignore:
- 'doc/**'
push:
branches:
- master
- 'release-*'

jobs:
Linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [g++-7, g++-10, clang-6.0, clang-10]
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-latest
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"
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-2016', 'windows-latest']
include:
- os: windows-2016
target: 'Visual Studio 15 2017'
arch: -A x64
- os: windows-latest
target: 'Visual Studio 16 2019'
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"
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'
120 changes: 120 additions & 0 deletions libs/EXTERNAL/capnproto/.github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Release Tests

on:
push:
branches:
- master
- 'release-*'
- 'fix-release*'

jobs:
Linux:
runs-on: ubuntu-latest
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
# 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.
compiler: [g++, clang]
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev valgrind gcc-multilib g++-multilib ${{ matrix.compiler }}
- name: super-test
run: |
./super-test.sh ${{ matrix.compiler }}
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
MinGW-Wine:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y build-essential git cmake mingw-w64 wine-stable wine64 wine32 wine-binfmt
sudo update-binfmts --import wine
- name: 64-bit Build and Test
run: |
./super-test.sh mingw x86_64-w64-mingw32
- name: 32-bit Build and Test
run: |
./super-test.sh mingw i686-w64-mingw32
cmake-packaging:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y build-essential git cmake
- name: autotools-shared
run: |
./super-test.sh cmake-package autotools-shared
- name: autotools-static
run: |
./super-test.sh cmake-package autotools-static
- name: cmake-shared
run: |
./super-test.sh cmake-package cmake-shared
- name: cmake-static
run: |
./super-test.sh cmake-package cmake-static
Android:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y build-essential git
- name: fetch Android tools
if: steps.cache-android-sdk.outputs.cache-hit != 'true'
run: |
# The installed Android SDK is broken.
unset ANDROID_SDK_ROOT
unset ANDROID_HOME

mkdir android-sdk
cd android-sdk
curl -o commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip
unzip commandlinetools.zip
(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
- name: 32-bit Build and Test
run: |
# The installed Android SDK is broken.
unset ANDROID_SDK_ROOT
unset ANDROID_HOME

echo | android-sdk/tools/bin/avdmanager create avd -n capnp -k 'system-images;android-25;google_apis;armeabi-v7a' -b google_apis/armeabi-v7a

# avdmanager seems to set image.sysdir.1 incorrectly in the AVD's config.ini, which
# causes the emulator to fail. I don't know why. I don't know how to fix it, other than
# to patch the config like so.
sed -i -re 's,^image\.sysdir\.1=android-sdk/,image.sysdir.1=,g' $HOME/.android/avd/capnp.avd/config.ini

./super-test.sh android $PWD/android-sdk arm-linux-androideabi armv7a-linux-androideabi24
77 changes: 0 additions & 77 deletions libs/EXTERNAL/capnproto/.travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion libs/EXTERNAL/capnproto/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.4)
project("Cap'n Proto Root" CXX)
add_subdirectory(c++)
7 changes: 4 additions & 3 deletions libs/EXTERNAL/capnproto/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Unix: [![Unix Build Status](https://travis-ci.org/capnproto/capnproto.svg?branch=master)](https://travis-ci.org/capnproto/capnproto) Windows: [![Windows Build Status](https://ci.appveyor.com/api/projects/status/9rxff2tujkae4hte?svg=true)](https://ci.appveyor.com/project/kentonv/capnproto)
[![Quick Tests](https://github.com/capnproto/capnproto/workflows/Quick%20Tests/badge.svg?branch=master&event=push)](https://github.com/capnproto/capnproto/actions?query=workflow%3A%22Quick+Tests%22)
[![Release Tests](https://github.com/capnproto/capnproto/workflows/Release%20Tests/badge.svg?branch=master&event=push)](https://github.com/capnproto/capnproto/actions?query=workflow%3A%22Release+Tests%22)

<img src='http://kentonv.github.com/capnproto/images/infinity-times-faster.png' style='width:334px; height:306px; float: right;'>
<img src='http://kentonv.github.io/capnproto/images/infinity-times-faster.png' style='width:334px; height:306px; float: right;'>

Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think
JSON, except binary. Or think [Protocol Buffers](https://github.com/google/protobuf), except faster.
In fact, in benchmarks, Cap'n Proto is INFINITY TIMES faster than Protocol Buffers.

[Read more...](http://kentonv.github.com/capnproto/)
[Read more...](http://kentonv.github.io/capnproto/)
Loading