1+ # Copyright 2019 - 2020 Alexander Grund
2+ # Distributed under the Boost Software License, Version 1.0.
3+ # (See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt)
4+
15name : CI Tests
26
37on :
@@ -20,55 +24,49 @@ jobs:
2024 generator : Visual Studio 16 2019
2125 - os : ubuntu-16.04
2226 buildType : Debug
23- - os : windows-latest
24- generator : Unix Makefiles
2527 runs-on : ${{matrix.os}}
2628 env :
2729 DEP_DIR : ${{github.workspace}}/dependencies
2830 BOOST_VERSION : 1.56.0
2931 steps :
3032 - uses : actions/checkout@v2
3133 - uses : actions/cache@v1
34+ id : cache-boost
3235 with :
3336 path : ${{env.DEP_DIR}}
3437 key : ${{matrix.os}}-${{matrix.generator}}-${{env.BOOST_VERSION}}
3538 # Install newer CMake to be able to find Boost
3639 - name : Install CMake
3740 if : runner.os == 'Linux' && matrix.standalone == 'Boost'
3841 run : wget -qO- https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.tar.gz | sudo tar --strip-components=1 -xzC /usr/local
39- # Install Boost, no wget on Windows -.-
40- - name : Download Boost
41- shell : cmake -P {0}
42+ - name : Set BOOST_ROOT
4243 if : matrix.standalone == 'Boost'
43- id : downloadBoost
44- run : |
45- string(REPLACE "." "_" filename boost_$ENV{BOOST_VERSION})
46- set(BOOST_ROOT $ENV{DEP_DIR}/${filename})
47- message("::set-env name=BOOST_ROOT::${BOOST_ROOT}")
48- if(EXISTS ${BOOST_ROOT}/include)
49- message("::set-output name=update::0")
50- else()
51- message("::set-output name=update::1")
52- set(boost_url https://sourceforge.net/projects/boost/files/boost/$ENV{BOOST_VERSION}/${filename}.7z/download)
53- set(DEP_BUILD_DIR $ENV{DEP_DIR}/build)
54- file(MAKE_DIRECTORY ${DEP_BUILD_DIR})
55- file(DOWNLOAD "${boost_url}" ${DEP_BUILD_DIR}/boost.7z SHOW_PROGRESS)
56- endif()
44+ shell : bash
45+ run : echo "::set-env name=BOOST_ROOT::${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}"
46+ # Install Boost
47+ - uses : actions/checkout@v2
48+ if : matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true'
49+ with :
50+ repository : boostorg/boost
51+ ref : boost-${{env.BOOST_VERSION}}
52+ path : __buildBoost
53+ fetch-depth : 1
5754 - name : Build Boost
5855 shell : bash
59- if : matrix.standalone == 'Boost' && steps.downloadBoost.outputs.update == 1
60- working-directory : ${{env.DEP_DIR}}/build
56+ if : matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true'
6157 run : |
62- 7z x boost.7z > /dev/null
63- cd $(basename "$BOOST_ROOT")
64- [[ "${{matrix.generator}}" =~ "Unix" ]] && toolset=gcc || toolset=mingw
65- ./bootstrap.sh --with-toolset="$toolset" --with-libraries=system,filesystem,chrono threading=multi || (cat bootstrap.log && false)
58+ cd __buildBoost
59+ git submodule update --init --jobs 3 tools/boostdep libs/filesystem tools/inspect libs/wave # Last 2 are required for pre-1.64
60+ (cd tools/boostdep && git fetch && git checkout boost-1.73.0 && git checkout boost-1.63.0 -- depinst/exceptions.txt)
61+ python tools/boostdep/depinst/depinst.py --include tools --exclude test --git_args '--jobs 3' filesystem
62+ [[ "${{matrix.os}}" =~ "windows" ]] && toolset=mingw || toolset=gcc
63+ ./bootstrap.sh --with-toolset="$toolset" --with-libraries=system,filesystem threading=multi || (cat bootstrap.log && false)
6664 sed -i 's/mingw/gcc/' project-config.jam
6765 [[ "${{matrix.generator}}" =~ "Visual Studio" ]] && toolset=msvc-14.0 || toolset=gcc
66+ ./b2 headers
6867 ./b2 link=static toolset=$toolset address-model=64 -j$(nproc) --prefix="$BOOST_ROOT" install
69- cd "$DEP_DIR"
70- # Workaround for "Device or resource busy" error
71- if ! rm -r build; then sleep 30s; rm -r build || true; fi
68+ cd ..
69+ rm -r __buildBoost || true
7270 - name : Create standalone
7371 if : matrix.standalone == 'Standalone'
7472 shell : bash
0 commit comments