Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

env:
XLINGS_VERSION: v0.4.2

jobs:
build-linux:
runs-on: ubuntu-latest
Expand All @@ -22,12 +25,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
package-cache: true

- name: Install dependencies
run: |
sudo apt-get update
Expand All @@ -42,34 +39,45 @@ jobs:

- name: Install GCC 15.1 with Xlings
run: |
xlings install gcc@15.1 -y
xlings install --verbose
xmake --version
gcc --version
cc --version

- name: Build
run: |
xmake f -m release -y -vv
xmake -y -vv -j$(nproc)

- name: Test
run: xmake run templates_test
run: xmake run primitives_test

- name: Run examples
run: xmake run basic

build-macos:
runs-on: macos-14
runs-on: macos-15
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: brew install xmake llvm@20
- name: Install Xlings
env:
XLINGS_NON_INTERACTIVE: 1
run: |
curl -fsSL https://d2learn.org/xlings-install.sh | bash
echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"

- name: Build
- name: Install Project Dependencies via Xlings
run: |
xlings install
clang --version

- name: Build with xmake
run: |
export PATH=/opt/homebrew/opt/llvm@20/bin:$PATH
xmake f --toolchain=llvm --sdk=/opt/homebrew/opt/llvm@20 -m release -y -vv
xmake -y -vv -j$(sysctl -n hw.ncpu)
xmake f -m release --toolchain=llvm -vv -y
xmake -j$(nproc)

build-windows:
runs-on: windows-latest
Expand All @@ -90,7 +98,7 @@ jobs:
xmake -y -vv -j$env:NUMBER_OF_PROCESSORS

- name: Test
run: xmake run templates_test
run: xmake run primitives_test

- name: Run examples
run: xmake run basic
9 changes: 9 additions & 0 deletions .xlings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"workspace": {
"cmake": "4.0.2",
"ninja": "1.12.1",
"xmake": "3.0.7",
"gcc": { "linux": "15.1.0" },
"llvm": { "macosx": "20" }
}
}
9 changes: 0 additions & 9 deletions config.xlings

This file was deleted.

2 changes: 1 addition & 1 deletion tests/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_requires("gtest")

target("primitives_test")
set_kind("binary")
add_files("*.cpp")
add_files("basic/*.cpp")
add_deps("mcpplibs-primitives")
add_packages("gtest")
set_policy("build.c++.modules", true)
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set_languages("c++23")

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

if not is_host("macosx") then
Expand Down
Loading