Skip to content

Commit 4e0d7b9

Browse files
authored
Enable CI job to build via CMake (#1366)
* Enable CI job to build via CMake * Update cmake dependency branches for swift-foundation-icu and swift-syntax
1 parent a3b92f8 commit 4e0d7b9

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.github/workflows/pull_request.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
tests:
12-
name: Test
12+
name: Test (SwiftPM)
1313
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1414
with:
1515
linux_swift_versions: '["nightly-main"]'
@@ -18,6 +18,23 @@ jobs:
1818
macos_xcode_versions: '["16.3"]'
1919
macos_versions: '["sequoia"]'
2020

21+
cmake_build:
22+
name: Build (CMake)
23+
runs-on: ubuntu-latest
24+
container: swiftlang/swift:nightly-main-noble
25+
steps:
26+
- name: Checkout Sources
27+
uses: actions/checkout@v1
28+
- name: Install Dependencies
29+
shell: bash
30+
run: apt update && apt install -y cmake ninja-build
31+
- name: Configure Project
32+
shell: bash
33+
run: cmake -G 'Ninja' -B build -S . -DCMAKE_C_COMPILER=clang -DCMAKE_Swift_COMPILER=swiftc -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=YES
34+
- name: Build Project
35+
shell: bash
36+
run: cmake --build build
37+
2138
soundness:
2239
name: Soundness
2340
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ else()
7575
message(STATUS "_SwiftFoundationICU_SourceDIR not provided, checking out local copy of swift-foundation-icu")
7676
FetchContent_Declare(SwiftFoundationICU
7777
GIT_REPOSITORY https://github.com/apple/swift-foundation-icu.git
78-
GIT_TAG 0.0.9)
78+
GIT_TAG main)
7979
endif()
8080

8181
if (_SwiftCollections_SourceDIR)

Sources/FoundationMacros/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if(NOT SwiftSyntax_FOUND)
4343
# If building at desk, check out and link against the SwiftSyntax repo's targets
4444
FetchContent_Declare(SwiftSyntax
4545
GIT_REPOSITORY https://github.com/swiftlang/swift-syntax.git
46-
GIT_TAG 600.0.0)
46+
GIT_TAG main)
4747
FetchContent_MakeAvailable(SwiftSyntax)
4848
else()
4949
message(STATUS "SwiftSyntax_DIR provided, using swift-syntax from ${SwiftSyntax_DIR}")

0 commit comments

Comments
 (0)