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
27 changes: 25 additions & 2 deletions .github/workflows/compatibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
compatibility_tests_macos:
name: Execute compatibility tests
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
Expand All @@ -31,6 +34,18 @@ jobs:
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up mise
uses: jdx/mise-action@v2
with:
install: false
cache: false
- name: Set up Tuist cache
run: |
mise trust mise.toml
mise install
mise exec -- tuist auth login
mise exec -- tuist setup cache
shell: bash
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
Expand All @@ -42,10 +57,18 @@ jobs:
--build-path .build-compatibility-test-debug
- name: Run tests against Apple's AttributeGraph on macOS via Xcode
run: |
xcodebuild test \
result_bundle="${RUNNER_TEMP:-/tmp}/openattributegraph-compatibility-macos-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-0}.xcresult"
rm -rf "$result_bundle"
trap 'rm -rf "$result_bundle"' EXIT
mise exec -- tuist xcodebuild test \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenAttributeGraph-Package \
-sdk macosx \
-destination "platform=macOS" \
-resultBundlePath "$result_bundle" \
-skipPackagePluginValidation \
-skipMacroValidation
-skipMacroValidation \
COMPILATION_CACHE_ENABLE_CACHING=YES \
COMPILATION_CACHE_REMOTE_SERVICE_PATH="$HOME/.local/state/tuist/OpenSwiftUIProject_openattributegraph.sock" \
COMPILATION_CACHE_ENABLE_PLUGIN=YES \
COMPILATION_CACHE_ENABLE_DIAGNOSTIC_REMARKS=YES
27 changes: 25 additions & 2 deletions .github/workflows/compute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:

compute_ios_build:
name: Build with Compute (binary) on iOS
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
Expand All @@ -79,14 +82,34 @@ jobs:
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up mise
uses: jdx/mise-action@v2
with:
install: false
cache: false
- name: Set up Tuist cache
run: |
mise trust mise.toml
mise install
mise exec -- tuist auth login
mise exec -- tuist setup cache
shell: bash
- name: Build in debug mode on iOS Simulator
run: |
xcodebuild build \
result_bundle="${RUNNER_TEMP:-/tmp}/openattributegraph-compute-ios-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-0}.xcresult"
rm -rf "$result_bundle"
trap 'rm -rf "$result_bundle"' EXIT
mise exec -- tuist xcodebuild build \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenAttributeGraph \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-derivedDataPath .build-debug \
-resultBundlePath "$result_bundle" \
-skipMacroValidation \
-skipPackagePluginValidation \
OTHER_SWIFT_FLAGS="-warnings-as-errors"
OTHER_SWIFT_FLAGS="-warnings-as-errors" \
COMPILATION_CACHE_ENABLE_CACHING=YES \
COMPILATION_CACHE_REMOTE_SERVICE_PATH="$HOME/.local/state/tuist/OpenSwiftUIProject_openattributegraph.sock" \
COMPILATION_CACHE_ENABLE_PLUGIN=YES \
COMPILATION_CACHE_ENABLE_DIAGNOSTIC_REMARKS=YES
39 changes: 35 additions & 4 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
ios_test:
name: Execute tests on iOS
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
Expand All @@ -33,35 +36,63 @@ jobs:
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up mise
uses: jdx/mise-action@v2
with:
install: false
cache: false
- name: Set up Tuist cache
run: |
mise trust mise.toml
mise install
mise exec -- tuist auth login
mise exec -- tuist setup cache
shell: bash
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Build in debug mode on iOS
run: |
result_bundle="${RUNNER_TEMP:-/tmp}/openattributegraph-ios-build-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-0}.xcresult"
rm -rf "$result_bundle"
trap 'rm -rf "$result_bundle"' EXIT
# Swift 6.2.4 crashes while indexing C++ interop test targets.
xcodebuild build \
mise exec -- tuist xcodebuild build \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenAttributeGraph-Package \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-derivedDataPath .build-debug \
-resultBundlePath "$result_bundle" \
-skipMacroValidation \
-skipPackagePluginValidation \
COMPILER_INDEX_STORE_ENABLE=NO \
OTHER_SWIFT_FLAGS="-warnings-as-errors"
OTHER_SWIFT_FLAGS="-warnings-as-errors" \
COMPILATION_CACHE_ENABLE_CACHING=YES \
COMPILATION_CACHE_REMOTE_SERVICE_PATH="$HOME/.local/state/tuist/OpenSwiftUIProject_openattributegraph.sock" \
COMPILATION_CACHE_ENABLE_PLUGIN=YES \
COMPILATION_CACHE_ENABLE_DIAGNOSTIC_REMARKS=YES
- name: Build and run tests in debug mode with coverage on iOS Simulator
run: |
result_bundle="${RUNNER_TEMP:-/tmp}/openattributegraph-ios-test-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-0}.xcresult"
rm -rf "$result_bundle"
trap 'rm -rf "$result_bundle"' EXIT
# Swift 6.2.4 crashes while indexing C++ interop test targets.
xcodebuild test \
mise exec -- tuist xcodebuild test \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenAttributeGraph-Package \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-enableCodeCoverage=YES \
-derivedDataPath .build-test-debug \
-resultBundlePath "$result_bundle" \
-skipPackagePluginValidation \
-skipMacroValidation \
COMPILER_INDEX_STORE_ENABLE=NO
COMPILER_INDEX_STORE_ENABLE=NO \
COMPILATION_CACHE_ENABLE_CACHING=YES \
COMPILATION_CACHE_REMOTE_SERVICE_PATH="$HOME/.local/state/tuist/OpenSwiftUIProject_openattributegraph.sock" \
COMPILATION_CACHE_ENABLE_PLUGIN=YES \
COMPILATION_CACHE_ENABLE_DIAGNOSTIC_REMARKS=YES
# OTHER_SWIFT_FLAGS="-warnings-as-errors" Conflicting options '-warnings-as-errors' and '-suppress-warnings'
- name: Generate iOS coverage report
run: |
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: macos-15
permissions:
contents: write
id-token: write
env:
GH_TOKEN: ${{ github.token }}
steps:
Expand All @@ -22,17 +23,31 @@ jobs:
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: "26.3"
- name: Set up mise
uses: jdx/mise-action@v2
with:
install: false
cache: false
- name: Set up Tuist cache
run: |
mise trust mise.toml
mise install
mise exec -- tuist auth login
mise exec -- tuist setup cache
shell: bash
- name: Build XCFramework
run: ./Scripts/build_xcframework.sh
- name: Compute Checksum
id: checksum
run: |
echo "checksum=$(swift package compute-checksum .build/Xcode/Frameworks/OpenAttributeGraph.xcframework.zip)" >> $GITHUB_OUTPUT
echo "checksum=$(swift package compute-checksum .build/Xcode/Frameworks/OpenAttributeGraph.xcframework.zip)" >> "$GITHUB_OUTPUT"
- name: Collect Build Info
id: build_info
run: |
echo "xcode_version=$(xcodebuild -version | head -1)" >> $GITHUB_OUTPUT
echo "swift_version=$(swift --version 2>&1 | head -1)" >> $GITHUB_OUTPUT
{
echo "xcode_version=$(xcodebuild -version | head -1)"
echo "swift_version=$(swift --version 2>&1 | head -1)"
} >> "$GITHUB_OUTPUT"
- name: Generate Release Notes
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/xcframework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
build_xcframework:
name: Build XCFramework
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
Expand All @@ -25,6 +28,18 @@ jobs:
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up mise
uses: jdx/mise-action@v2
with:
install: false
cache: false
- name: Set up Tuist cache
run: |
mise trust mise.toml
mise install
mise exec -- tuist auth login
mise exec -- tuist setup cache
shell: bash
- name: Build XCFramework
run: ./Scripts/build_xcframework.sh
- name: Upload XCFramework
Expand Down
5 changes: 4 additions & 1 deletion Example/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ let indexStoreDisabledSettings: SettingsDictionary = [

let project = Project(
name: "Example",
packages: [
.package(path: ".."),
],
settings: .settings(base: indexStoreDisabledSettings),
targets: [
.target(
Expand All @@ -18,7 +21,7 @@ let project = Project(
sources: ["Sources/**"],
dependencies: [
.sdk(name: "c++", type: .library),
.external(name: "OpenAttributeGraph"),
.package(product: "OpenAttributeGraph"),
],
settings: .settings(base: indexStoreDisabledSettings)
),
Expand Down
10 changes: 9 additions & 1 deletion Example/Tuist.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import ProjectDescription

let tuist = Tuist(
project: .tuist()
fullHandle: "OpenSwiftUIProject/openattributegraph",
xcodeCache: .xcodeCache(
upload: Environment.isCI
),
project: .tuist(
generationOptions: .options(
enableCaching: true
)
)
)
15 changes: 0 additions & 15 deletions Example/Tuist/Package.resolved

This file was deleted.

5 changes: 1 addition & 4 deletions Example/Tuist/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@ let packageSettings = PackageSettings(

let package = Package(
name: "ExampleDependencies",
dependencies: [
.package(path: "../../"),
.package(url: "https://github.com/apple/swift-numerics", from: "1.1.1"),
]
dependencies: []
)
2 changes: 1 addition & 1 deletion Example/mise.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tools]
tuist = "4.193.0"
tuist = "4.203.0-rc.1"
17 changes: 14 additions & 3 deletions Scripts/build_xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,36 @@ done
echo "Building xcframework for $SCHEME (debug info: $DEBUG_INFO)"

# Archive for each platform using the Tuist-generated xcodeproj
xcodebuild archive \
rm -rf \
"$BUILD_DIR/Archives/$SCHEME-macOS.xcarchive" \
"$BUILD_DIR/Archives/$SCHEME-macOS.xcresult" \
"$BUILD_DIR/Archives/$SCHEME-iOS.xcarchive" \
"$BUILD_DIR/Archives/$SCHEME-iOS.xcresult" \
"$BUILD_DIR/Archives/$SCHEME-iOS-Simulator.xcarchive" \
"$BUILD_DIR/Archives/$SCHEME-iOS-Simulator.xcresult"

tuist xcodebuild archive \
-project "$XCODEPROJ" \
-scheme "$SCHEME" \
-destination "generic/platform=macOS" \
-archivePath "$BUILD_DIR/Archives/$SCHEME-macOS.xcarchive" \
-resultBundlePath "$BUILD_DIR/Archives/$SCHEME-macOS.xcresult" \
ENABLE_USER_SCRIPT_SANDBOXING=NO

xcodebuild archive \
tuist xcodebuild archive \
-project "$XCODEPROJ" \
-scheme "$SCHEME" \
-destination "generic/platform=iOS" \
-archivePath "$BUILD_DIR/Archives/$SCHEME-iOS.xcarchive" \
-resultBundlePath "$BUILD_DIR/Archives/$SCHEME-iOS.xcresult" \
ENABLE_USER_SCRIPT_SANDBOXING=NO

xcodebuild archive \
tuist xcodebuild archive \
-project "$XCODEPROJ" \
-scheme "$SCHEME" \
-destination "generic/platform=iOS Simulator" \
-archivePath "$BUILD_DIR/Archives/$SCHEME-iOS-Simulator.xcarchive" \
-resultBundlePath "$BUILD_DIR/Archives/$SCHEME-iOS-Simulator.xcresult" \
ENABLE_USER_SCRIPT_SANDBOXING=NO

echo "Archives completed successfully."
Expand Down
5 changes: 5 additions & 0 deletions Tuist.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import ProjectDescription

let tuist = Tuist(
fullHandle: "OpenSwiftUIProject/openattributegraph",
xcodeCache: .xcodeCache(
upload: Environment.isCI
),
project: .tuist(
generationOptions: .options(
enableCaching: true,
manifestEnvironment: [
"OPENSWIFTUI_*",
"OPENATTRIBUTEGRAPH_*",
Expand Down
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tools]
tuist = "4.156.0"
tuist = "4.203.0-rc.1"
Loading