-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (106 loc) · 3.53 KB
/
cpp_cmake.yml
File metadata and controls
116 lines (106 loc) · 3.53 KB
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
name: C++ w/CMake
on:
push:
branches: ["main"]
paths: [".github/workflows/cpp_cmake.yml", "cpp/**"]
pull_request:
branches: ["main"]
paths: [".github/workflows/cpp_cmake.yml", "cpp/**"]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
cpp-matrix:
runs-on: ubuntu-latest
name: Generate Test Matrix
outputs:
matrix: ${{ steps.cpp-matrix.outputs.matrix }}
steps:
- name: Generate Test Matrix
uses: alandefreitas/cpp-actions/cpp-matrix@develop
id: cpp-matrix
with:
compilers: |
gcc >= 4.8
clang >= 3.9
msvc >= 14.0
apple-clang *
mingw *
clang-cl *
standards: ">=11"
max-standards: 6
latest-factors: |
gcc Asan TSan UBSan
clang BoundsSan IntSan
factors: |
gcc Shared
msvc Shared x86
mingw Shared
subrange-policy: |
msvc: one-per-minor
trace-commands: true
build:
needs: cpp-matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.cpp-matrix.outputs.matrix) }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
container: ${{ matrix.container }}
steps:
# GitHub Actions no longer support older containers.
# The workaround is to install our own Node.js for the actions.
- name: Patch Node
# The containers that need Node.js 24 will have volumes set up so that
# the Node.js 24 installation can go there.
if: ${{ matrix.container.volumes }}
run: |
set -x
apt-get update
apt-get install -y curl xz-utils
curl -LO https://archives.boost.io/misc/node/node-v24.15.0-linux-x64-glibc-217.tar.xz
ls -laF /
tar -xf node-v24.15.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node24
- name: Setup C++ Compiler
uses: alandefreitas/cpp-actions/setup-cpp@develop
id: setup-cpp
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
- name: Install Packages
if: matrix.install != ''
uses: alandefreitas/cpp-actions/package-install@develop
id: package-install
with:
apt-get: ${{ matrix.install }} unzip wget git
apt-get-sources: 'ppa:git-core/ppa'
- name: Clone Library
uses: actions/checkout@master
- name: Setup CMake
uses: alandefreitas/cpp-actions/setup-cmake@develop
id: setup-cmake
with:
version: ">=3.31"
check-latest: true
trace-commands: true
- name: Test
uses: alandefreitas/cpp-actions/cmake-workflow@develop
with:
source-dir: cpp
cmake-path: ${{ steps.setup-cmake.outputs.path }}
cmake-version: ${{ steps.setup-cmake.outputs.version }}
generator: ${{ matrix.generator }}
generator-toolset: ${{ matrix.generator-toolset }}
build-type: ${{ matrix.build-type }}
run-tests: true
cxxstd: ${{ matrix.cxxstd }}
cc: ${{ steps.setup-cpp.outputs.cc }}
ccflags: ${{ matrix.ccflags }}
cxx: ${{ steps.setup-cpp.outputs.cxx }}
cxxflags: ${{ matrix.cxxflags }}
shared: ${{ matrix.shared }}
extra-args: >-
${{ ( matrix.no-deps && '-D CPP_ACTIONS_NO_DEPS=ON' ) || '' }}
export-compile-commands: ${{ matrix.time-trace }}
install: false
trace-commands: true