Skip to content

Commit ba97bf1

Browse files
authored
Merge pull request #1 from kyleve/kve/setup-repo
Set up Tuist project, AGENTS.md, and GitHub CI
2 parents af5db55 + 02f564d commit ba97bf1

9 files changed

Lines changed: 203 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
name: Build & Test
16+
runs-on: macos-26
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: jdx/mise-action@v3
20+
- run: tuist test

.gitignore

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Xcode
2-
#
3-
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
1+
# Tuist managed
2+
Derived/
43

5-
## User settings
4+
# Xcode
5+
build/
6+
DerivedData/
7+
*.xcodeproj
8+
*.xcworkspace
69
xcuserdata/
710

8-
## Obj-C/Swift specific
9-
*.hmap
10-
1111
## App packaging
1212
*.ipa
1313
*.dSYM.zip
@@ -18,45 +18,19 @@ timeline.xctimeline
1818
playground.xcworkspace
1919

2020
# Swift Package Manager
21-
#
22-
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
23-
# Packages/
24-
# Package.pins
25-
# Package.resolved
26-
# *.xcodeproj
27-
#
28-
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
29-
# hence it is not needed unless you have added a package configuration file to your project
30-
# .swiftpm
31-
3221
.build/
3322

3423
# CocoaPods
35-
#
36-
# We recommend against adding the Pods directory to your .gitignore. However
37-
# you should judge for yourself, the pros and cons are mentioned at:
38-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
39-
#
40-
# Pods/
41-
#
42-
# Add this line if you want to avoid checking in source code from the Xcode workspace
43-
# *.xcworkspace
24+
Pods/
4425

4526
# Carthage
46-
#
47-
# Add this line if you want to avoid checking in source code from Carthage dependencies.
48-
# Carthage/Checkouts
49-
5027
Carthage/Build/
5128

5229
# fastlane
53-
#
54-
# It is recommended to not store the screenshots in the git repo.
55-
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
56-
# For more information about the recommended setup visit:
57-
# https://docs.fastlane.tools/best-practices/source-control/#source-control
58-
5930
fastlane/report.xml
6031
fastlane/Preview.html
6132
fastlane/screenshots/**/*.png
6233
fastlane/test_output
34+
35+
# System
36+
.DS_Store

.mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
tuist = "4.40.0"

AGENTS.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Stuff – Repository Shape
2+
3+
## Build system
4+
5+
| Tool | Version | Pinned via |
6+
|-------|---------|--------------|
7+
| Tuist | 4.40.0 | `.mise.toml` |
8+
9+
Tuist manifests live at the repo root (`Project.swift`, `Tuist.swift`).
10+
Run `./ide` (or `./ide -i` to also install dependencies) to regenerate the
11+
Xcode project.
12+
13+
## Targets
14+
15+
_No apps or modules yet._ Add targets to `Project.swift` using `macApp()` or `framework()` helpers.
16+
17+
## Deployment
18+
19+
| Platform | Minimum OS |
20+
|------------------------------|-------------|
21+
| iPhone, iPad, Mac Catalyst | iOS 26.0 |
22+
| macOS (native) | macOS 26.0 |
23+
24+
## Directory layout
25+
26+
```
27+
<TargetName>/
28+
Sources/ – production code
29+
Tests/ – unit tests (Swift Testing, not XCTest)
30+
Resources/ – asset catalogs, etc. (apps only)
31+
```
32+
33+
## Conventions
34+
35+
- **Swift Testing** (`import Testing`) for all unit tests – do not use XCTest.
36+
- Generated `.xcodeproj` and `Derived/` are git-ignored; never commit them.
37+
- Bundle IDs follow `com.stuff.<suffix>`.
38+
39+
## Plans
40+
41+
Implementation plans go in `Plans/` and are named
42+
`<NNN>-<YYYY-MM-DD>-<slug>.md`.

Plans/.gitkeep

Whitespace-only changes.

Project.swift

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import ProjectDescription
2+
3+
let macDestinations: Destinations = [.mac]
4+
let macDeployment: DeploymentTargets = .macOS("26.0")
5+
6+
func framework(
7+
_ name: String,
8+
bundleIdSuffix: String,
9+
dependencies: [TargetDependency] = []
10+
) -> [Target] {
11+
[
12+
.target(
13+
name: name,
14+
destinations: macDestinations,
15+
product: .framework,
16+
bundleId: "com.stuff.\(bundleIdSuffix)",
17+
deploymentTargets: macDeployment,
18+
sources: ["\(name)/Sources/**"],
19+
dependencies: dependencies
20+
),
21+
.target(
22+
name: "\(name)Tests",
23+
destinations: macDestinations,
24+
product: .unitTests,
25+
bundleId: "com.stuff.\(bundleIdSuffix).tests",
26+
deploymentTargets: macDeployment,
27+
sources: ["\(name)/Tests/**"],
28+
dependencies: [.target(name: name)]
29+
),
30+
]
31+
}
32+
33+
func macApp(
34+
_ name: String,
35+
bundleIdSuffix: String,
36+
infoPlist: [String: Plist.Value] = [:],
37+
dependencies: [TargetDependency] = []
38+
) -> [Target] {
39+
[
40+
.target(
41+
name: name,
42+
destinations: macDestinations,
43+
product: .app,
44+
bundleId: "com.stuff.\(bundleIdSuffix)",
45+
deploymentTargets: macDeployment,
46+
infoPlist: .extendingDefault(with: infoPlist),
47+
sources: ["\(name)/Sources/**"],
48+
resources: ["\(name)/Resources/**"],
49+
dependencies: dependencies
50+
),
51+
.target(
52+
name: "\(name)Tests",
53+
destinations: macDestinations,
54+
product: .unitTests,
55+
bundleId: "com.stuff.\(bundleIdSuffix).tests",
56+
deploymentTargets: macDeployment,
57+
sources: ["\(name)/Tests/**"],
58+
dependencies: [.target(name: name)]
59+
),
60+
]
61+
}
62+
63+
let project = Project(
64+
name: "Stuff",
65+
options: .options(
66+
defaultKnownRegions: ["en"],
67+
developmentRegion: "en"
68+
),
69+
targets: []
70+
)

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
11
# Stuff
2-
Random apps and stuff
2+
3+
Random apps and stuff.
4+
5+
## Requirements
6+
7+
- Xcode 26+
8+
- [mise](https://mise.jdx.dev) (manages Tuist version)
9+
- iOS 26.0+
10+
11+
## Getting started
12+
13+
```bash
14+
# Install mise (if needed)
15+
brew install mise
16+
17+
# Generate the Xcode project
18+
./ide
19+
20+
# Or install dependencies first, then generate
21+
./ide -i
22+
```
23+
24+
## Project structure
25+
26+
```
27+
Project.swift Tuist project manifest
28+
Tuist.swift Tuist configuration
29+
.mise.toml Pins Tuist 4.40.0
30+
ide Dev script – regenerates Xcode project
31+
AGENTS.md Repository shape for AI agents
32+
```
33+
34+
## License
35+
36+
Apache 2.0 – see [LICENSE](LICENSE).

Tuist.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ProjectDescription
2+
3+
let config = Config()

ide

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
INSTALL=false
5+
6+
for arg in "$@"; do
7+
case "$arg" in
8+
-i|--install)
9+
INSTALL=true
10+
;;
11+
esac
12+
done
13+
14+
if [ "$INSTALL" = true ]; then
15+
echo "==> tuist install"
16+
mise exec -- tuist install
17+
fi
18+
19+
echo "==> tuist generate"
20+
mise exec -- tuist generate

0 commit comments

Comments
 (0)