Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a3ea634
Add package fixture
marinofelipe Oct 25, 2025
d0a0e48
Update package resolution
marinofelipe Oct 25, 2025
1ef8b78
Delete older fixtures
marinofelipe Oct 25, 2025
3647c48
Fix rules and make error equatable
marinofelipe Oct 25, 2025
8510ab6
Add config tests
marinofelipe Oct 25, 2025
bdf9469
Enable SPMGraphLintInput memberwise init
marinofelipe Oct 25, 2025
47c6e70
Reuse test plan
marinofelipe Oct 25, 2025
002fa72
Compile loading package fixture
marinofelipe Oct 25, 2025
88f88ca
Use orka runner
marinofelipe Oct 26, 2025
0be21fe
Improve error handling
marinofelipe Oct 26, 2025
eadac0d
Improve comment
marinofelipe Oct 26, 2025
e5e9a65
Build and run tests on both toolchains
marinofelipe Oct 26, 2025
f3c0e2d
Fix Xcode v in CI
marinofelipe Oct 26, 2025
74bbc89
Fix concurrency error
marinofelipe Oct 26, 2025
927afbc
Create fixtures support module
marinofelipe Oct 26, 2025
9943c29
Declare target
marinofelipe Oct 26, 2025
a204204
Upadte tests to use it
marinofelipe Oct 26, 2025
3609b22
Bump SPM to 6.2, increase min v to 6.1
marinofelipe Oct 26, 2025
b80b597
Bump config dependency and update readme
marinofelipe Oct 26, 2025
8771397
Disable parallel tests
marinofelipe Oct 26, 2025
6b75486
Fix test
marinofelipe Oct 26, 2025
9250189
Update scheme
marinofelipe Oct 26, 2025
ef0431e
Update readme
marinofelipe Oct 26, 2025
e6e4ce9
format input var
marinofelipe Oct 26, 2025
c17e551
remove unused input arg
marinofelipe Oct 26, 2025
582d44f
Improve config build dir docs
marinofelipe Oct 27, 2025
14b0df1
Document config build dir caching
marinofelipe Oct 27, 2025
36847d1
Merge pull request #37 from getyourguide/fix-actions
marinofelipe Oct 27, 2025
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
35 changes: 27 additions & 8 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build_and_tests:
name: Build and run tests
runs-on: [self-hosted, macOS, ARM64, macstadium, bare-metal] # TODO: Replace with GitHub Action runners once it goes open source
build_xcode_16:
name: Build and run tests on Xcode 16.4
runs-on: [macos-orka-large] # TODO: Replace with GitHub Action runners once it goes open source
permissions:
id-token: write
contents: read
checks: write
id-token: write
contents: read
checks: write
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -35,15 +35,34 @@ jobs:
- name: Run tests on Xcode 16.4
env:
IS_RUNNING_TESTS: 1
run: swift test
run: swift test --no-parallel
timeout-minutes: 3

build_xcode_26:
name: Build and run tests on Xcode 26.0.1
runs-on: [macos-orka-large] # TODO: Replace with GitHub Action runners once it goes open source
permissions:
id-token: write
contents: read
checks: write

steps:
- name: Check out repository
uses: actions/checkout@v4
timeout-minutes: 2

- name: Select Xcode 26.0 toolchain
uses: ./.github/actions/xcode-version
with:
xcode-version: '26.0'
xcode-version: '26.0.1'
timeout-minutes: 2

- name: Build spmgraph for Xcode 26.0
run: swift build
timeout-minutes: 3

- name: Run tests on Xcode 26.0
env:
IS_RUNNING_TESTS: 1
run: swift test --no-parallel
timeout-minutes: 3
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

# Fixture packages
**/Fixtures/**/.swiftpm/
51 changes: 49 additions & 2 deletions .swiftpm/xcode/xcshareddata/xcschemes/spmgraph-Package.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,55 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:spmgraph.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SPMGraphExecutableTests"
BuildableName = "SPMGraphExecutableTests"
BlueprintName = "SPMGraphExecutableTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SPMGraphLintTests"
BuildableName = "SPMGraphLintTests"
BlueprintName = "SPMGraphLintTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SPMGraphDescriptionInterfaceTests"
BuildableName = "SPMGraphDescriptionInterfaceTests"
BlueprintName = "SPMGraphDescriptionInterfaceTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FixtureSupport"
BuildableName = "FixtureSupport"
BlueprintName = "FixtureSupport"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
49 changes: 20 additions & 29 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 62 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 6.0
// swift-tools-version: 6.1

import PackageDescription

Expand Down Expand Up @@ -38,14 +38,11 @@ let package = Package(
.upToNextMinor(from: "1.6.2")
),

// TODO: Review which tag / Swift release to use
// - Initially it may be strict and sometimes "enforce" specific Xcode/Swift toolchains
// - For now pinned to the 6.1 release / Xcode 16.3
//
// It auto exports SwiftToolsSupport, so no need to directly depend on the former 🙏
// - Pinned to the the Swift 6.2 development / Xcode 16.3
// It auto exports SwiftToolsSupport, so no need to directly depend it 🙏
.package(
url: "https://github.com/apple/swift-package-manager",
revision: "swift-6.1-RELEASE"
revision: "swift-6.2-RELEASE"
),
.package(
url: "https://github.com/aus-der-Technik/FileMonitor",
Expand All @@ -67,20 +64,29 @@ let package = Package(
name: "SwiftPMDataModel",
package: "swift-package-manager"
),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),
.target(
name: "SPMGraphLint",
dependencies: [
.target(name: "Core"),
.target(name: "SPMGraphDescriptionInterface"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),
.target(
name: "SPMGraphTests",
dependencies: [
.target(name: "Core"),
.target(name: "SPMGraphDescriptionInterface"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),
.target(
Expand All @@ -94,6 +100,9 @@ let package = Package(
],
resources: [
.copy("Resources")
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),

Expand All @@ -107,6 +116,9 @@ let package = Package(
package: "swift-package-manager"
),
.target(name: "Core"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),

Expand All @@ -119,6 +131,9 @@ let package = Package(
name: "SwiftPMDataModel",
package: "swift-package-manager"
)
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),

Expand All @@ -135,6 +150,9 @@ let package = Package(
name: "ArgumentParser",
package: "swift-argument-parser"
),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),

Expand All @@ -144,6 +162,43 @@ let package = Package(
name: "SPMGraphExecutableTests",
dependencies: [
.target(name: "SPMGraphExecutable"),
.target(name: "FixtureSupport"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),
.testTarget(
name: "SPMGraphDescriptionInterfaceTests",
dependencies: [
.target(name: "SPMGraphDescriptionInterface"),
.target(name: "Core"),
.target(name: "FixtureSupport"),
.product(
name: "ArgumentParser",
package: "swift-argument-parser"
),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
),

// MARK: - Test support

.target(
name: "FixtureSupport",
dependencies: [
.target(name: "SPMGraphDescriptionInterface"),
.target(name: "Core"),
.product(
name: "ArgumentParser",
package: "swift-argument-parser"
),
],
resources: [.copy("Resources")],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
)
]
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `spmgraph`: SwiftPM dependency graphs supercharged ⚡

[![CI status](https://github.com/getyourguide/spmgraph/actions/workflows/main.yml/badge.svg)](https://github.com/getyourguide/spmgraph/actions/workflows/main.yml)
![Toolchain](https://img.shields.io/badge/Swift-6.0+%20%7C%20Xcode%2016%2B-orange?logo=swift&logoColor=white)
![Toolchain](https://img.shields.io/badge/Swift-6.1+%20%7C%20Xcode%2016%3B-orange?logo=swift&logoColor=white)
[![Mint](https://img.shields.io/badge/Mint-getyourguide%2Fspmgraph-40c8a7?logo=leaf&logoColor=white)](https://github.com/getyourguide/spmgraph#installation)
[![Swift Package Manager](https://rawgit.com/jlyonsmith/artwork/master/SwiftPackageManager/swiftpackagemanager-compatible.svg)](https://swift.org/package-manager/)

Expand Down Expand Up @@ -151,8 +151,5 @@ mint install getyourguide/spmgraph
## Acknowledgments
- Inspired by the work that the [Tuist](https://tuist.dev/) team does for the Apple developers community and their focus on leveraging the dependency graph to provide amazing features for engineers. Also, a source of inspiration for our shell abstraction layer.

## Open roadmap
- [ ] Cover the core logic of Lint, Map, and Visualize libs with tests

## Contributing
Check the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
Loading