Skip to content

Commit 7d8de77

Browse files
committed
Add workflow
1 parent 8322bae commit 7d8de77

File tree

1 file changed

+198
-0
lines changed

1 file changed

+198
-0
lines changed

.github/workflows/ci.yml

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
- feature/**
10+
11+
env:
12+
UBSAN_OPTIONS: print_stacktrace=1
13+
14+
jobs:
15+
posix:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- toolset: gcc-4.8
21+
cxxstd: "03,11"
22+
os: ubuntu-18.04
23+
install: g++-4.8
24+
- toolset: gcc-5
25+
cxxstd: "03,11,14,1z"
26+
os: ubuntu-18.04
27+
install: g++-5
28+
- toolset: gcc-6
29+
cxxstd: "03,11,14,1z"
30+
os: ubuntu-18.04
31+
install: g++-6
32+
- toolset: gcc-7
33+
cxxstd: "03,11,14,17"
34+
os: ubuntu-18.04
35+
- toolset: gcc-8
36+
cxxstd: "03,11,14,17,2a"
37+
os: ubuntu-18.04
38+
install: g++-8
39+
- toolset: gcc-9
40+
cxxstd: "03,11,14,17,2a"
41+
os: ubuntu-20.04
42+
- toolset: gcc-10
43+
cxxstd: "03,11,14,17,2a"
44+
os: ubuntu-20.04
45+
install: g++-10
46+
- toolset: gcc-11
47+
cxxstd: "03,11,14,17,2a"
48+
os: ubuntu-20.04
49+
install: g++-11
50+
- toolset: clang
51+
compiler: clang++-3.9
52+
cxxstd: "03,11,14"
53+
os: ubuntu-18.04
54+
install: clang-3.9
55+
- toolset: clang
56+
compiler: clang++-4.0
57+
cxxstd: "03,11,14"
58+
os: ubuntu-18.04
59+
install: clang-4.0
60+
- toolset: clang
61+
compiler: clang++-5.0
62+
cxxstd: "03,11,14,1z"
63+
os: ubuntu-18.04
64+
install: clang-5.0
65+
- toolset: clang
66+
compiler: clang++-6.0
67+
cxxstd: "03,11,14,17"
68+
os: ubuntu-18.04
69+
install: clang-6.0
70+
- toolset: clang
71+
compiler: clang++-7
72+
cxxstd: "03,11,14,17"
73+
os: ubuntu-18.04
74+
install: clang-7
75+
- toolset: clang
76+
compiler: clang++-8
77+
cxxstd: "03,11,14,17"
78+
os: ubuntu-20.04
79+
install: clang-8
80+
- toolset: clang
81+
compiler: clang++-9
82+
cxxstd: "03,11,14,17,2a"
83+
os: ubuntu-20.04
84+
install: clang-9
85+
- toolset: clang
86+
compiler: clang++-10
87+
cxxstd: "03,11,14,17,2a"
88+
os: ubuntu-20.04
89+
install: clang-10
90+
- toolset: clang
91+
compiler: clang++-11
92+
cxxstd: "03,11,14,17,2a"
93+
os: ubuntu-20.04
94+
install: clang-11
95+
- toolset: clang
96+
compiler: clang++-12
97+
cxxstd: "03,11,14,17,2a"
98+
os: ubuntu-20.04
99+
install: clang-12
100+
- toolset: clang
101+
cxxstd: "03,11,14,17,2a"
102+
os: macos-10.15
103+
104+
runs-on: ${{matrix.os}}
105+
106+
steps:
107+
- uses: actions/checkout@v2
108+
109+
- name: Install packages
110+
if: matrix.install
111+
run: sudo apt install ${{matrix.install}}
112+
113+
- name: Setup Boost
114+
run: |
115+
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
116+
LIBRARY=${GITHUB_REPOSITORY#*/}
117+
echo LIBRARY: $LIBRARY
118+
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
119+
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
120+
echo GITHUB_REF: $GITHUB_REF
121+
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
122+
REF=${REF#refs/heads/}
123+
echo REF: $REF
124+
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
125+
echo BOOST_BRANCH: $BOOST_BRANCH
126+
cd ..
127+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
128+
cd boost-root
129+
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
130+
git submodule update --init tools/boostdep
131+
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
132+
./bootstrap.sh
133+
./b2 -d0 headers
134+
135+
- name: Create user-config.jam
136+
if: matrix.compiler
137+
run: |
138+
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
139+
140+
- name: Run tests
141+
run: |
142+
cd ../boost-root
143+
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
144+
145+
windows:
146+
strategy:
147+
fail-fast: false
148+
matrix:
149+
include:
150+
- toolset: msvc-14.1
151+
cxxstd: "14,17,latest"
152+
addrmd: 32,64
153+
os: windows-2016
154+
- toolset: msvc-14.2
155+
cxxstd: "14,17,latest"
156+
addrmd: 32,64
157+
os: windows-2019
158+
- toolset: msvc-14.3
159+
cxxstd: "14,17,latest"
160+
addrmd: 32,64
161+
os: windows-2022
162+
- toolset: gcc
163+
cxxstd: "03,11,14,17,2a"
164+
addrmd: 64
165+
os: windows-2019
166+
167+
runs-on: ${{matrix.os}}
168+
169+
steps:
170+
- uses: actions/checkout@v2
171+
172+
- name: Setup Boost
173+
shell: cmd
174+
run: |
175+
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
176+
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
177+
echo LIBRARY: %LIBRARY%
178+
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
179+
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
180+
echo GITHUB_REF: %GITHUB_REF%
181+
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
182+
set BOOST_BRANCH=develop
183+
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
184+
echo BOOST_BRANCH: %BOOST_BRANCH%
185+
cd ..
186+
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
187+
cd boost-root
188+
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
189+
git submodule update --init tools/boostdep
190+
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
191+
cmd /c bootstrap
192+
b2 -d0 headers
193+
194+
- name: Run tests
195+
shell: cmd
196+
run: |
197+
cd ../boost-root
198+
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release

0 commit comments

Comments
 (0)