From dda389ed2bd14e91ce497e5d46959dadc5f35507 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Tue, 7 Jul 2026 16:23:09 -0700 Subject: [PATCH 1/4] Fix cmake configuration --- Sources/System/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/System/CMakeLists.txt b/Sources/System/CMakeLists.txt index cb4f8d0..7816f1a 100644 --- a/Sources/System/CMakeLists.txt +++ b/Sources/System/CMakeLists.txt @@ -47,6 +47,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux) IORing/IOCompletion.swift IORing/IORequest.swift IORing/IORing.swift + IORing/IORing+Util.swift IORing/RawIORequest.swift) endif() target_sources(SystemPackage PRIVATE From a10991ab886726bfa578819b34f7c2460a92d94c Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Wed, 8 Jul 2026 19:22:19 -0700 Subject: [PATCH 2/4] Fix a test flakiness issue These timestamps are frequently equal on Android, causing spurious failures. --- Tests/SystemTests/StatTests.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/SystemTests/StatTests.swift b/Tests/SystemTests/StatTests.swift index fac1ae0..e80ede1 100644 --- a/Tests/SystemTests/StatTests.swift +++ b/Tests/SystemTests/StatTests.swift @@ -339,9 +339,9 @@ private struct StatTests { } let stat2 = try file2.stat() - #expect(stat2.st_atim > file1AccessTime2) - #expect(stat2.st_mtim > file1ModificationTime2) - #expect(stat2.st_ctim > file1ChangeTime2) + #expect(stat2.st_atim >= file1AccessTime2) + #expect(stat2.st_mtim >= file1ModificationTime2) + #expect(stat2.st_ctim >= file1ChangeTime2) #if SYSTEM_PACKAGE_DARWIN || os(FreeBSD) #expect(stat2.st_birthtim > file1CreationTime2) #endif From 0601f0edece3dc6f47a927b0e8615064fb2bf337 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Wed, 8 Jul 2026 18:44:07 -0700 Subject: [PATCH 3/4] [ci] validate cmake build on Linux --- .github/workflows/pull_request.yml | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 14354cb..52feae9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -75,6 +75,39 @@ jobs: # Enable availability to match ABI stable verion of system. swift_flags: "-Xbuild-tools-swiftc -DSYSTEM_CI -Xbuild-tools-swiftc -DSYSTEM_ABI_STABLE" + cmake_build: + name: CMake Validation + runs-on: ubuntu-latest + container: swiftlang/swift:nightly-main-noble + steps: + - name: Copy Sources + uses: actions/checkout@v6 + - name: Install Dependencies + shell: bash + run: apt update && apt install -y cmake ninja-build jq + - name: Configure Project + shell: bash + run: | + mkdir -p build/.cmake/api/v1/query + touch build/.cmake/api/v1/query/codemodel-v2 + cmake -G 'Ninja' -B build -S . -DCMAKE_C_COMPILER=clang -DCMAKE_Swift_COMPILER=swiftc -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=YES + - name: Validate CMake File Lists + shell: bash + run: | + swift package describe --type json > /tmp/swiftpm.json + cat build/.cmake/api/v1/reply/target-SystemPackage-*.json > /tmp/cmake.json + jq '.targets[] | select(.name == "SystemPackage") | .sources[]' /tmp/swiftpm.json | sort > /tmp/swiftpm-list.txt + jq '.sources[].path[15:]' /tmp/cmake.json | sort > /tmp/cmake-list.txt + comm -23 /tmp/swiftpm-list.txt /tmp/cmake-list.txt > /tmp/missing.txt + test ! -s /tmp/missing.txt + exit_code=$? + test $exit_code -ne 0 && echo "::notice::SystemPackage CMakeLists.txt matches SwiftPM" + test $exit_code -eq 0 || echo "::error::SystemPackage CMakeLists.txt does not match SwiftPM" + exit $exit_code + - name: Build Project with CMake + shell: bash + run: cmake --build build + soundness: name: Soundness uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.12 From f05c1d815dc4bcc73fb53382fc13efba6b136ca5 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Thu, 9 Jul 2026 11:33:38 -0700 Subject: [PATCH 4/4] [ci] improve cmake-checking script Co-authored-by: Jonathan Flat --- .github/workflows/pull_request.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 52feae9..9aade4d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -99,11 +99,12 @@ jobs: jq '.targets[] | select(.name == "SystemPackage") | .sources[]' /tmp/swiftpm.json | sort > /tmp/swiftpm-list.txt jq '.sources[].path[15:]' /tmp/cmake.json | sort > /tmp/cmake-list.txt comm -23 /tmp/swiftpm-list.txt /tmp/cmake-list.txt > /tmp/missing.txt - test ! -s /tmp/missing.txt - exit_code=$? - test $exit_code -ne 0 && echo "::notice::SystemPackage CMakeLists.txt matches SwiftPM" - test $exit_code -eq 0 || echo "::error::SystemPackage CMakeLists.txt does not match SwiftPM" - exit $exit_code + if [ -s /tmp/missing.txt ]; then + echo "::error::SystemPackage CMakeLists.txt does not match SwiftPM. Missing sources:" + cat /tmp/missing.txt + exit 1 + fi + echo "::notice::SystemPackage CMakeLists.txt matches SwiftPM" - name: Build Project with CMake shell: bash run: cmake --build build