@@ -2,104 +2,32 @@ name: CI
22
33on :
44 push :
5- branches : [main, master ]
5+ branches : [main]
66 pull_request :
7- branches : [main, master]
8- workflow_dispatch :
9-
10- permissions :
11- contents : read
12-
13- concurrency :
14- group : ci-${{ github.ref }}
15- cancel-in-progress : true
167
178jobs :
18- build-linux :
9+ build :
10+ name : build + test (linux x86_64, mcpp)
1911 runs-on : ubuntu-latest
20- timeout-minutes : 20
2112 steps :
22- - name : Checkout
23- uses : actions/checkout@v4
24-
25- - name : Setup xmake
26- uses : xmake-io/github-action-setup-xmake@v1
27- with :
28- xmake-version : latest
29- package-cache : true
13+ - uses : actions/checkout@v4
3014
31- - name : Install dependencies
32- run : |
33- sudo apt-get update
34- sudo apt-get install -y build-essential
35-
36- - name : Install Xlings
15+ - name : Install xlings
3716 env :
38- XLINGS_NON_INTERACTIVE : 1
39- run : |
40- curl -fsSL https://raw.githubusercontent.com/d2learn/xlings/refs/heads/main/tools/other/quick_install.sh | bash
41- echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"
42-
43- - name : Install GCC 15.1 with Xlings
44- run : |
45- xlings install gcc@15.1 -y
46-
47- - name : Build
48- run : |
49- xmake f -m release -y -vv
50- xmake build -y -vv mcpplibs-capi-lua
51- xmake -y -vv -j$(nproc)
52-
53- - name : Test
54- run : xmake run capi_lua_test
55-
56- - name : Run examples
17+ XLINGS_VERSION : 0.4.25
5718 run : |
58- xmake run basic
59- xmake run table
60- xmake run function
61- xmake run eval
62-
63- build-macos :
64- runs-on : macos-14
65- timeout-minutes : 20
66- steps :
67- - name : Checkout
68- uses : actions/checkout@v4
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"
6925
70- - name : Install dependencies
71- run : brew install xmake llvm@20
26+ - name : Install workspace tools (.xlings.json → mcpp 0.0.3)
27+ run : xlings install -y
7228
73- - name : Build
74- run : |
75- export PATH=/opt/homebrew/opt/llvm@20/bin:$PATH
76- xmake f --toolchain=llvm --sdk=/opt/homebrew/opt/llvm@20 -m release -y -vv
77- xmake -y -vv -j$(sysctl -n hw.ncpu)
78-
79- build-windows :
80- runs-on : windows-latest
81- timeout-minutes : 20
82- steps :
83- - name : Checkout
84- uses : actions/checkout@v4
29+ - name : Build with mcpp
30+ run : mcpp build
8531
86- - name : Setup xmake
87- uses : xmake-io/github-action-setup-xmake@v1
88- with :
89- xmake-version : latest
90- package-cache : true
91-
92- - name : Build
93- run : |
94- xmake f -m release -y -vv
95- xmake -y -vv -j$env:NUMBER_OF_PROCESSORS
96-
97- - name : Test
98- run : xmake run capi_lua_test
99-
100- - name : Run examples
101- run : |
102- xmake run basic
103- xmake run table
104- xmake run function
105- xmake run eval
32+ - name : Run tests
33+ run : mcpp test
0 commit comments