Skip to content

Enable Tuist caching and build insights in CI #783

Enable Tuist caching and build insights in CI

Enable Tuist caching and build insights in CI #783

name: Compatibility tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
compatibility_tests_macos:
name: Execute compatibility tests
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
include:
- os: macos-15
xcode-version: "26.3" # Swift 6.2.4
runs-on: ${{ matrix.os }}
env:
OPENATTRIBUTEGRAPH_WERROR: 1
OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST: 1
OPENATTRIBUTEGRAPH_USE_LOCAL_DEPS: 1
OPENATTRIBUTEGRAPH_TARGET_RELEASE: 2024
DARWINPRIVATEFRAMEWORKS_TARGET_RELEASE: 2024
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Xcode
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: Run tests against Apple's AttributeGraph on macOS via SwiftPM
run: |
# Swift 6.2.4 crashes while indexing C++ interop test targets.
swift test \
--disable-index-store \
--build-path .build-compatibility-test-debug
- name: Run tests against Apple's AttributeGraph on macOS via Xcode
run: |
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 \
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