Skip to content

Enable CI job to build via CMake #1366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2025
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
19 changes: 18 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
tests:
name: Test
name: Test (SwiftPM)
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
with:
linux_swift_versions: '["nightly-main"]'
Expand All @@ -18,6 +18,23 @@ jobs:
macos_xcode_versions: '["16.3"]'
macos_versions: '["sequoia"]'

cmake_build:
name: Build (CMake)
runs-on: ubuntu-latest
container: swiftlang/swift:nightly-main-noble
steps:
- name: Checkout Sources
uses: actions/checkout@v1
- name: Install Dependencies
shell: bash
run: apt update && apt install -y cmake ninja-build
- name: Configure Project
shell: bash
run: cmake -G 'Ninja' -B build -S . -DCMAKE_C_COMPILER=clang -DCMAKE_Swift_COMPILER=swiftc -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=YES
- name: Build Project
shell: bash
run: cmake --build build

soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ else()
message(STATUS "_SwiftFoundationICU_SourceDIR not provided, checking out local copy of swift-foundation-icu")
FetchContent_Declare(SwiftFoundationICU
GIT_REPOSITORY https://github.com/apple/swift-foundation-icu.git
GIT_TAG 0.0.9)
GIT_TAG main)
endif()

if (_SwiftCollections_SourceDIR)
Expand Down
2 changes: 1 addition & 1 deletion Sources/FoundationMacros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if(NOT SwiftSyntax_FOUND)
# If building at desk, check out and link against the SwiftSyntax repo's targets
FetchContent_Declare(SwiftSyntax
GIT_REPOSITORY https://github.com/swiftlang/swift-syntax.git
GIT_TAG 600.0.0)
GIT_TAG main)
FetchContent_MakeAvailable(SwiftSyntax)
else()
message(STATUS "SwiftSyntax_DIR provided, using swift-syntax from ${SwiftSyntax_DIR}")
Expand Down
Loading