mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Add cygwin regression tests
This commit is contained in:
132
.github/workflows/ci.yml
vendored
132
.github/workflows/ci.yml
vendored
@@ -725,3 +725,135 @@ jobs:
|
||||
cd boost-root
|
||||
b2 -j %NUMBER_OF_PROCESSORS% libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker debug-symbols=off
|
||||
|
||||
cygwin:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: gcc
|
||||
cxxstd: "03,11,14,17"
|
||||
cxxflags: -pipe
|
||||
os: windows-latest
|
||||
|
||||
timeout-minutes: 240
|
||||
runs-on: ${{matrix.os}}
|
||||
container: ${{matrix.container}}
|
||||
|
||||
steps:
|
||||
- name: Setup environment
|
||||
uses: cygwin/cygwin-install-action@master
|
||||
with:
|
||||
packages: gcc-g++ make python3 git wget curl
|
||||
- name: Setup Boost
|
||||
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
|
||||
run: |
|
||||
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||
echo LIBRARY: $LIBRARY
|
||||
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||
echo GITHUB_REF: $GITHUB_REF
|
||||
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||
REF=${REF#refs/heads/}
|
||||
echo REF: $REF
|
||||
BOOST_BRANCH=develop && [ "$REF" = "master" ] && BOOST_BRANCH=master || true
|
||||
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||
BUILD_JOBS=$((nproc || sysctl -n hw.ncpu) 2> /dev/null)
|
||||
echo BUILD_JOBS: $BUILD_JOBS
|
||||
echo "BUILD_JOBS=$BUILD_JOBS" >> $GITHUB_ENV
|
||||
echo "CMAKE_BUILD_PARALLEL_LEVEL=$BUILD_JOBS" >> $GITHUB_ENV
|
||||
DEPINST_ARGS=()
|
||||
GIT_VERSION="$(git --version | sed -e 's/git version //')"
|
||||
GIT_HAS_JOBS=1
|
||||
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
|
||||
mkdir -p snapshot
|
||||
cd snapshot
|
||||
echo "Downloading library snapshot: https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
|
||||
curl -L --retry "$NET_RETRY_COUNT" -o "${LIBRARY}-${GITHUB_SHA}.tar.gz" "https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
|
||||
tar -xf "${LIBRARY}-${GITHUB_SHA}.tar.gz"
|
||||
if [ ! -d "${LIBRARY}-${GITHUB_SHA}" ]
|
||||
then
|
||||
echo "Library snapshot does not contain the library directory ${LIBRARY}-${GITHUB_SHA}:"
|
||||
ls -la
|
||||
exit 1
|
||||
fi
|
||||
rm -f "${LIBRARY}-${GITHUB_SHA}.tar.gz"
|
||||
cd ..
|
||||
git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root"
|
||||
cd boost-root
|
||||
mkdir -p libs
|
||||
rm -rf "libs/$LIBRARY"
|
||||
mv -f "../snapshot/${LIBRARY}-${GITHUB_SHA}" "libs/$LIBRARY"
|
||||
rm -rf "../snapshot"
|
||||
git submodule update --init tools/boostdep
|
||||
DEPINST_ARGS+=("$LIBRARY")
|
||||
python tools/boostdep/depinst/depinst.py -C "${DEPINST_ARGS[@]}"
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
|
||||
then
|
||||
echo -n "using ${{matrix.toolset}} : : ${{matrix.compiler}}" > ~/user-config.jam
|
||||
if [ -n "$GCC_TOOLCHAIN_ROOT" ]
|
||||
then
|
||||
echo -n " : <compileflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\" <linkflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\"" >> ~/user-config.jam
|
||||
fi
|
||||
echo " ;" >> ~/user-config.jam
|
||||
fi
|
||||
|
||||
- name: Run tests
|
||||
if: matrix.cmake_tests == ''
|
||||
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
|
||||
run: |
|
||||
cd boost-root
|
||||
${{matrix.toolset}} --version
|
||||
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}" "debug-symbols=off")
|
||||
#Build variant
|
||||
if [ -n "${{matrix.build_variant}}" ]
|
||||
then
|
||||
B2_ARGS+=("variant=${{matrix.build_variant}}")
|
||||
else
|
||||
B2_ARGS+=("variant=$DEFAULT_BUILD_VARIANT")
|
||||
fi
|
||||
#Threading
|
||||
if [ -n "${{matrix.threading}}" ]
|
||||
then
|
||||
B2_ARGS+=("threading=${{matrix.threading}}")
|
||||
fi
|
||||
#UBSAN options
|
||||
if [ -n "${{matrix.ubsan}}" ]
|
||||
then
|
||||
export UBSAN_OPTIONS="verbosity=1:print_stacktrace=1"
|
||||
B2_ARGS+=("undefined-sanitizer=norecover" "define=UBSAN=1")
|
||||
fi
|
||||
#ASAN options
|
||||
if [ -n "${{matrix.asan}}" ]
|
||||
then
|
||||
export ASAN_OPTIONS="verbosity=1:print_stacktrace=1"
|
||||
B2_ARGS+=("address-sanitizer=norecover" "define=ASAN=1")
|
||||
fi
|
||||
#Common UBSAN / ASAN options
|
||||
if [ -n "${{matrix.asan}}" ] || [ -n "${{matrix.ubsan}}" ]
|
||||
then
|
||||
B2_ARGS+=("debug-symbols=on" "visibility=global")
|
||||
fi
|
||||
#cxxflags
|
||||
if [ -n "${{matrix.cxxflags}}" ]
|
||||
then
|
||||
B2_ARGS+=("cxxflags=${{matrix.cxxflags}}")
|
||||
fi
|
||||
#address-model
|
||||
if [ -n "${{matrix.address-model}}" ]
|
||||
then
|
||||
B2_ARGS+=("address-model=${{matrix.address-model}}")
|
||||
fi
|
||||
#link-flags
|
||||
if [ -n "${{matrix.linkflags}}" ]
|
||||
then
|
||||
B2_ARGS+=("linkflags=${{matrix.linkflags}}")
|
||||
fi
|
||||
B2_ARGS+=("libs/$LIBRARY/test")
|
||||
./b2 "${B2_ARGS[@]}"
|
||||
|
||||
Reference in New Issue
Block a user