1111
1212jobs :
1313 macos :
14- name : ${{ format('macOS arch= {0} cxx{1} san={2} api={3} char={4} x3={5} ', matrix.arch, matrix.cxx, matrix.sanitize, matrix.api, matrix.char_sign, matrix.x3_parse ) }}
14+ name : ${{ format('macOS (pattern {0}) ', matrix.pattern ) }}
1515 runs-on : macos-latest
1616 strategy :
1717 fail-fast : false
1818 matrix :
19- arch : [64]
20- cxx : [98, 11, 14, 17, 20]
21- sanitize : ["no", "undefined"]
22- api : [1, 2, 3]
23- char_sign : ["unsigned", "signed"]
24- x3_parse : ["OFF", "ON"]
19+ pattern : [0, 1, 2, 3, 4]
2520 steps :
26- - uses : actions/checkout@v1
21+ - uses : actions/checkout@v2
2722
2823 - name : Cache boost
2924 id : cache-boost
30- uses : actions/cache@v1
25+ uses : actions/cache@v2
3126 with :
3227 path : ~/boost-prefix/
33- key : ${{ runner.os }}-boost-1-76-0-20210612
28+ key : ${{ runner.os }}-boost-1-76-0-2021-08-09
3429
3530 - name : Build boost
3631 if : steps.cache-boost.outputs.cache-hit != 'true'
37- run : ./.github/depends/boost.sh -b ${{ matrix.arch }} -t clang -p $HOME/boost-prefix/
32+ run : ./.github/depends/boost.sh -b 64 -t clang -p $HOME/boost-prefix
3833
3934 - name : Cache zlib
4035 id : cache-zlib
41- uses : actions/cache@v1
36+ uses : actions/cache@v2
4237 with :
4338 path : ~/zlib-prefix/
44- key : ${{ runner.os }}-zlib-${{ matrix.arch }}- 1-2-11-20210623
39+ key : ${{ runner.os }}-zlib-1-2-11-2021-08-09
4540
4641 - name : Build zlib
4742 if : steps.cache-zlib.outputs.cache-hit != 'true'
48- run : ./.github/depends/zlib.sh -b ${{ matrix.arch }} -p $HOME/zlib-prefix/
43+ run : ./.github/depends/zlib.sh -b 64 -p $HOME/zlib-prefix
4944
5045 - name : Build and test
5146 shell : bash
5247 run : |
53- if [[ (${{ matrix.cxx }} -eq 98 || ${{ matrix.cxx }} -lt 14) && "${{ matrix.x3_parse }}" == "ON" ]]; then
54- echo "X3 parse is only supported with C++14 or newer - skip this configuration"
55- exit 0
56- fi
57-
58- export ARCH="${{ matrix.arch }}"
59- export API_VERSION="${{ matrix.api }}"
60- export CHAR_SIGN="${{ matrix.char_sign }}"
61- export X3_PARSE="${{ matrix.x3_parse }}"
62-
63- if [ "${{ matrix.cxx }}" == "98" ]; then
64- export MSGPACK_CXX_VERSION="MSGPACK_CXX11=OFF"
65- else
66- export MSGPACK_CXX_VERSION="MSGPACK_CXX${{ matrix.cxx }}=ON"
67- fi
68-
69- if [ "${{ matrix.sanitize }}" != "no" ]; then
70- export SANITIZE="-fsanitize=${{ matrix.sanitize }} -fno-sanitize-recover=all"
71- fi
48+ # default configuration - overwrite its params later depending on matrix.pattern
49+ export MSGPACK_CXX_VERSION="MSGPACK_CXX20=ON"
50+ export ARCH=64
51+ export API_VERSION=3
52+ export CHAR_SIGN="signed"
53+ export X3_PARSE="OFF"
54+ export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
55+
56+ case ${{ matrix.pattern }} in
57+ 0)
58+ export MSGPACK_CXX_VERSION="MSGPACK_CXX11=OFF"
59+ ;;
60+ 1)
61+ export API_VERSION=1
62+ ;;
63+ 2)
64+ export API_VERSION=2
65+ ;;
66+ 3)
67+ export X3_PARSE="ON"
68+ ;;
69+ 4)
70+ export CHAR_SIGN="unsigned"
71+ ;;
72+ esac
7273
7374 # build and test
7475 export CXX="clang++"
75- CMAKE_CXX_COMPILER="$CXX" CXXFLAGS="-Werror -g ${SANITIZE}" ci/build_cmake.sh
76+ CMAKE_CXX_COMPILER="$CXX" CXXFLAGS="-Werror -g ${SANITIZE}" ci/build_cmake.sh || exit 1
7677
7778 cat Files.cmake| grep ".*\.[h|hpp]" | perl -pe 's/ //g' | sort > tmp1 && find include -name "*.h" -o -name "*.hpp" | sort > tmp2 && diff tmp1 tmp2
7879
7980 linux :
80- name : ${{ format('Linux {0} arch={1} cxx{2} san={3} api={4} char={5} x3={6} ', matrix.compiler, matrix.arch, matrix.cxx, matrix.sanitize, matrix.api, matrix.char_sign, matrix.x3_parse ) }}
81+ name : ${{ format('Linux (pattern {0}) ', matrix.pattern ) }}
8182 runs-on : ubuntu-20.04
8283 strategy :
8384 fail-fast : false
8485 matrix :
85- arch : [32, 64]
86- cxx : [98, 11, 14, 17, 20]
87- sanitize : ["no", "undefined"]
88- api : [1, 2, 3]
89- char_sign : ["unsigned", "signed"]
90- x3_parse : ["OFF", "ON"]
86+ pattern : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
9187 steps :
9288 - uses : actions/checkout@v2
9389
@@ -96,67 +92,95 @@ jobs:
9692 run : |
9793 sudo apt-get update
9894 sudo apt-get install g++-10 cmake valgrind -y
99- if [ ${{ matrix.arch }} == 32 ]; then
100- sudo apt-get install g++-10-multilib -y
101- fi
95+ sudo apt-get install g++-10-multilib -y # for 32-bit compile
10296 ./ci/set_gcc_10.sh
10397
10498 - name : Cache boost
10599 id : cache-boost
106- uses : actions/cache@v1
100+ uses : actions/cache@v2
107101 with :
108102 path : ~/boost-prefix/
109- key : ${{ runner.os }}-boost-${{ matrix.arch }}- 1-76-0-20210613
103+ key : ${{ runner.os }}-boost-1-76-0-2021-08-09
110104
111105 - name : Build boost
112106 if : steps.cache-boost.outputs.cache-hit != 'true'
113- run : ./.github/depends/boost.sh -b ${{ matrix.arch }} -t gcc -p $HOME/boost-prefix/
107+ run : ./.github/depends/boost.sh -b both -t gcc -p $HOME/boost-prefix
114108
115109 - name : Cache zlib
116110 id : cache-zlib
117- uses : actions/cache@v1
111+ uses : actions/cache@v2
118112 with :
119113 path : ~/zlib-prefix/
120- key : ${{ runner.os }}-zlib-${{ matrix.arch }}- 1-2-11-20210613
114+ key : ${{ runner.os }}-zlib-1-2-11-2021-08-09
121115
122116 - name : Build zlib
123117 if : steps.cache-zlib.outputs.cache-hit != 'true'
124- run : ./.github/depends/zlib.sh -b ${{ matrix.arch }} -p $HOME/zlib-prefix/
118+ run : ./.github/depends/zlib.sh -b both -p $HOME/zlib-prefix
125119
126120 - name : Build and test
127121 shell : bash
128122 run : |
129- if [[ (${{ matrix.cxx }} -eq 98 || ${{ matrix.cxx }} -lt 14) && "${{ matrix.x3_parse }}" == "ON" ]]; then
130- echo "X3 parse is only supported with C++14 or newer - skip this configuration"
131- exit 0
132- fi
133-
134- export ARCH="${{ matrix.arch }}"
135- export API_VERSION="${{ matrix.api }}"
136- export CHAR_SIGN="${{ matrix.char_sign }}"
137- export X3_PARSE="${{ matrix.x3_parse }}"
138-
139- if [ "${{ matrix.cxx }}" == "98" ]; then
140- export MSGPACK_CXX_VERSION="MSGPACK_CXX11=OFF"
141- else
142- export MSGPACK_CXX_VERSION="MSGPACK_CXX${{ matrix.cxx }}=ON"
143- fi
144-
145- if [ "${{ matrix.sanitize }}" != "no" ]; then
146- export SANITIZE="-fsanitize=${{ matrix.sanitize }} -fno-sanitize-recover=all"
147- fi
123+ # default configuration - overwrite its params later depending on matrix.pattern
124+ export MSGPACK_CXX_VERSION="MSGPACK_CXX20=ON"
125+ export ARCH=64
126+ export API_VERSION=3
127+ export CHAR_SIGN="signed"
128+ export X3_PARSE="OFF"
129+ export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
130+ export ACTION="ci/build_cmake.sh"
131+
132+ case ${{ matrix.pattern }} in
133+ 0)
134+ export MSGPACK_CXX_VERSION="MSGPACK_CXX11=OFF"
135+ ;;
136+ 1)
137+ export MSGPACK_CXX_VERSION="MSGPACK_CXX11=ON"
138+ ;;
139+ 2)
140+ export MSGPACK_CXX_VERSION="MSGPACK_CXX14=ON"
141+ ;;
142+ 3)
143+ export MSGPACK_CXX_VERSION="MSGPACK_CXX17=ON"
144+ ;;
145+ 4)
146+ export MSGPACK_CXX_VERSION="MSGPACK_CXX20=ON"
147+ ;;
148+ 5)
149+ export ARCH=32
150+ ;;
151+ 6)
152+ export API_VERSION=2
153+ ;;
154+ 7)
155+ export API_VERSION=1
156+ ;;
157+ 8)
158+ export CHAR_SIGN="unsigned"
159+ ;;
160+ 9)
161+ export X3_PARSE="ON"
162+ ;;
163+ 10)
164+ export ACTION="ci/build_regression.sh"
165+ ;;
166+ 11)
167+ export ARCH=32
168+ export CHAR_SIGN="unsigned"
169+ export X3_PARSE="ON"
170+ ;;
171+ esac
148172
149173 # build and test
150174
151175 # g++
152176 export CXX="g++-10"
153- CMAKE_CXX_COMPILER="$CXX" CXXFLAGS="-Werror -g ${SANITIZE}" ci/build_cmake.sh
177+ CMAKE_CXX_COMPILER="$CXX" CXXFLAGS="-Werror -g ${SANITIZE}" ci/build_cmake.sh || exit 1
154178
155179 # clang++
156180 # with ubsan clang inserts undefined reference to `__mulodi4' on 32-bit build - skip this configuration
157- if ! [[ "${{ matrix.sanitize }}" == "undefined " && $ARCH -eq 32 ]]; then
181+ if ! [[ $SANITIZE != " " && $ARCH -eq 32 ]]; then
158182 export CXX="clang++-10"
159- CMAKE_CXX_COMPILER="$CXX" CXXFLAGS="-Werror -g ${SANITIZE}" ci/build_cmake.sh
183+ CMAKE_CXX_COMPILER="$CXX" CXXFLAGS="-Werror -g ${SANITIZE}" ci/build_cmake.sh || exit 1
160184 fi
161185 cat Files.cmake| grep ".*\.[h|hpp]" | perl -pe 's/ //g' | sort > tmp1 && find include -name "*.h" -o -name "*.hpp" | sort > tmp2 && diff tmp1 tmp2
162186
@@ -169,16 +193,16 @@ jobs:
169193 # MSVC2019 only supports /std:c++14, /std:c++17 and /std:c++latest
170194 cxx : [14, 17, 20]
171195 steps :
172- - uses : actions/checkout@v1
196+ - uses : actions/checkout@v2
173197
174- - name : Cache vcpkg
198+ - name : Cache vcpkg dependencies
175199 id : cache-vcpkg
176- uses : actions/cache@v1.0.3
200+ uses : actions/cache@v2
177201 with :
178202 path : C:/vcpkg/installed/x64-windows
179- key : ${{ runner.os }}-vcpkg-01072021
203+ key : ${{ runner.os }}-vcpkg-2021-08-09
180204
181- - name : Build dependencies
205+ - name : Install vcpkg dependencies
182206 if : steps.cache-vcpkg.outputs.cache-hit != 'true'
183207 shell : powershell
184208 run : |
0 commit comments