diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80d23cf..fda6702 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -42,7 +39,10 @@ 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: | @@ -50,26 +50,34 @@ jobs: 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 @@ -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 diff --git a/.xlings.json b/.xlings.json new file mode 100644 index 0000000..c14ca35 --- /dev/null +++ b/.xlings.json @@ -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" } + } +} \ No newline at end of file diff --git a/config.xlings b/config.xlings deleted file mode 100644 index db3c96c..0000000 --- a/config.xlings +++ /dev/null @@ -1,9 +0,0 @@ -xname = "mcpplibs-templates" - --- install by `xlings install` -xim = { - xmake = "3.0.4", - cmake = "4.0.2", - ninja = "1.12.1", - cpp = "", -- gcc15 or mingw13 -} \ No newline at end of file diff --git a/tests/xmake.lua b/tests/xmake.lua index d113570..fd1d671 100644 --- a/tests/xmake.lua +++ b/tests/xmake.lua @@ -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) diff --git a/xmake.lua b/xmake.lua index 31afa35..3b780dc 100644 --- a/xmake.lua +++ b/xmake.lua @@ -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