-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: bundle msgpack to fix nix-build (#450)
* Revert msgpack submodule * Bundle msgpack to avoid issues with submodules
- Loading branch information
Showing
852 changed files
with
119,246 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule msgpack-c
deleted from
1c90fb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
|
||
usage() | ||
{ | ||
cat <<EOL | ||
-b - 32-bit or 64-bit library, maybe 32, 64 or both | ||
-t - the toolset, maybe gcc, clang or both | ||
-p - installation prefix | ||
EOL | ||
} | ||
|
||
build_boost() | ||
{ | ||
./b2 \ | ||
--toolset=$1 \ | ||
--prefix=$3/$2 \ | ||
--with-test \ | ||
--with-headers \ | ||
--with-chrono \ | ||
--with-context \ | ||
--with-filesystem \ | ||
--with-system \ | ||
--with-timer \ | ||
address-model=$2 \ | ||
install || exit 1 | ||
} | ||
|
||
bit="64" | ||
toolset="gcc" | ||
prefix="$HOME/boost-prefix" | ||
|
||
while getopts "b:t:p:" c; do | ||
case "$c" in | ||
b) | ||
bit="$OPTARG" | ||
[ "$bit" != "32" ] && [ "$bit" != "64" ] && [ "$bit" != "both" ] && usage && exit 1 | ||
;; | ||
t) | ||
toolset="$OPTARG" | ||
[ "$toolset" != "gcc" ] && [ "$toolset" != "clang" ] && [ "$toolset" != "both" ] && usage && exit 1 | ||
;; | ||
p) | ||
prefix="$OPTARG" | ||
;; | ||
?*) | ||
echo "invalid arguments." && exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
mkdir $prefix || exit 1 | ||
wget https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2 || exit 1 | ||
tar xf boost_1_76_0.tar.bz2 || exit 1 | ||
cd boost_1_76_0 | ||
./bootstrap.sh || exit 1 | ||
|
||
build() | ||
{ | ||
if [ "$bit" = "both" ]; then | ||
build_boost $1 32 $prefix | ||
build_boost $1 64 $prefix | ||
else | ||
build_boost $1 $bit $prefix | ||
fi | ||
} | ||
|
||
if [ "$toolset" = "both" ]; then | ||
build gcc | ||
build clang | ||
else | ||
build $toolset | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
usage() | ||
{ | ||
cat <<EOL | ||
-b - 32-bit or 64-bit library, maybe 32 or 64 | ||
-p - installation prefix | ||
EOL | ||
} | ||
|
||
bit="64" | ||
prefix="$HOME/zlib-prefix" | ||
|
||
while getopts "b:t:p:" c; do | ||
case "$c" in | ||
b) | ||
bit="$OPTARG" | ||
[ "$bit" != "32" ] && [ "$bit" != "64" ] && [ "$bit" != "both" ] && usage && exit 1 | ||
;; | ||
p) | ||
prefix="$OPTARG" | ||
;; | ||
?*) | ||
echo "invalid arguments." && exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
mkdir $prefix || exit 1 | ||
wget https://zlib.net/zlib-1.2.13.tar.gz || exit 1 | ||
tar -xf zlib-1.2.13.tar.gz || exit 1 | ||
cd zlib-1.2.13 | ||
|
||
build() | ||
{ | ||
cmake \ | ||
-D CMAKE_BUILD_TYPE=Release \ | ||
-D CMAKE_INSTALL_PREFIX=$2/$1 \ | ||
-D CMAKE_C_FLAGS="-m$1" \ | ||
-D CMAKE_SHARED_LINKER_FLAGS="-m$1" \ | ||
-B build$1 \ | ||
-S . | ||
cmake --build build$1 --target install | ||
} | ||
|
||
if [ "$bit" = "both" ]; then | ||
build 32 $prefix | ||
build 64 $prefix | ||
else | ||
build $bit $prefix | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: coverage | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
push: | ||
branches: | ||
- cpp_master | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
codecov: | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install build dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install g++-10 cmake lcov -y | ||
./ci/set_gcc_10.sh | ||
- name: Cache boost | ||
id: cache-boost | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/boost-prefix/ | ||
key: ${{ runner.os }}-boost-64-1-76-0-2021-08-09 | ||
|
||
- name: Build boost | ||
if: steps.cache-boost.outputs.cache-hit != 'true' | ||
run: ./.github/depends/boost.sh -b 64 -t gcc -p $HOME/boost-prefix | ||
|
||
- name: Cache zlib | ||
id: cache-zlib | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/zlib-prefix/ | ||
key: ${{ runner.os }}-zlib-64-1-2-11-2021-08-09 | ||
|
||
- name: Build zlib | ||
if: steps.cache-zlib.outputs.cache-hit != 'true' | ||
run: ./.github/depends/zlib.sh -b 64 -p $HOME/zlib-prefix | ||
|
||
- name: Compile tests | ||
run: | | ||
mkdir build | ||
cmake \ | ||
-D MSGPACK_CXX20=ON \ | ||
-D MSGPACK_32BIT=OFF \ | ||
-D MSGPACK_CHAR_SIGN=signed \ | ||
-D MSGPACK_USE_X3_PARSE=ON \ | ||
-D MSGPACK_BUILD_EXAMPLES=ON \ | ||
-D MSGPACK_BUILD_TESTS=ON \ | ||
-D CMAKE_BUILD_TYPE=Debug \ | ||
-D MSGPACK_GEN_COVERAGE=ON \ | ||
-D CMAKE_PREFIX_PATH="$HOME/zlib-prefix/64;$HOME/boost-prefix/64" \ | ||
-B build \ | ||
-S . || exit 1 | ||
cmake --build build --target all || exit 1 | ||
ctest --test-dir build || exit 1 | ||
- name: Upload coverage to Codecov | ||
working-directory: build | ||
run: | | ||
# Create lcov report | ||
lcov --capture --directory . --output-file coverage.info | ||
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter system-files | ||
lcov --list coverage.info # debug info | ||
# Uploading report to CodeCov | ||
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports" |
Oops, something went wrong.