Skip to content
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
42 changes: 12 additions & 30 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ jobs:
enable_macos_checks: false
enable_windows_checks: false
wasm_sdk_pre_build_command: |
mkdir MyPackage
cd MyPackage
swift package init --type library
cd tests/TestPackage
enable_embedded_wasm_sdk_build: true

tests_with_docker:
Expand All @@ -29,32 +27,22 @@ jobs:
# Linux
linux_os_versions: '["jammy", "rhel-ubi9", "amazonlinux2"]'
linux_build_command: |
mkdir MyPackage
cd MyPackage
swift package init --type library
cd tests/TestPackage
swift build
linux_static_sdk_pre_build_command: |
mkdir MyPackage
cd MyPackage
swift package init --type library
cd tests/TestPackage
enable_linux_static_sdk_build: true
# Wasm
wasm_sdk_pre_build_command: |
mkdir MyPackage
cd MyPackage
swift package init --type library
cd tests/TestPackage
enable_wasm_sdk_build: true
# Android
android_sdk_pre_build_command: |
mkdir MyPackage
cd MyPackage
swift package init --type library
cd tests/TestPackage
enable_android_sdk_build: true
# Windows
windows_build_command: |
mkdir MyPackage
cd MyPackage
Invoke-Program swift package init --type library
cd tests/TestPackage
Invoke-Program swift build
enable_windows_docker: true

Expand All @@ -66,15 +54,11 @@ jobs:
enable_linux_checks: false
# Android
android_sdk_pre_build_command: |
mkdir MyPackage
cd MyPackage
swift package init --type library
cd tests/TestPackage
enable_android_sdk_build: true
# Windows
windows_build_command: |
mkdir MyPackage
cd MyPackage
Invoke-Program swift package init --type library
cd tests/TestPackage
Invoke-Program swift build
enable_windows_docker: false

Expand All @@ -87,9 +71,7 @@ jobs:
# macOS
enable_macos_checks: true
macos_build_command: |
mkdir MyPackage
cd MyPackage
xcrun swift package init --type library
cd tests/TestPackage
xcrun swift build

build_tests_ios:
Expand All @@ -100,9 +82,9 @@ jobs:
enable_windows_checks: false
# iOS
enable_ios_checks: true
ios_pre_build_command: |
pwd
xcrun swift package init --type library
ios_build_command: |
cd tests/TestPackage
xcodebuild -quiet -scheme TestPackage-Package -destination "generic/platform=ios" build

soundness:
name: Soundness
Expand Down
2 changes: 2 additions & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
CODEOWNERS
LICENSE.txt
README.md
**/Package.swift
**/Package@swift-*
22 changes: 22 additions & 0 deletions tests/TestPackage/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// swift-tools-version: 6.1

import PackageDescription

let package = Package(
name: "TestPackage",
targets: [
.target(
name: "Target1"
),
.target(
name: "Target2",
dependencies: [
"Target1"
]
),
.testTarget(
name: "Target1Tests",
dependencies: ["Target1"]
),
]
)
22 changes: 22 additions & 0 deletions tests/TestPackage/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// swift-tools-version: 5.10

import PackageDescription

let package = Package(
name: "TestPackage",
targets: [
.target(
name: "Target1"
),
.target(
name: "Target2",
dependencies: [
"Target1"
]
),
.testTarget(
name: "Target1Tests",
dependencies: ["Target1"]
),
]
)
22 changes: 22 additions & 0 deletions tests/TestPackage/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// swift-tools-version: 5.9

import PackageDescription

let package = Package(
name: "TestPackage",
targets: [
.target(
name: "Target1"
),
.target(
name: "Target2",
dependencies: [
"Target1"
]
),
.testTarget(
name: "Target1Tests",
dependencies: ["Target1"]
),
]
)
22 changes: 22 additions & 0 deletions tests/TestPackage/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// swift-tools-version: 6.0

import PackageDescription

let package = Package(
name: "TestPackage",
targets: [
.target(
name: "Target1"
),
.target(
name: "Target2",
dependencies: [
"Target1"
]
),
.testTarget(
name: "Target1Tests",
dependencies: ["Target1"]
),
]
)
13 changes: 13 additions & 0 deletions tests/TestPackage/Sources/Target1/Target1.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

public func foo() {}
17 changes: 17 additions & 0 deletions tests/TestPackage/Sources/Target2/Target2.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

import Target1

public func bar() {
foo()
}
18 changes: 18 additions & 0 deletions tests/TestPackage/Tests/Target1Tests/Target1Tests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

import Target1
import Testing

@Test func example() async throws {
foo()
}