Skip to content

Commit 522bf7f

Browse files
Merge pull request #1 from mcpplibs/update_ci
- fix CI - fix XMake config
2 parents c0358ad + e17d81c commit 522bf7f

File tree

5 files changed

+35
-27
lines changed

5 files changed

+35
-27
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ concurrency:
1414
group: ci-${{ github.ref }}
1515
cancel-in-progress: true
1616

17+
env:
18+
XLINGS_VERSION: v0.4.2
19+
1720
jobs:
1821
build-linux:
1922
runs-on: ubuntu-latest
@@ -22,12 +25,6 @@ jobs:
2225
- name: Checkout
2326
uses: actions/checkout@v4
2427

25-
- name: Setup xmake
26-
uses: xmake-io/github-action-setup-xmake@v1
27-
with:
28-
xmake-version: latest
29-
package-cache: true
30-
3128
- name: Install dependencies
3229
run: |
3330
sudo apt-get update
@@ -42,34 +39,45 @@ jobs:
4239
4340
- name: Install GCC 15.1 with Xlings
4441
run: |
45-
xlings install gcc@15.1 -y
42+
xlings install --verbose
43+
xmake --version
44+
gcc --version
45+
cc --version
4646
4747
- name: Build
4848
run: |
4949
xmake f -m release -y -vv
5050
xmake -y -vv -j$(nproc)
5151
5252
- name: Test
53-
run: xmake run templates_test
53+
run: xmake run primitives_test
5454

5555
- name: Run examples
5656
run: xmake run basic
5757

5858
build-macos:
59-
runs-on: macos-14
59+
runs-on: macos-15
6060
timeout-minutes: 20
6161
steps:
6262
- name: Checkout
6363
uses: actions/checkout@v4
6464

65-
- name: Install dependencies
66-
run: brew install xmake llvm@20
65+
- name: Install Xlings
66+
env:
67+
XLINGS_NON_INTERACTIVE: 1
68+
run: |
69+
curl -fsSL https://d2learn.org/xlings-install.sh | bash
70+
echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"
6771
68-
- name: Build
72+
- name: Install Project Dependencies via Xlings
73+
run: |
74+
xlings install
75+
clang --version
76+
77+
- name: Build with xmake
6978
run: |
70-
export PATH=/opt/homebrew/opt/llvm@20/bin:$PATH
71-
xmake f --toolchain=llvm --sdk=/opt/homebrew/opt/llvm@20 -m release -y -vv
72-
xmake -y -vv -j$(sysctl -n hw.ncpu)
79+
xmake f -m release --toolchain=llvm -vv -y
80+
xmake -j$(nproc)
7381
7482
build-windows:
7583
runs-on: windows-latest
@@ -90,7 +98,7 @@ jobs:
9098
xmake -y -vv -j$env:NUMBER_OF_PROCESSORS
9199
92100
- name: Test
93-
run: xmake run templates_test
101+
run: xmake run primitives_test
94102

95103
- name: Run examples
96104
run: xmake run basic

.xlings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"workspace": {
3+
"cmake": "4.0.2",
4+
"ninja": "1.12.1",
5+
"xmake": "3.0.7",
6+
"gcc": { "linux": "15.1.0" },
7+
"llvm": { "macosx": "20" }
8+
}
9+
}

config.xlings

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ add_requires("gtest")
66

77
target("primitives_test")
88
set_kind("binary")
9-
add_files("*.cpp")
9+
add_files("basic/*.cpp")
1010
add_deps("mcpplibs-primitives")
1111
add_packages("gtest")
1212
set_policy("build.c++.modules", true)

xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set_languages("c++23")
44

55
target("mcpplibs-primitives")
66
set_kind("static")
7-
add_files("src/*.cppm", { public = true, install = true })
7+
add_files("src/**.cppm", { public = true, install = true })
88
set_policy("build.c++.modules", true)
99

1010
if not is_host("macosx") then

0 commit comments

Comments
 (0)