@@ -2,110 +2,32 @@ name: CI
22
33on :
44 push :
5- branches : [main, master ]
5+ branches : [main]
66 pull_request :
7- branches : [main, master]
8-
9- concurrency :
10- group : ci-${{ github.workflow }}-${{ github.ref }}
11- cancel-in-progress : true
127
138jobs :
14- build-linux :
9+ build :
1510 name : build + test (linux x86_64, mcpp)
16- runs-on : ubuntu-24.04
17- timeout-minutes : 30
18- env :
19- MCPP_HOME : /home/runner/.mcpp
11+ runs-on : ubuntu-latest
2012 steps :
2113 - uses : actions/checkout@v4
2214
23- # mcpp's sandbox (musl-gcc + ninja + binutils) is multi-hundred-MB;
24- # key on mcpp.toml so toolchain changes refresh the cache.
25- - name : Cache mcpp sandbox
26- uses : actions/cache@v4
27- with :
28- path : ~/.mcpp
29- key : mcpp-sandbox-${{ runner.os }}-${{ hashFiles('mcpp.toml') }}
30- restore-keys : |
31- mcpp-sandbox-${{ runner.os }}-
32-
33- - name : Cache xlings
34- uses : actions/cache@v4
35- with :
36- path : ~/.xlings
37- key : xlings-${{ runner.os }}
38- restore-keys : |
39- xlings-${{ runner.os }}-
40-
41- - name : Bootstrap mcpp via xlings
15+ - name : Install xlings
4216 env :
43- XLINGS_NON_INTERACTIVE : ' 1 '
17+ XLINGS_VERSION : 0.4.25
4418 run : |
45- if [ ! -x "$HOME/.xlings/subos/default/bin/xlings" ]; then
46- curl -fsSL https://d2learn.org/xlings-install.sh | bash
47- fi
48- export PATH="$HOME/.xlings/subos/default/bin:$PATH"
49- xlings --version
50- xlings install mcpp -y
51- mcpp --version
52- echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
19+ tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
20+ curl -fsSL -o "/tmp/${tarball}" \
21+ "https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
22+ tar -xzf "/tmp/${tarball}" -C /tmp
23+ "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install
24+ echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
5325
54- - name : Cache target/ (build artifacts + BMIs)
55- uses : actions/cache@v4
56- with :
57- path : target
58- key : mcpp-target-${{ runner.os }}-${{ hashFiles('src/**', 'tests/**', 'mcpp.toml') }}
59- restore-keys : |
60- mcpp-target-${{ runner.os }}-
26+ - name : Install workspace tools (.xlings.json → mcpp 0.0.3)
27+ run : xlings install -y
6128
62- - name : Build
29+ - name : Build with mcpp
6330 run : mcpp build
6431
65- - name : Test
32+ - name : Run tests
6633 run : mcpp test
67-
68- # mcpp is Linux-x86_64 first; macOS/Windows support is still WIP, so the
69- # cross-platform xmake build keeps coverage for those targets.
70- build-macos :
71- name : build (macOS, xmake)
72- runs-on : macos-latest
73- steps :
74- - uses : actions/checkout@v4
75-
76- - name : Setup xmake
77- uses : xmake-io/github-action-setup-xmake@v1
78- with :
79- xmake-version : latest
80- package-cache : true
81-
82- - name : Install LLVM 20
83- run : brew install llvm@20
84-
85- - name : Build
86- run : |
87- xmake f --toolchain=llvm --sdk=/opt/homebrew/opt/llvm@20
88- xmake -y -vv
89-
90- build-windows :
91- name : build + test (Windows, xmake)
92- runs-on : windows-latest
93- steps :
94- - uses : actions/checkout@v4
95-
96- - name : Setup xmake
97- uses : xmake-io/github-action-setup-xmake@v1
98- with :
99- xmake-version : latest
100- package-cache : true
101-
102- - name : Build
103- run : xmake -y -vv
104-
105- - name : Test
106- run : xmake run cmdline_test
107-
108- - name : Run examples (smoke)
109- run : |
110- xmake run with_dispatch -- add python 3.12
111- xmake run with_dispatch -- remove foo
0 commit comments