Repository navigation
88 lines (75 loc) · 3.27 KB
/
Copy pathci.yml
File metadata and controls
88 lines (75 loc) · 3.27 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
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 }}${{ matrix.args && format(', {0}', matrix.args) || '' }})
strategy:
fail-fast: false
matrix:
# Each C library with each C++ standard library mcpp builds against.
include:
- { os: ubuntu-24.04, toolchain: 'gcc@16.1.0' } # glibc, libstdc++
- { os: ubuntu-24.04, toolchain: 'gcc@16.1.0', args: '--target x86_64-linux-musl' } # musl, libstdc++
- { os: ubuntu-24.04, toolchain: 'llvm@23.1.3' } # glibc, libc++
- { os: ubuntu-24.04, toolchain: 'llvm@23.1.3', args: '--target x86_64-openkal --platform openkal-platform@0.24.0' } # openkal-musl, libc++
- { os: macos-15, toolchain: 'llvm@23.1.3' } # libSystem, libc++
- { os: windows-2025, toolchain: 'llvm@23.1.3' } # the Windows CRT
- { os: windows-2025, toolchain: 'msvc@system' } # the Windows CRT, the MSVC STL
- { os: windows-2025, toolchain: 'llvm@23.1.3', args: '--target x86_64-windows-gnu' } # mingw-w64
runs-on: ${{ matrix.os }}
timeout-minutes: 60
defaults:
run:
shell: bash
env:
XLINGS_NON_INTERACTIVE: 1
ARGS: ${{ matrix.args }}
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 }}"
[ "$name" = msvc@system ] || mcpp toolchain install "${name%@*}" "${name#*@}"
mcpp toolchain default "$name"
- name: Build the modules
run: mcpp build $ARGS
- name: Tests (the streams, errno, the stdio constants, limits, the function-like macros, every mapping against its macro, header mixing)
run: mcpp test $ARGS
- name: Mapping audit (the macros as clang reads them on this host)
if: startsWith(matrix.toolchain, 'llvm') && !matrix.args
run: python3 tools/generate.py --check