-
Notifications
You must be signed in to change notification settings - Fork 151
144 lines (126 loc) · 5.19 KB
/
multi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#==============================================================================
# Copyright (c) 2022 Nikita Kniazev
#
# Use, modification and distribution is subject to the Boost Software
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#==============================================================================
name: Multiarch CI
on:
pull_request:
push:
jobs:
emulated:
name: ${{ matrix.container }} ${{ matrix.platform }} ${{ matrix.toolset }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
container: [ 'debian' ]
platform:
- linux/386
- linux/amd64
- linux/arm/v5
- linux/arm/v7
- linux/arm64/v8
- linux/mips64le
- linux/ppc64le
- linux/s390x
include:
- { container: 'debian:experimental', platform: linux/riscv64 }
- { container: 'lpenz/debian-buster-mipsel', platform: linux/mipsel }
- { container: 'lpenz/debian-buster-mips', platform: linux/mips }
steps:
- name: Checkout Boost super-repo
env:
REF: ${{ github.base_ref || github.ref_name }}
BRANCH: ${{ env.REF != 'develop' && env.REF != 'master' && 'develop' || env.REF }}
shell: bash
run: git clone -j10 --depth=1 --branch=${{ env.BRANCH }} --no-tags
https://github.com/boostorg/boost.git '${{ github.workspace }}'
- name: Checkout minimal Boost
run: git submodule update --init --depth 1 --jobs 10 --single-branch --
tools/build
libs/config
tools/boostdep
- name: Checkout the commit
uses: actions/checkout@v4
with:
path: libs/context
- name: Checkout library dependencies
run: python tools/boostdep/depinst/depinst.py --git_args "--jobs 10" context
- name: "Setup QEMU and Docker"
run: |
set -eu
sudo apt-get -o Acquire::Retries=3 update
sudo apt-get -o Acquire::Retries=3 -y install qemu-user-static
- name: "Building and testing on ${{ matrix.container }} ${{ matrix.platform }}"
uses: addnab/docker-run-action@v3
with:
image: ${{ matrix.container }}
options: -v ${{ github.workspace }}:/boost-root -w /boost-root ${{ matrix.platform && format('--platform {0}', matrix.platform) || '' }}
run: |
set -eu
echo "::group::Switch to archive repository"
${{ contains(matrix.container, 'buster') }} && sed -i 's/deb.debian/archive.debian/' /etc/apt/sources.list && cat /etc/apt/sources.list
echo "::endgroup::"
echo "::group::Install GCC"
apt-get -o Acquire::Retries=3 update
apt-get -o Acquire::Retries=3 -yq --no-install-suggests --no-install-recommends install g++
echo "::endgroup::"
echo "::group::GCC info"
g++ -v
echo "::endgroup::"
echo "::group::Build B2"
./bootstrap.sh
echo "::endgroup::"
echo "::group::Toolset info"
./b2 libs/config/test//print_config_info
echo "::endgroup::"
echo "::group::Run tests"
./b2 libs/context/test
echo "::endgroup::"
native:
name: native ${{ matrix.os }} ${{ matrix.toolset }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu' ]
toolset: [ 'gcc', 'clang' ]
include:
- { os: macos, toolset: darwin, options: cxxstd=17 }
- { os: macos, toolset: clang, options: cxxstd=17 }
- { os: windows, toolset: gcc }
- { os: windows, toolset: clang-win, options: embed-manifest-via=linker }
steps:
- name: Checkout Boost super-repo
env:
REF: ${{ github.base_ref || github.ref_name }}
BRANCH: ${{ env.REF != 'develop' && env.REF != 'master' && 'develop' || env.REF }}
shell: bash
run: git clone -j10 --depth=1 --branch=${{ env.BRANCH }} --no-tags
https://github.com/boostorg/boost.git '${{ github.workspace }}'
- name: Checkout minimal Boost
run: git submodule update --init --depth 1 --jobs 10 --single-branch --
tools/build
libs/config
tools/boostdep
- name: Checkout the commit
uses: actions/checkout@v4
with:
path: libs/context
- name: Checkout library dependencies
run: python tools/boostdep/depinst/depinst.py --git_args "--jobs 10" context
- name: Bootstrap via bash
shell: bash
if: ${{ runner.os != 'Windows' }}
run: ./bootstrap.sh && echo "`pwd`" >> $GITHUB_PATH
- name: Bootstrap via bat
shell: pwsh
if: ${{ runner.os == 'Windows' }}
run: .\bootstrap.bat && echo "$pwd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Dump toolset info
run: b2 libs/config/test//print_config_info toolset=${{ matrix.toolset }} ${{ matrix.options }}
- name: Build and test
run: b2 libs/context/test toolset=${{ matrix.toolset }} ${{ matrix.options }}