Skip to content

Commit 236b8cc

Browse files
Add Windows quick CI for fix/route-params-export
1 parent f40a6a9 commit 236b8cc

File tree

2 files changed

+196
-0
lines changed

2 files changed

+196
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ env:
3939

4040
jobs:
4141
runner-selection:
42+
if: ${{ !((github.event_name == 'push' && github.ref == 'refs/heads/fix/route-params-export') || (github.event_name == 'pull_request' && github.head_ref == 'fix/route-params-export')) }}
4243
name: Runner Selection
4344
runs-on: ${{ github.repository_owner == 'boostorg' && fromJSON('[ "self-hosted", "linux", "x64", "ubuntu-latest-aws" ]') || 'ubuntu-latest' }}
4445
outputs:
@@ -49,6 +50,7 @@ jobs:
4950
uses: cppalliance/aws-hosted-runners@v1.0.0
5051

5152
build:
53+
if: ${{ !((github.event_name == 'push' && github.ref == 'refs/heads/fix/route-params-export') || (github.event_name == 'pull_request' && github.head_ref == 'fix/route-params-export')) }}
5254
needs: [ runner-selection ]
5355
defaults:
5456
run:
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
name: Windows Quick CI
2+
3+
on:
4+
push:
5+
branches:
6+
- fix/route-params-export
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ format('windows-quick:{0}', github.ref) }}
13+
cancel-in-progress: true
14+
15+
env:
16+
GIT_FETCH_JOBS: 8
17+
NET_RETRY_COUNT: 5
18+
DEFAULT_BUILD_VARIANT: debug,release
19+
TZ: "Europe/London"
20+
21+
jobs:
22+
windows:
23+
if: ${{ github.event_name != 'pull_request' || github.head_ref == 'fix/route-params-export' }}
24+
name: ${{ matrix.name }}
25+
runs-on: windows-2022
26+
timeout-minutes: 60
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
include:
31+
- name: "MSVC 14.34 (shared, x64)"
32+
compiler: "msvc"
33+
version: "14.34"
34+
cxxstd: "17,20"
35+
latest-cxxstd: "20"
36+
b2-toolset: "msvc-14.3"
37+
generator: "Visual Studio 17 2022"
38+
shared: true
39+
build-type: "Release"
40+
41+
- name: "MSVC 14.34 (shared, x86)"
42+
compiler: "msvc"
43+
version: "14.34"
44+
cxxstd: "17,20"
45+
latest-cxxstd: "20"
46+
b2-toolset: "msvc-14.3"
47+
generator: "Visual Studio 17 2022"
48+
shared: true
49+
build-type: "Release"
50+
x86: true
51+
52+
- name: "MinGW (shared)"
53+
compiler: "mingw"
54+
version: "*"
55+
cxx: "g++"
56+
cc: "gcc"
57+
b2-toolset: "gcc"
58+
generator: "MinGW Makefiles"
59+
shared: true
60+
build-type: "Debug"
61+
62+
steps:
63+
- name: Clone Boost.HTTP.Proto
64+
uses: actions/checkout@v3
65+
with:
66+
path: http-proto-root
67+
68+
- name: Clone Boost.Buffers
69+
uses: actions/checkout@v3
70+
with:
71+
path: buffers-root
72+
repository: cppalliance/buffers
73+
ref: develop
74+
75+
- name: Clone Boost.Capy
76+
uses: actions/checkout@v3
77+
with:
78+
path: capy-root
79+
repository: cppalliance/capy
80+
ref: develop
81+
82+
- name: Setup C++
83+
uses: alandefreitas/cpp-actions/setup-cpp@v1.9.0
84+
id: setup-cpp
85+
with:
86+
compiler: ${{ matrix.compiler }}
87+
version: ${{ matrix.version }}
88+
trace-commands: true
89+
90+
- name: Install Packages (Windows)
91+
uses: alandefreitas/cpp-actions/package-install@v1.9.0
92+
id: package-install-windows
93+
with:
94+
vcpkg: zlib brotli
95+
vcpkg-dir: vcpkg-root
96+
vcpkg-triplet: ${{ matrix.x86 && 'x86-windows-static' || 'x64-windows' }}
97+
98+
- name: Clone Boost
99+
uses: alandefreitas/cpp-actions/boost-clone@v1.9.0
100+
id: boost-clone
101+
with:
102+
branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }}
103+
boost-dir: boost-source
104+
modules-exclude-paths: ''
105+
scan-modules-dir: |
106+
http-proto-root
107+
buffers-root
108+
capy-root
109+
scan-modules-ignore: |
110+
http_proto
111+
buffers
112+
capy
113+
114+
- name: Patch user-config.jam (Windows)
115+
id: patch-user-config
116+
shell: bash
117+
run: |
118+
set -xe
119+
home=$(pwd)
120+
121+
triplet=${{ matrix.x86 && 'x86-windows-static' || 'x64-windows' }}
122+
addrmdl=${{ matrix.x86 && '32' || '64' }}
123+
124+
echo "import-search ${home}/boost-root/libs/capy/build ;" | sed 's/\/d\//D:\//g' >> user-config.jam
125+
echo "using zlib : : <include>\"${home}/vcpkg-root/installed/${triplet}/include\" <search>\"${home}/vcpkg-root/installed/${triplet}/lib\" <dll-path>\"${home}/vcpkg-root/installed/${triplet}/bin\" <name>zlib : <address-model>${addrmdl} ;" | sed 's/\/d\//D:\//g' >> user-config.jam
126+
echo "using brotli : : <include>\"${home}/vcpkg-root/installed/${triplet}/include\" <search>\"${home}/vcpkg-root/installed/${triplet}/lib\" <dll-path>\"${home}/vcpkg-root/installed/${triplet}/bin\" : <address-model>${addrmdl} ;" | sed 's/\/d\//D:\//g' >> user-config.jam
127+
128+
cat user-config.jam
129+
130+
toolchain=$(echo "$GITHUB_WORKSPACE/vcpkg-root/scripts/buildsystems/vcpkg.cmake" | sed 's/\/d\//D:\//g' )
131+
echo "toolchain=${toolchain}" >> $GITHUB_OUTPUT
132+
133+
- name: Patch Boost
134+
id: patch
135+
shell: bash
136+
run: |
137+
set -xe
138+
module=${GITHUB_REPOSITORY#*/}
139+
echo "module=$module" >> $GITHUB_OUTPUT
140+
141+
workspace_root=$(echo "$GITHUB_WORKSPACE" | sed 's/\\/\//g')
142+
echo -E "workspace_root=$workspace_root" >> $GITHUB_OUTPUT
143+
144+
rm -r "boost-source/libs/$module" || true
145+
146+
cp -r boost-source boost-root
147+
148+
cd boost-root
149+
boost_root="$(pwd)"
150+
boost_root=$(echo "$boost_root" | sed 's/\\/\//g')
151+
echo -E "boost_root=$boost_root" >> $GITHUB_OUTPUT
152+
153+
cp -r "$workspace_root"/http-proto-root "libs/$module"
154+
cp -r "$workspace_root"/buffers-root libs/buffers
155+
cp -r "$workspace_root"/capy-root libs/capy
156+
157+
- name: Boost B2 Workflow
158+
uses: alandefreitas/cpp-actions/b2-workflow@v1.9.0
159+
env:
160+
ASAN_OPTIONS: detect_invalid_pointer_pairs=2:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
161+
with:
162+
source-dir: boost-root
163+
modules: http_proto
164+
toolset: ${{ matrix.b2-toolset }}
165+
build-variant: ${{ matrix.build-type }}
166+
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx || '' }}
167+
cxxstd: ${{ matrix.cxxstd }}
168+
address-model: ${{ (matrix.x86 && '32') || '64' }}
169+
shared: ${{ matrix.shared }}
170+
rtti: on,off
171+
user-config: ${{ format('{0}/user-config.jam', steps.patch.outputs.workspace_root) }}
172+
stop-on-error: true
173+
174+
- name: Root Project CMake Workflow
175+
uses: alandefreitas/cpp-actions/cmake-workflow@v1.9.0
176+
if: ${{ matrix.compiler == 'msvc' }}
177+
with:
178+
source-dir: boost-root/libs/${{ steps.patch.outputs.module }}
179+
build-dir: __build_root_test__
180+
build-target: tests
181+
run-tests: true
182+
generator: ${{ matrix.generator }}
183+
build-type: ${{ matrix.build-type }}
184+
install: false
185+
cxxstd: ${{ matrix.latest-cxxstd }}
186+
cc: ${{ steps.setup-cpp.outputs.cc || matrix.cc }}
187+
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
188+
shared: ${{ matrix.shared }}
189+
cmake-version: '>=3.20'
190+
extra-args: |
191+
-D Boost_VERBOSE=ON
192+
-D BOOST_INCLUDE_LIBRARIES="${{ steps.patch.outputs.module }}"
193+
export-compile-commands: false
194+
toolchain: ${{ steps.patch-user-config.outputs.toolchain }}

0 commit comments

Comments
 (0)