Repository navigation
145 lines (121 loc) · 4.92 KB
/
Copy pathci.yml
File metadata and controls
145 lines (121 loc) · 4.92 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
mcpp:
name: mcpp (${{ matrix.os }}, ${{ matrix.toolchain }})
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-24.04, toolchain: 'gcc@16.1.0' }
- { os: ubuntu-24.04, toolchain: 'llvm@23.1.3' }
- { os: ubuntu-24.04-arm, toolchain: 'gcc@16.1.0' }
- { os: ubuntu-24.04-arm, toolchain: 'llvm@23.1.3' }
- { os: macos-15, toolchain: 'llvm@23.1.3' }
- { os: windows-2025, toolchain: 'llvm@23.1.3' }
runs-on: ${{ matrix.os }}
timeout-minutes: 60
defaults:
run:
shell: bash
env:
XLINGS_NON_INTERACTIVE: 1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Mwrap identity and bilingual README contract
run: python3 tools/check_mwrap_release.py
- name: Install Xlings (Linux/macOS)
if: runner.os != 'Windows'
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/refs/heads/main/tools/other/quick_install.sh | bash
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
- name: Install Xlings (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
irm https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.ps1 | iex
"$env:USERPROFILE\.xlings\subos\current\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install project tools (.xlings.json)
run: |
for attempt in 1 2 3; do
xlings update > /dev/null 2>&1 || true
if xlings install; then break; fi
[ "$attempt" = 3 ] && exit 1
sleep 30
done
mcpp --version
- name: Select the toolchain
run: |
name="${{ matrix.toolchain }}"
mcpp toolchain install "${name%@*}" "${name#*@}"
mcpp toolchain default "$name"
# Until mcpp-index publishes compat.box2d (mcpplibs/mcpp-index#611),
# the compat namespace of this checkout's manifests resolves from that
# PR's branch, as an unchanged namespace view of its descriptors. Once
# the published index has the descriptor, this step does nothing.
- name: Candidate compat index (only while compat.box2d is unpublished)
run: python3 tools/candidate_index.py --ci
- name: Build the modules
run: mcpp build
- name: Tests (the API, every macro and constant mapping against the header, header mixing, determinism)
run: mcpp test
# Optimized (GCC contracts a*b+c into an FMA, if allowed to, only then),
# and with NDEBUG (b2InternalAssert is not declared).
- name: Tests, release profile
run: mcpp test --profile release
- name: Export audit (the generated sources are fresh; every declaration and macro of the public headers)
run: python3 tools/check_exports.py
# The line this row is compared with every other row by: the same sleep
# step and hashes on every platform, compiler and worker count.
- name: Determinism (examples/box2d, dev and release, every worker count and SIMD path, against the pinned hashes)
run: python3 tools/run_determinism.py --toolchain "${{ matrix.toolchain }}"
# The Web: wasm32-emscripten (emsdk from xlings, through mcpp), the tests and
# the determinism runs under node, with the same pinned hashes.
web:
name: mcpp (web, wasm32-emscripten)
runs-on: ubuntu-24.04
timeout-minutes: 60
defaults:
run:
shell: bash
env:
XLINGS_NON_INTERACTIVE: 1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Xlings
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/refs/heads/main/tools/other/quick_install.sh | bash
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
- name: Install project tools (.xlings.json)
run: |
for attempt in 1 2 3; do
xlings update > /dev/null 2>&1 || true
if xlings install; then break; fi
[ "$attempt" = 3 ] && exit 1
sleep 30
done
mcpp --version
- name: Candidate compat index (only while compat.box2d is unpublished)
run: python3 tools/candidate_index.py --ci
- name: Tests under node
run: mcpp test --target wasm32-emscripten
- name: Tests under node, release profile
run: mcpp test --target wasm32-emscripten --profile release
- name: Determinism under node (against the pinned hashes)
run: python3 tools/run_determinism.py --target wasm32-emscripten