Skip to content

Commit 63e728d

Browse files
committed
ci: update workflow, version, toolchain settings
1 parent 8c0bd05 commit 63e728d

7 files changed

Lines changed: 63 additions & 65 deletions

File tree

.github/workflows/analysis.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,26 @@ jobs:
1212
fetch-depth: 0
1313
- uses: mobiledevops/xcode-select-version-action@v1
1414
with:
15-
xcode-select-version: "15.1"
15+
xcode-select-version: "15.2.0"
16+
- uses: swift-actions/setup-swift@v2
17+
with:
18+
swift-version: "6.0.2"
1619
- uses: ConorMacBride/install-package@v1.1.0
1720
with:
1821
brew: ninja
19-
- uses: SonarSource/sonarcloud-github-c-cpp@v2
20-
21-
- name: "Run setup-metal-cpp.ps1"
22-
run: ./setup-metal-cpp.ps1
22+
- uses: SonarSource/sonarcloud-github-c-cpp@v3.2.0
23+
- name: "Setup metal-cpp"
24+
run: ./setup-metal-cpp.ps1 -Folder "externals" -FileName "metal-cpp_macOS15.2_iOS18.2.zip"
2325
shell: pwsh
24-
25-
- uses: lukka/run-vcpkg@v11.4
26+
- uses: lukka/get-cmake@v4.0.0
27+
with:
28+
cmakeVersion: "~4.0.0"
29+
- uses: lukka/run-vcpkg@v11.5
2630
with:
27-
vcpkgDirectory: "/usr/local/share/vcpkg" # $VCPKG_INSTALLATION_ROOT
28-
vcpkgGitCommitId: c8696863d371ab7f46e213d8f5ca923c4aef2a00 # 2023.12.12
29-
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json"
31+
vcpkgDirectory: "${{ runner.tool_cache }}/vcpkg"
32+
vcpkgGitCommitId: b02e341c927f16d991edbd915d8ea43eac52096c # 2025.03.19
33+
vcpkgJsonGlob: "**/vcpkg.json"
34+
vcpkgConfigurationJsonGlob: "**/vcpkg-configuration.json"
3035
runVcpkgInstall: true
3136
- uses: lukka/run-cmake@v10.7
3237
with:

.github/workflows/cmake.yml

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,28 @@ on:
88
workflow_dispatch:
99

1010
env:
11-
VCPKG_FEATURE_FLAGS: "manifests,binarycaching"
11+
VCPKG_FEATURE_FLAGS: "manifests,binarycaching,registries"
1212

1313
jobs:
14-
macos12:
15-
runs-on: macos-12
16-
steps:
17-
- uses: actions/checkout@v4
18-
- uses: swift-actions/setup-swift@v1.25.0
19-
with:
20-
swift-version: "5.9.0"
21-
- name: "Setup Metal-cpp"
22-
run: |
23-
./setup-metal-cpp.ps1 -Folder "externals" -FileName "metal-cpp_macOS13.3_iOS16.4.zip"
24-
shell: pwsh
25-
- uses: lukka/run-vcpkg@v11.4
26-
with:
27-
vcpkgDirectory: "/usr/local/share/vcpkg" # $VCPKG_INSTALLATION_ROOT
28-
vcpkgGitCommitId: c8696863d371ab7f46e213d8f5ca923c4aef2a00 # 2023.12.12
29-
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json"
30-
runVcpkgInstall: true
31-
- uses: lukka/run-cmake@v10.7
32-
with:
33-
configurePreset: "x64-osx"
34-
buildPreset: "x64-osx-debug"
35-
testPreset: "x64-osx-debug"
36-
3714
macos13:
3815
runs-on: macos-13
3916
steps:
4017
- uses: actions/checkout@v4
41-
- uses: swift-actions/setup-swift@v1.25.0
18+
- uses: swift-actions/setup-swift@v2
4219
with:
43-
swift-version: "5.9.0"
44-
- name: "Setup Metal-cpp"
45-
run: |
46-
./setup-metal-cpp.ps1 -Folder "externals" -FileName "metal-cpp_macOS14.2_iOS17.2.zip"
20+
swift-version: "6.0.2"
21+
- name: "Setup metal-cpp"
22+
run: ./setup-metal-cpp.ps1 -Folder "externals" -FileName "metal-cpp_macOS15.2_iOS18.2.zip"
4723
shell: pwsh
48-
- uses: lukka/run-vcpkg@v11.4
24+
- uses: lukka/get-cmake@v4.0.0
25+
with:
26+
cmakeVersion: "~4.0.0"
27+
- uses: lukka/run-vcpkg@v11.5
4928
with:
50-
vcpkgDirectory: "/usr/local/share/vcpkg" # $VCPKG_INSTALLATION_ROOT
51-
vcpkgGitCommitId: c8696863d371ab7f46e213d8f5ca923c4aef2a00 # 2023.12.12
52-
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json"
29+
vcpkgDirectory: "${{ runner.tool_cache }}/vcpkg"
30+
vcpkgGitCommitId: b02e341c927f16d991edbd915d8ea43eac52096c # 2025.03.19
31+
vcpkgJsonGlob: "**/vcpkg.json"
32+
vcpkgConfigurationJsonGlob: "**/vcpkg-configuration.json"
5333
runVcpkgInstall: true
5434
- uses: lukka/run-cmake@v10.7
5535
with:

.github/workflows/swift.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- uses: mobiledevops/xcode-select-version-action@v1
1515
with:
16-
xcode-select-version: "15.0.1"
17-
- uses: swift-actions/setup-swift@v1.25.0
16+
xcode-select-version: "15.2.0"
17+
- uses: swift-actions/setup-swift@v2
1818
with:
19-
swift-version: "5.9.0"
19+
swift-version: "6.0.2"
2020
- uses: ConorMacBride/install-package@v1.1.0
2121
with:
2222
brew: swiftlint
23-
- name: "Setup Metal-cpp"
24-
run: |
25-
./setup-metal-cpp.ps1
23+
- name: "Setup metal-cpp"
24+
run: ./setup-metal-cpp.ps1 -Folder "externals" -FileName "metal-cpp_macOS15.2_iOS18.2.zip"
2625
shell: pwsh
2726
- name: "Swift Build(Debug)"
2827
run: swift build --configuration debug # --verbose --target ...

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# see https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html
2-
cmake_minimum_required(VERSION 3.28)
3-
project(cpp_swift_bridges LANGUAGES CXX VERSION 1.2)
2+
cmake_minimum_required(VERSION 3.31)
3+
project(cpp_swift_bridges LANGUAGES CXX VERSION 1.3)
44

55
include(GNUInstallDirs)
66
set(CMAKE_CXX_STANDARD 20)
77

88
if(APPLE)
9-
set(CMAKE_Swift_LANGUAGE_VERSION 5)
9+
option(CMAKE_Swift_LANGUAGE_VERSION "6" "Swift language version")
1010
find_program(CMAKE_Swift_COMPILER NAMES swiftc REQUIRED)
1111
enable_language(Swift)
1212
# set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
@@ -26,7 +26,7 @@ find_library(BORINGSSL_LIBPATH NAMES boringssl REQUIRED)
2626
message(STATUS "using BoringSSL: ${BORINGSSL_LIBPATH}")
2727

2828
find_program(Protobuf_PROTOC_EXECUTABLE NAMES protoc REQUIRED)
29-
find_package(Protobuf CONFIG REQUIRED)
29+
find_package(Protobuf REQUIRED)
3030
message(STATUS "Using protoc:")
3131
message(STATUS " ${Protobuf_LIBRARY}")
3232
message(STATUS " ${Protobuf_PROTOC_EXECUTABLE}")

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
sonar.organization=luncliff-github
55
sonar.projectKey=luncliff_cpp-swift-experiment
66
sonar.projectName=cpp-swift-experiment
7-
sonar.projectVersion=1.2
7+
sonar.projectVersion=1.3
88

99
sonar.sourceEncoding=UTF-8
1010

vcpkg-configuration.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
3+
"default-registry": {
4+
"kind": "git",
5+
"repository": "https://github.com/microsoft/vcpkg",
6+
"reference": "2025.03.19",
7+
"baseline": "b02e341c927f16d991edbd915d8ea43eac52096c"
8+
},
9+
"registries": []
10+
}

vcpkg.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
2-
"name": "cpp-swift-experiment",
3-
"version-string": "1.1",
4-
"description": "Experiment project for Mac/iPhone library with C++/Swift Programming Language",
5-
"dependencies": [
6-
"protobuf",
7-
{
8-
"name": "protobuf",
9-
"host": true
10-
}
11-
]
12-
}
2+
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
3+
"name": "cpp-swift-experiment",
4+
"version-date": "2025-04-08",
5+
"description": "Experiment project for Mac/iPhone library with C++/Swift Programming Language",
6+
"homepage": "https://github.com/luncliff/cpp-swift-experiment",
7+
"license": "CC0-1.0",
8+
"supports": "osx | ios",
9+
"dependencies": [
10+
"protobuf",
11+
{
12+
"name": "protobuf",
13+
"host": true
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)