Skip to content

fix(ci): Xcode Cloud — tuist generate runs in wrong cwd (ci_scripts/) #88

Closed

Description

@wei18

Symptom

Build #3 (after #87 added tuist generate):

Manifest not found at path /Volumes/workspace/repository/ci_scripts

Root cause

Xcode Cloud invokes the script as:

cd /Volumes/workspace/repository/ci_scripts && /Volumes/workspace/repository/ci_scripts/ci_post_clone.sh

So tuist generate runs with cwd = ci_scripts/. Tuist looks for Project.swift in cwd → not found.

Project.swift lives at the repo root (/Volumes/workspace/repository/Project.swift).

Fix

cd to repo root before invoking tuist. Use Xcode Cloud's $CI_PRIMARY_REPOSITORY_PATH env var (with $(dirname "$0")/.. fallback for local dry-runs):

# 3) Generate Xcode workspace via Tuist (repo does not commit .xcworkspace)
cd "${CI_PRIMARY_REPOSITORY_PATH:-$(dirname "$0")/..}"
mise exec -- tuist install
mise exec -- tuist generate --no-open

Acceptance

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions