Skip to content

Commit

Permalink
Add a smoke test that ensures CMake can find the right linker
Browse files Browse the repository at this point in the history
Add a simple smoke test to verify that the linker selection works as intended with CMake.
  • Loading branch information
dabrahams committed Mar 25, 2024
1 parent 0aee362 commit 0e30725
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/smoke-test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 3.25)
project(gha_setup_swift LANGUAGES Swift)
add_library(Library Library.swift)
3 changes: 3 additions & 0 deletions .github/smoke-test/Library.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Foundation

public func fortyTwo() -> Int { 42 }
9 changes: 8 additions & 1 deletion .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,12 @@ jobs:
branch: development
tag: DEVELOPMENT-SNAPSHOT-2023-05-20-a

- name: check swift version
- name: Check Swift version
run: swift --version

- name: get macOS smoke test prerequisites
if: ${{ runner.os == 'macOS' }}
run: brew install ninja

- name: Smoke test
run: cmake -GNinja -S .github/smoke-test -B .cmake-build && cmake --build .cmake-build
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc

0 comments on commit 0e30725

Please sign in to comment.