-
Notifications
You must be signed in to change notification settings - Fork 4
166 lines (165 loc) · 5.46 KB
/
cpp-internal.yml
File metadata and controls
166 lines (165 loc) · 5.46 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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: C++ Internal
on:
schedule:
- cron: 0 1 * * * # Nightly at 01:00 UTC
push:
branches:
- master
pull_request:
jobs:
linux_cmake:
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
config:
- runner: ubuntu-current
name: GCC Latest
toolchain: "./resolve_symlinks/toolchains/gcc-toolchain.cmake"
- runner: ubuntu-current
name: Clang Latest
toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake"
- runner: ubuntu-current
name: Clang ASAN Latest
toolchain: "./resolve_symlinks/toolchains/clang-asan-toolchain.cmake"
- runner: ubuntu-current
name: Clang TSAN Latest
toolchain: "./resolve_symlinks/toolchains/clang-tsan-toolchain.cmake"
- runner: ubuntu-current
name: Clang UBSAN Latest
toolchain: "./resolve_symlinks/toolchains/clang-ubsan-toolchain.cmake"
- runner: ubuntu-old
name: GCC Oldest
toolchain: "./resolve_symlinks/toolchains/gcc-toolchain.cmake"
- runner: ubuntu-old
name: Clang Oldest
toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake"
runs-on:
- self-hosted
- vm
- ${{ matrix.config.runner }}
name: ${{ matrix.config.name }}
steps:
- name: Ensure correct owner of repository
run: sudo chown -R actions-runner:actions-runner .
- name: Checkout source code
uses: actions/checkout@v3
- name: Waf Configure
run: python3 waf configure --git_protocol=git@ --cmake_toolchain=${{ matrix.config.toolchain }} --cmake_verbose
- name: Waf Build
run: python3 waf build
- name: Waf Run Tests
run: python3 waf --run_tests
valgrind:
timeout-minutes: 45
runs-on:
- self-hosted
- vm
- ubuntu-current
name: Valgrind
steps:
- name: Ensure correct owner of repository
run: sudo chown -R actions-runner:actions-runner .
- name: Checkout source code
uses: actions/checkout@v3
- name: Waf Configure
run: python3 waf configure --git_protocol=git@ --cmake_toolchain=./resolve_symlinks/toolchains/gcc-toolchain.cmake --cmake_verbose
- name: Waf Build
run: python3 waf build
- name: Waf Run Tests
run: python3 waf --run_tests --ctest_valgrind
zig_toolchain_build:
name: Zig Toolchain Build (Docker)
runs-on: [self-hosted, vm, ubuntu-current]
container:
image: ghcr.io/steinwurf/build-images/zig-cpp
options: --user 0:0
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Configure Github Authentication
run: |
git config --global credential.helper 'store'
git credential approve <<EOF
protocol=https
host=github.com
username=x-access-token
password=${{ secrets.GH_ACCESS_TOKEN }}
EOF
- name: Waf Configure with Zig Toolchain
run: python3 waf configure --git_protocol=https:// --cmake_toolchain=./resolve_symlinks/toolchains/zig-toolchain-x86_64-linux-musl.cmake --cmake_verbose
- name: Waf Build with Zig Toolchain
run: python3 waf build
- name: Waf Run Tests
run: python3 waf --run_tests
macos_cmake:
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
config:
- arch: ARM64
os: big_sur
name: Apple Big Sur (ARM)
toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake"
runs-on:
- self-hosted
- macOS
- ${{ matrix.config.os }}
- ${{ matrix.config.arch }}
- cmake
- builder
name: ${{ matrix.config.name }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Waf Configure
run: python3 waf configure --git_protocol=git@ --cmake_toolchain=${{ matrix.config.toolchain }} --cmake_verbose
- name: Waf Build
run: python3 waf build
- name: Waf Run Tests
run: python3 waf --run_tests
windows_cmake:
timeout-minutes: 45
strategy:
fail-fast: false
runs-on: [self-hosted, windows, vm, windows-current]
name: Windows
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Waf Configure
run: python waf configure --git_protocol=git@ --cmake_verbose
- name: Waf Build
run: python waf build
- name: Waf Run Tests
run: python waf --run_tests
clang-format:
timeout-minutes: 45
name: Clang-Format
runs-on: [self-hosted, vm, ubuntu-current]
steps:
- name: Ensure correct owner of repository
run: sudo chown -R actions-runner:actions-runner .
- name: Clang format version
run: clang-format --version
- name: Checkout source code
uses: actions/checkout@v3
- name: Run Clang-format
run: find ./ -iname *.hpp -o -iname *.cpp -o -iname *.c -o -iname *.h | xargs clang-format --dry-run --Werror
workflow-keepalive:
if: github.event_name == 'schedule'
runs-on: [self-hosted, vm, ubuntu-current]
permissions:
actions: write
steps:
- name: Install GitHub CLI
run: |
sudo apt update
sudo apt install -y gh
- uses: liskin/gh-workflow-keepalive@v1
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true