diff options
| author | ruki <[email protected]> | 2025-12-10 16:05:15 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-10 16:05:15 +0800 |
| commit | 1a69e15b8d9b00ff27d1a2488546ed713e36d36a (patch) | |
| tree | ea62723c91dfbdceafa0802a58d4f64a88da8331 | |
| parent | f2dcbc2e1450c84ed192e57c7f8b03e51717d71e (diff) | |
| parent | 3bd19d8c9f7ddc14bae149b582f450d900d08247 (diff) | |
Merge pull request #7039 from xmake-io/macos
update macos ci
| -rw-r--r-- | .github/workflows/cosmocc.yml | 10 | ||||
| -rw-r--r-- | .github/workflows/macos.yml | 7 | ||||
| -rw-r--r-- | .github/workflows/macos_arm64.yml | 2 | ||||
| -rw-r--r-- | tests/projects/dlang/console/test.lua | 7 | ||||
| -rw-r--r-- | tests/projects/dlang/dub_package/test.lua | 7 | ||||
| -rw-r--r-- | tests/projects/dlang/shared_library/test.lua | 7 | ||||
| -rw-r--r-- | tests/projects/dlang/static_library/test.lua | 7 | ||||
| -rw-r--r-- | tests/projects/hybrid/static_library/src/main.cpp | 5 | ||||
| -rw-r--r-- | tests/projects/hybrid/static_library/src/main2.cpp | 5 | ||||
| -rw-r--r-- | tests/projects/hybrid/static_library/src/test1.c | 3 | ||||
| -rw-r--r-- | tests/projects/hybrid/static_library/src/test2.m | 3 | ||||
| -rw-r--r-- | tests/projects/hybrid/static_library/src/test3.mm | 3 | ||||
| -rw-r--r-- | tests/projects/hybrid/static_library/src/test4.cpp | 3 | ||||
| -rw-r--r-- | tests/projects/hybrid/static_library/src/test5.d | 3 | ||||
| -rw-r--r-- | tests/projects/hybrid/static_library/xmake.lua | 3 | ||||
| -rw-r--r-- | tests/projects/other/multiplats_xcode/test.lua | 2 | ||||
| -rw-r--r-- | tests/projects/other/multiplats_xcode/xmake.lua | 6 |
17 files changed, 18 insertions, 65 deletions
diff --git a/.github/workflows/cosmocc.yml b/.github/workflows/cosmocc.yml index cfe9c3303..924a2210c 100644 --- a/.github/workflows/cosmocc.yml +++ b/.github/workflows/cosmocc.yml @@ -19,17 +19,17 @@ jobs: script: | const fs = require('fs'); const outputFile = process.env.GITHUB_OUTPUT; - + // Always run for release events if (context.eventName === 'release') { fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } - + // Execution probability (default 50%, can be overridden via env) const probability = parseFloat(process.env.RUN_PROBABILITY || '0.5'); - + // Generate deterministic "random" number based on commit SHA, run ID, and current time // Adding time ensures better randomness while keeping same commit/run consistent const timeSeed = Math.floor(Date.now() / (1000 * 60 * 60)); // Round to hour for consistency @@ -43,7 +43,7 @@ jobs: // Normalize to 0-1 range const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - + // Use environment file instead of deprecated set-output fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { @@ -59,7 +59,7 @@ jobs: if: needs.check.outputs.should-run == 'true' strategy: matrix: - os: [ubuntu-latest, macos-13] + os: [ubuntu-latest, macos-15-intel] arch: [x86_64] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 623d1f858..57feb362f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - os: [macos-13] + os: [macos-15-intel] arch: [x86_64] runs-on: ${{ matrix.os }} @@ -33,11 +33,6 @@ jobs: - uses: little-core-labs/[email protected] id: tagName - - name: Installation - run: | - brew install dmd - brew install dub - - name: Tests run: | xmake lua -v -D tests/run.lua diff --git a/.github/workflows/macos_arm64.yml b/.github/workflows/macos_arm64.yml index de909462d..07f7e8fbd 100644 --- a/.github/workflows/macos_arm64.yml +++ b/.github/workflows/macos_arm64.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - os: [macos-14] + os: [macos-latest] arch: [arm64] runs-on: ${{ matrix.os }} diff --git a/tests/projects/dlang/console/test.lua b/tests/projects/dlang/console/test.lua deleted file mode 100644 index 060aa6ca5..000000000 --- a/tests/projects/dlang/console/test.lua +++ /dev/null @@ -1,7 +0,0 @@ -function main(t) - if is_host("macosx") and os.arch() ~= "arm64" then - t:build() - else - return t:skip("wrong host platform") - end -end diff --git a/tests/projects/dlang/dub_package/test.lua b/tests/projects/dlang/dub_package/test.lua deleted file mode 100644 index 060aa6ca5..000000000 --- a/tests/projects/dlang/dub_package/test.lua +++ /dev/null @@ -1,7 +0,0 @@ -function main(t) - if is_host("macosx") and os.arch() ~= "arm64" then - t:build() - else - return t:skip("wrong host platform") - end -end diff --git a/tests/projects/dlang/shared_library/test.lua b/tests/projects/dlang/shared_library/test.lua deleted file mode 100644 index 060aa6ca5..000000000 --- a/tests/projects/dlang/shared_library/test.lua +++ /dev/null @@ -1,7 +0,0 @@ -function main(t) - if is_host("macosx") and os.arch() ~= "arm64" then - t:build() - else - return t:skip("wrong host platform") - end -end diff --git a/tests/projects/dlang/static_library/test.lua b/tests/projects/dlang/static_library/test.lua deleted file mode 100644 index 060aa6ca5..000000000 --- a/tests/projects/dlang/static_library/test.lua +++ /dev/null @@ -1,7 +0,0 @@ -function main(t) - if is_host("macosx") and os.arch() ~= "arm64" then - t:build() - else - return t:skip("wrong host platform") - end -end diff --git a/tests/projects/hybrid/static_library/src/main.cpp b/tests/projects/hybrid/static_library/src/main.cpp index effbee53a..cbdec8718 100644 --- a/tests/projects/hybrid/static_library/src/main.cpp +++ b/tests/projects/hybrid/static_library/src/main.cpp @@ -1,7 +1,6 @@ #include "test.h" - -int main(int argc, char** argv) -{ + +int main(int argc, char** argv) { test1(); #ifdef MACOSX test2(); diff --git a/tests/projects/hybrid/static_library/src/main2.cpp b/tests/projects/hybrid/static_library/src/main2.cpp index 73890bc01..237f7c319 100644 --- a/tests/projects/hybrid/static_library/src/main2.cpp +++ b/tests/projects/hybrid/static_library/src/main2.cpp @@ -1,7 +1,6 @@ #include "test.h" - -int main(int argc, char** argv) -{ + +int main(int argc, char** argv) { test5(); return 0; } diff --git a/tests/projects/hybrid/static_library/src/test1.c b/tests/projects/hybrid/static_library/src/test1.c index 8e0c1e021..9ff375333 100644 --- a/tests/projects/hybrid/static_library/src/test1.c +++ b/tests/projects/hybrid/static_library/src/test1.c @@ -1,5 +1,4 @@ #include "test.h" -void test1() -{ +void test1() { } diff --git a/tests/projects/hybrid/static_library/src/test2.m b/tests/projects/hybrid/static_library/src/test2.m index 2164a8bf5..88c8f9616 100644 --- a/tests/projects/hybrid/static_library/src/test2.m +++ b/tests/projects/hybrid/static_library/src/test2.m @@ -1,5 +1,4 @@ #include "test.h" -void test2() -{ +void test2() { } diff --git a/tests/projects/hybrid/static_library/src/test3.mm b/tests/projects/hybrid/static_library/src/test3.mm index ea33c33d5..acc6a6371 100644 --- a/tests/projects/hybrid/static_library/src/test3.mm +++ b/tests/projects/hybrid/static_library/src/test3.mm @@ -1,5 +1,4 @@ #include "test.h" -void test3() -{ +void test3() { } diff --git a/tests/projects/hybrid/static_library/src/test4.cpp b/tests/projects/hybrid/static_library/src/test4.cpp index 3cdf598a2..f9e02cf45 100644 --- a/tests/projects/hybrid/static_library/src/test4.cpp +++ b/tests/projects/hybrid/static_library/src/test4.cpp @@ -1,5 +1,4 @@ #include "test.h" -void test4() -{ +void test4() { } diff --git a/tests/projects/hybrid/static_library/src/test5.d b/tests/projects/hybrid/static_library/src/test5.d index d6519665d..c2ad9f900 100644 --- a/tests/projects/hybrid/static_library/src/test5.d +++ b/tests/projects/hybrid/static_library/src/test5.d @@ -1,5 +1,4 @@ -extern(C) int test5() -{ +extern(C) int test5() { return 5; } diff --git a/tests/projects/hybrid/static_library/xmake.lua b/tests/projects/hybrid/static_library/xmake.lua index 5d0ef1494..560343ced 100644 --- a/tests/projects/hybrid/static_library/xmake.lua +++ b/tests/projects/hybrid/static_library/xmake.lua @@ -15,10 +15,11 @@ target("demo") add_defines("MACOSX") end +--[[ target("demo2") set_kind("binary") add_files("src/main2.cpp", "src/*.d") if not is_plat("macosx") then set_enabled(false) end - +]] diff --git a/tests/projects/other/multiplats_xcode/test.lua b/tests/projects/other/multiplats_xcode/test.lua index 196797077..2bf740b51 100644 --- a/tests/projects/other/multiplats_xcode/test.lua +++ b/tests/projects/other/multiplats_xcode/test.lua @@ -2,7 +2,5 @@ function main(t) if is_host("macosx") then os.exec("xmake f -c -vD") os.exec("xmake -rvD") - os.exec("xmake f -c -vD -p iphoneos") - os.exec("xmake -rvD") end end diff --git a/tests/projects/other/multiplats_xcode/xmake.lua b/tests/projects/other/multiplats_xcode/xmake.lua index e8fbbb372..c69dfcdd4 100644 --- a/tests/projects/other/multiplats_xcode/xmake.lua +++ b/tests/projects/other/multiplats_xcode/xmake.lua @@ -7,9 +7,3 @@ target("test_iphoneos") set_kind("binary") add_files("src/*.c") set_plat("iphoneos") - -target("test_iphoneos_armv7") - set_kind("binary") - add_files("src/*.c") - set_plat("iphoneos") - set_arch("armv7") |
