@@ -32,17 +32,18 @@ jobs:
3232 - {os: ubuntu-latest, compiler: clang, version: '10'}
3333
3434 # Windows builds
35- - {os: windows-latest, version: '14.1', boost: '1_69_0 '}
36- - {os: windows-latest, version: '14.2', boost: '1_72_0 '}
35+ - {os: windows-2016, version: '14.16 '}
36+ - {os: windows-latest, version: '14.27 '}
3737
3838 # macOS builds
3939 - {os: macos-latest}
4040
4141 # C++20 builds
4242 - {os: ubuntu-latest, compiler: gcc, version: '10',
43- flags : ' --std=c++2a -Wsuggest-override' }
44- - {os: ubuntu-latest, compiler: clang, version: '10',
45- flags : ' --std=c++2a' }
43+ options : ' --std=c++2a' , flags: '-Wsuggest-override',
44+ boost-source : ' 1.74.0' }
45+ - {os: ubuntu-latest, compiler: clang, version: '10',
46+ options : ' --std=c++2a' , boost-source: '1.74.0'}
4647 fail-fast : false
4748
4849 steps :
@@ -55,11 +56,15 @@ jobs:
5556 run : |
5657 pip install bfg9000
5758 - name : Install Linux dependencies
58- if : matrix.os == 'ubuntu-latest'
59- run : |
60- sudo apt-get install ninja-build libboost-dev libboost-iostreams-dev libboost-program-options-dev
59+ if : startsWith(matrix.os, 'ubuntu-')
60+ run : >
61+ sudo apt-get install
62+ ninja-build
63+ libboost-dev
64+ libboost-iostreams-dev
65+ libboost-program-options-dev
6166 - name : Install Windows dependencies
62- if : matrix.os == 'windows-latest'
67+ if : startsWith( matrix.os, 'windows-')
6368 run : |
6469 cinst ninja
6570 ${gnomebase} = "https://ftp.gnome.org/pub/gnome/binaries/win32"
@@ -70,12 +75,26 @@ jobs:
7075 7z x -y glib_2.28.8-1_win32.zip -oC:\pkg-config
7176 7z x -y gettext-runtime_0.18.1.1-2_win32.zip -oC:\pkg-config
7277 echo "PKG_CONFIG=C:\pkg-config\bin\pkg-config.exe" >> ${env:GITHUB_ENV}
73- echo "BOOST_INCLUDEDIR=${env:BOOST_ROOT_${{ matrix.boost }}}\include" >> ${env:GITHUB_ENV}
74- echo "BOOST_LIBRARYDIR=${env:BOOST_ROOT_${{ matrix.boost }}}\lib" >> ${env:GITHUB_ENV}
78+
79+ ${boostroot} = "${env:BOOST_ROOT_1_72_0}"
80+ echo "BOOST_INCLUDEDIR=${boostroot}\include" >> ${env:GITHUB_ENV}
81+ echo "BOOST_LIBRARYDIR=${boostroot}\lib" >> ${env:GITHUB_ENV}
7582 - name : Install macOS dependencies
76- if : matrix.os == 'macos-latest'
83+ if : startsWith( matrix.os, 'macos-')
7784 run : |
7885 brew install ninja pkg-config boost
86+ - name : Install Boost ${{ matrix.boost-source }}
87+ if : matrix.boost-source
88+ run : |
89+ export SRCDIR=boost_`echo ${{ matrix.boost-source }} | sed 's/\./_/g'`
90+ curl -LO https://dl.bintray.com/boostorg/release/${{ matrix.boost-source }}/source/${SRCDIR}.tar.bz2
91+ tar -xjf ${SRCDIR}.tar.bz2
92+ pushd ${SRCDIR}
93+ ./bootstrap.sh --prefix=${HOME} --with-libraries=program_options,iostreams
94+ ./b2 link=shared threading=multi variant=release -d0
95+ ./b2 install -d0
96+ popd
97+ echo "BOOST_ROOT=${HOME}" >> ${GITHUB_ENV}
7998 - name : Install gcc
8099 if : matrix.compiler == 'gcc'
81100 run : |
92111 sudo apt-get install clang-${{ matrix.version }}
93112 echo "CXX=clang++-${{ matrix.version }}" >> ${GITHUB_ENV}
94113 - name : Initialize MSVC ${{ matrix.version }}
95- if : matrix.os == 'windows-latest'
114+ if : startsWith( matrix.os, 'windows-')
96115 uses : ilammy/msvc-dev-cmd@v1
97116 with :
98117 toolset : ${{ matrix.version }}
@@ -102,7 +121,7 @@ jobs:
102121 repository : jimporter/mettle
103122 path : mettle
104123 - name : Build mettle
105- if : matrix.os != 'windows-latest'
124+ if : " !startsWith( matrix.os, 'windows-') "
106125 run : |
107126 pushd mettle
108127 CPATH="`pwd`/../include" 9k build --backend=ninja --prefix=${HOME}
@@ -114,7 +133,7 @@ jobs:
114133 echo "PKG_CONFIG_PATH=${HOME}/lib/pkgconfig" >> ${GITHUB_ENV}
115134 echo "CXXFLAGS=${COMMONFLAGS} ${{ matrix.flags }}" >> ${GITHUB_ENV}
116135 - name : Build mettle (Windows)
117- if : matrix.os == 'windows-latest'
136+ if : startsWith( matrix.os, 'windows-')
118137 run : |
119138 ${env:CPATH} = "${pwd}\include"
120139 pushd mettle
@@ -128,6 +147,6 @@ jobs:
128147 echo "CXXFLAGS=/WX ${{ matrix.flags }}" >> ${env:GITHUB_ENV}
129148 - name : Run tests
130149 run : |
131- 9k build --backend=ninja
150+ 9k build --backend=ninja ${{ matrix.options }}
132151 cd build
133152 ninja test
0 commit comments