summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-01-20 18:07:54 +0800
committerGitHub <[email protected]>2025-01-20 18:07:54 +0800
commitc61d7bb40353b161da913bdcbc6fa399e36164a1 (patch)
treeb56b24a4774d7131730a23961b0184239abe08d3
parentbd6386af90d9b3cafbb76e23bdffac19d9cdffea (diff)
parent22346776a83fda03c2b1e5054d049ff352dac0fd (diff)
Merge pull request #6093 from xmake-io/ci
improve linux arm64 ci
-rw-r--r--.github/workflows/linux_arm64.yml35
-rw-r--r--.github/workflows/ubuntu_arm.yml36
-rw-r--r--.github/workflows/ubuntu_arm64.yml36
-rw-r--r--tests/projects/c++/modules/test_headerunits.lua3
-rw-r--r--tests/test_utils/test_build.lua3
-rw-r--r--xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua2
6 files changed, 40 insertions, 75 deletions
diff --git a/.github/workflows/linux_arm64.yml b/.github/workflows/linux_arm64.yml
new file mode 100644
index 000000000..c25081ef0
--- /dev/null
+++ b/.github/workflows/linux_arm64.yml
@@ -0,0 +1,35 @@
+name: Linux (Arm64)
+
+on:
+ pull_request:
+ push:
+ release:
+ types: [published]
+
+jobs:
+ build:
+ runs-on: ubuntu-24.04-arm
+
+ concurrency:
+ group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Ubuntu-Arm64
+ cancel-in-progress: true
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: prepare local xmake
+ run: cp -rf . ../xmake-source
+ - uses: xmake-io/github-action-setup-xmake@v1
+ with:
+ xmake-version: local#../xmake-source
+
+ - name: Prepare
+ run: |
+ sudo apt update
+ sudo apt install -y unzip build-essential llvm libc++-dev
+
+ - name: Tests
+ run: |
+ xmake lua -v -D tests/run.lua
+ xrepo --version
+
diff --git a/.github/workflows/ubuntu_arm.yml b/.github/workflows/ubuntu_arm.yml
deleted file mode 100644
index ad8a6f229..000000000
--- a/.github/workflows/ubuntu_arm.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Ubuntu (Arm)
-
-on:
- pull_request:
- push:
- release:
- types: [published]
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- concurrency:
- group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-UbuntuArm
- cancel-in-progress: true
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
-
- - run: |
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
-
- - uses: docker://multiarch/ubuntu-core:armhf-bionic
- with:
- args: >
- bash -c
- "uname -a &&
- apt update && apt install -y unzip &&
- cd /github/workspace &&
- ./scripts/get.sh __local__ &&
- source ~/.xmake/profile &&
- export XMAKE_ROOT=y &&
- export XMAKE_TMPDIR=/tmp &&
- xmake lua -v -D tests/run.lua && xrepo --version"
-
diff --git a/.github/workflows/ubuntu_arm64.yml b/.github/workflows/ubuntu_arm64.yml
deleted file mode 100644
index c2b6d4370..000000000
--- a/.github/workflows/ubuntu_arm64.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Ubuntu (Arm64)
-
-on:
- pull_request:
- push:
- release:
- types: [published]
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- concurrency:
- group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-UbuntuArm64
- cancel-in-progress: true
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
-
- - run: |
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
-
- - uses: docker://multiarch/ubuntu-core:arm64-bionic
- with:
- args: >
- bash -c
- "uname -a &&
- apt update && apt install -y unzip &&
- cd /github/workspace &&
- ./scripts/get.sh __local__ &&
- source ~/.xmake/profile &&
- export XMAKE_ROOT=y &&
- export XMAKE_TMPDIR=/tmp &&
- xmake lua -v -D tests/run.lua && xrepo --version"
-
diff --git a/tests/projects/c++/modules/test_headerunits.lua b/tests/projects/c++/modules/test_headerunits.lua
index b13b22a7f..aaa350c7c 100644
--- a/tests/projects/c++/modules/test_headerunits.lua
+++ b/tests/projects/c++/modules/test_headerunits.lua
@@ -44,7 +44,8 @@ function main(t)
-- _build()
elseif is_host("linux") then
local gcc = find_tool("gcc", {version = true})
- if gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 then
+ if gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 and
+ os.arch() ~= "arm64" then -- gcc/arm64: internal compiler error: in core_vals, at cp/module.cc:6108
-- gcc dependency detection doesn't support header units atm
os.exec("xmake f --policies=build.c++.gcc.fallbackscanner -c --yes")
_build()
diff --git a/tests/test_utils/test_build.lua b/tests/test_utils/test_build.lua
index 002c46e1a..8a2b75ce9 100644
--- a/tests/test_utils/test_build.lua
+++ b/tests/test_utils/test_build.lua
@@ -4,7 +4,8 @@ function test_build:build(argv)
os.exec("xmake f -c -D -y")
os.exec("xmake")
os.rm("build")
- os.exec("xmake f -c -D -y --policies=compatibility.version=3.0")
+ --os.exec("xmake f -c -D -y --policies=compatibility.version:3.0")
+ os.exec("xmake f -c -D -y --policies=compatibility.version=3.0") -- FIXME
os.exec("xmake -r")
end
diff --git a/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua b/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua
index fb375fcb7..06b522ce8 100644
--- a/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua
+++ b/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua
@@ -56,7 +56,7 @@ function generate_dependency_for(target, sourcefile, opt)
print(os.args(table.join(clangscandeps, dependency_flags)))
end
local outdata, errdata = os.iorunv(clangscandeps, dependency_flags)
- assert(errdata, errdata)
+ assert(outdata, errdata)
io.writefile(jsonfile, outdata)
else