1name: GitHub Actions CI 2 3on: 4 pull_request: 5 push: 6 branches: 7 - master 8 - develop 9 - githubactions* 10 - feature/** 11 - fix/** 12 - pr/** 13 14jobs: 15 posix: 16 strategy: 17 fail-fast: false 18 matrix: 19 include: 20 - name: "TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 Job 0" 21 buildtype: "boost" 22 packages: "" 23 packages_to_remove: "" 24 os: "ubuntu-16.04" 25 cxx: "g++" 26 sources: "" 27 llvm_os: "" 28 llvm_ver: "" 29 toolset: "gcc" 30 compiler: "g++" 31 cxxstd: "03,11" 32 - name: "TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 1" 33 buildtype: "boost" 34 packages: "g++-4.7" 35 packages_to_remove: "" 36 os: "ubuntu-16.04" 37 cxx: "g++-4.7" 38 sources: "" 39 llvm_os: "" 40 llvm_ver: "" 41 toolset: "gcc" 42 compiler: "g++-4.7" 43 cxxstd: "03,11" 44 - name: "TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 2" 45 buildtype: "boost" 46 packages: "g++-4.8" 47 packages_to_remove: "" 48 os: "ubuntu-16.04" 49 cxx: "g++-4.8" 50 sources: "" 51 llvm_os: "" 52 llvm_ver: "" 53 toolset: "gcc" 54 compiler: "g++-4.8" 55 cxxstd: "03,11" 56 - name: "TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 3" 57 buildtype: "boost" 58 packages: "g++-4.9" 59 packages_to_remove: "" 60 os: "ubuntu-16.04" 61 cxx: "g++-4.9" 62 sources: "" 63 llvm_os: "" 64 llvm_ver: "" 65 toolset: "gcc" 66 compiler: "g++-4.9" 67 cxxstd: "03,11" 68 - name: "TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 4" 69 buildtype: "boost" 70 packages: "g++-5" 71 packages_to_remove: "" 72 os: "ubuntu-16.04" 73 cxx: "g++-5" 74 sources: "" 75 llvm_os: "" 76 llvm_ver: "" 77 toolset: "gcc" 78 compiler: "g++-5" 79 cxxstd: "03,11,14,1z" 80 - name: "TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 5" 81 buildtype: "boost" 82 packages: "g++-6" 83 packages_to_remove: "" 84 os: "ubuntu-16.04" 85 cxx: "g++-6" 86 sources: "" 87 llvm_os: "" 88 llvm_ver: "" 89 toolset: "gcc" 90 compiler: "g++-6" 91 cxxstd: "03,11,14,1z" 92 - name: "TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 6" 93 buildtype: "boost" 94 packages: "g++-7" 95 packages_to_remove: "" 96 os: "ubuntu-16.04" 97 cxx: "g++-7" 98 sources: "" 99 llvm_os: "" 100 llvm_ver: "" 101 toolset: "gcc" 102 compiler: "g++-7" 103 cxxstd: "03,11,14,17" 104 - name: "TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 Job 7" 105 buildtype: "boost" 106 packages: "" 107 packages_to_remove: "" 108 os: "ubuntu-16.04" 109 cxx: "clang++" 110 sources: "" 111 llvm_os: "" 112 llvm_ver: "" 113 toolset: "clang" 114 compiler: "clang++" 115 cxxstd: "03,11" 116 - name: "TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 8" 117 buildtype: "boost" 118 packages: "clang-3.5 libstdc++-4.9-dev" 119 packages_to_remove: "" 120 os: "ubuntu-16.04" 121 cxx: "clang++-3.5" 122 sources: "" 123 llvm_os: "precise" 124 llvm_ver: "3.5" 125 toolset: "clang" 126 compiler: "clang++-3.5" 127 cxxstd: "03,11,14" 128 - name: "TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 9" 129 buildtype: "boost" 130 packages: "clang-3.6" 131 packages_to_remove: "" 132 os: "ubuntu-16.04" 133 cxx: "clang++-3.6" 134 sources: "" 135 llvm_os: "precise" 136 llvm_ver: "3.6" 137 toolset: "clang" 138 compiler: "clang++-3.6" 139 cxxstd: "03,11,14" 140 - name: "TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 10" 141 buildtype: "boost" 142 packages: "clang-3.7" 143 packages_to_remove: "" 144 os: "ubuntu-16.04" 145 cxx: "clang++-3.7" 146 sources: "" 147 llvm_os: "precise" 148 llvm_ver: "3.7" 149 toolset: "clang" 150 compiler: "clang++-3.7" 151 cxxstd: "03,11,14" 152 - name: "TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 11" 153 buildtype: "boost" 154 packages: "clang-3.8 libstdc++-4.9-dev" 155 packages_to_remove: "" 156 os: "ubuntu-16.04" 157 cxx: "clang++-3.8" 158 sources: "" 159 llvm_os: "precise" 160 llvm_ver: "3.8" 161 toolset: "clang" 162 compiler: "clang++-3.8" 163 cxxstd: "03,11,14" 164 - name: "TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 12" 165 buildtype: "boost" 166 packages: "clang-3.9 libstdc++-4.9-dev" 167 packages_to_remove: "" 168 os: "ubuntu-16.04" 169 cxx: "clang++-3.9" 170 sources: "" 171 llvm_os: "precise" 172 llvm_ver: "3.9" 173 toolset: "clang" 174 compiler: "clang++-3.9" 175 cxxstd: "03,11,14" 176 - name: "TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 13" 177 buildtype: "boost" 178 packages: "clang-4.0" 179 packages_to_remove: "" 180 os: "ubuntu-16.04" 181 container: "ubuntu:14.04" 182 cxx: "clang++-4.0" 183 sources: "" 184 llvm_os: "trusty" 185 llvm_ver: "4.0" 186 toolset: "clang" 187 compiler: "clang++-4.0" 188 cxxstd: "03,11,14" 189 - name: "TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 14" 190 buildtype: "boost" 191 packages: "clang-5.0" 192 packages_to_remove: "" 193 os: "ubuntu-16.04" 194 container: "ubuntu:14.04" 195 cxx: "clang++-5.0" 196 sources: "" 197 llvm_os: "trusty" 198 llvm_ver: "5.0" 199 toolset: "clang" 200 compiler: "clang++-5.0" 201 cxxstd: "03,11,14,1z" 202 203 runs-on: ${{ matrix.os }} 204 container: ${{ matrix.container }} 205 206 steps: 207 - name: Check if running in container 208 if: matrix.container != '' 209 run: echo "GHA_CONTAINER=${{ matrix.container }}" >> $GITHUB_ENV 210 - name: If running in container, upgrade packages 211 if: matrix.container != '' 212 run: | 213 sudo apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget curl apt-transport-https make apt-file sudo unzip libssl-dev build-essential autotools-dev autoconf automake g++ libc++-helpers python python-pip ruby cpio gcc-multilib g++-multilib pkgconf python3 python3-pip ccache libpython-dev 214 sudo apt-add-repository ppa:git-core/ppa 215 sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git 216 sudo python -m pip install --upgrade pip==20.3.4 217 sudo /usr/local/bin/pip install cmake 218 219 - uses: actions/checkout@v2 220 221 - name: linux 222 shell: bash 223 env: 224 CXX: ${{ matrix.cxx }} 225 SOURCES: ${{ matrix.sources }} 226 LLVM_OS: ${{ matrix.llvm_os }} 227 LLVM_VER: ${{ matrix.llvm_ver }} 228 PACKAGES: ${{ matrix.packages }} 229 PACKAGES_TO_REMOVE: ${{ matrix.packages_to_remove }} 230 JOB_BUILDTYPE: ${{ matrix.buildtype }} 231 TOOLSET: ${{ matrix.toolset }} 232 COMPILER: ${{ matrix.compiler }} 233 CXXSTD: ${{ matrix.cxxstd }} 234 TRAVIS_BRANCH: ${{ github.base_ref }} 235 TRAVIS_OS_NAME: "linux" 236 run: | 237 echo '==================================> SETUP' 238 echo '==================================> PACKAGES' 239 set -e 240 if [ -n "$PACKAGES_TO_REMOVE" ]; then sudo apt-get purge -y $PACKAGES_TO_REMOVE; fi 241 echo ">>>>> APT: REPO.." 242 for i in {1..3}; do sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" && break || sleep 2; done 243 244 if test -n "${LLVM_OS}" ; then 245 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - 246 if test -n "${LLVM_VER}" ; then 247 sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS}-${LLVM_VER} main" 248 else 249 # Snapshot (i.e. trunk) build of clang 250 sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS} main" 251 fi 252 fi 253 echo ">>>>> APT: UPDATE.." 254 sudo -E apt-get -o Acquire::Retries=3 update 255 if test -n "${SOURCES}" ; then 256 echo ">>>>> APT: INSTALL SOURCES.." 257 for SOURCE in $SOURCES; do 258 sudo -E apt-add-repository ppa:$SOURCE 259 done 260 fi 261 echo ">>>>> APT: INSTALL ${PACKAGES}.." 262 sudo -E DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -y --no-install-suggests --no-install-recommends install ${PACKAGES} 263 264 echo '==================================> INSTALL AND COMPILE' 265 set -e 266 export TRAVIS_BUILD_DIR=$(pwd) 267 export TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')} 268 export VCS_COMMIT_ID=$GITHUB_SHA 269 export GIT_COMMIT=$GITHUB_SHA 270 export REPO_NAME=$(basename $GITHUB_REPOSITORY) 271 export USER=$(whoami) 272 export CC=${CC:-gcc} 273 export PATH=~/.local/bin:/usr/local/bin:$PATH 274 275 if [ "$JOB_BUILDTYPE" == "boost" ]; then 276 277 echo '==================================> INSTALL' 278 279 BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true 280 cd .. 281 git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root 282 cd boost-root 283 git submodule update --init tools/build 284 git submodule update --init libs/config 285 git submodule update --init tools/boostdep 286 cp -r $TRAVIS_BUILD_DIR/* libs/optional 287 python tools/boostdep/depinst/depinst.py optional 288 ./bootstrap.sh 289 ./b2 headers 290 291 echo '==================================> SCRIPT' 292 293 echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam 294 ./b2 libs/optional/test toolset=$TOOLSET cxxstd=$CXXSTD 295 296 fi 297 osx: 298 strategy: 299 fail-fast: false 300 matrix: 301 include: 302 - name: "TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 15" 303 buildtype: "boost" 304 packages: "" 305 os: "macos-10.15" 306 cxx: "clang++" 307 sources: "" 308 llvm_os: "" 309 llvm_ver: "" 310 xcode_version: 11.7 311 toolset: "clang" 312 compiler: "clang++" 313 cxxstd: "03,11,14,1z" 314 315 runs-on: ${{ matrix.os }} 316 317 steps: 318 - uses: actions/checkout@v2 319 320 - name: Set DEVELOPER_DIR 321 if: matrix.xcode_version != '' 322 run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer" >> $GITHUB_ENV 323 - name: Test DEVELOPER_DIR 324 run: echo $DEVELOPER_DIR 325 326 - name: "osx" 327 shell: bash 328 env: 329 CXX: ${{ matrix.cxx }} 330 SOURCES: ${{ matrix.sources }} 331 LLVM_OS: ${{ matrix.llvm_os }} 332 LLVM_VER: ${{ matrix.llvm_ver }} 333 PACKAGES: ${{ matrix.packages }} 334 JOB_BUILDTYPE: ${{ matrix.buildtype }} 335 TOOLSET: ${{ matrix.toolset }} 336 COMPILER: ${{ matrix.compiler }} 337 CXXSTD: ${{ matrix.cxxstd }} 338 TRAVIS_BRANCH: ${{ github.base_ref }} 339 TRAVIS_OS_NAME: "osx" 340 run: | 341 echo '==================================> SETUP' 342 set -e 343 sudo mv /Library/Developer/CommandLineTools /Library/Developer/CommandLineTools.bck 344 echo '==================================> PACKAGES' 345 echo '==================================> INSTALL AND COMPILE' 346 set -e 347 export TRAVIS_BUILD_DIR=$(pwd) 348 export TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')} 349 export VCS_COMMIT_ID=$GITHUB_SHA 350 export GIT_COMMIT=$GITHUB_SHA 351 export REPO_NAME=$(basename $GITHUB_REPOSITORY) 352 export USER=$(whoami) 353 export CC=${CC:-gcc} 354 export PATH=~/.local/bin:/usr/local/bin:$PATH 355 356 if [ "$JOB_BUILDTYPE" == "boost" ]; then 357 358 echo '==================================> INSTALL' 359 360 BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true 361 cd .. 362 git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root 363 cd boost-root 364 git submodule update --init tools/build 365 git submodule update --init libs/config 366 git submodule update --init tools/boostdep 367 cp -r $TRAVIS_BUILD_DIR/* libs/optional 368 python tools/boostdep/depinst/depinst.py optional 369 ./bootstrap.sh 370 ./b2 headers 371 372 echo '==================================> SCRIPT' 373 374 echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam 375 ./b2 libs/optional/test toolset=$TOOLSET cxxstd=$CXXSTD 376 377 fi 378