Skip to content

Commit 7dd9fbf

Browse files
[CI] Get rid of mint package manager (#960)
1 parent 588a809 commit 7dd9fbf

File tree

12 files changed

+49
-40
lines changed

12 files changed

+49
-40
lines changed

.github/actions/bootstrap/action.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ runs:
55
steps:
66
- run: echo "IMAGE=${ImageOS}" >> $GITHUB_ENV
77
shell: bash
8-
- run: echo "$HOME/.mint/bin" >> $GITHUB_PATH
9-
shell: bash
10-
- name: Cache Mint
11-
uses: actions/cache@v4
12-
id: mint-cache
13-
with:
14-
path: ~/.mint
15-
key: ${{ env.IMAGE }}-mint-${{ hashFiles('**/Mintfile') }}
16-
restore-keys: ${{ env.IMAGE }}-mint-
178
- uses: ./.github/actions/ruby-cache
189
- uses: ./.github/actions/xcode-cache
1910
- run: ./Scripts/bootstrap.sh

.github/actions/xcode-cache/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ runs:
55
steps:
66
- run: echo "IMAGE=${ImageOS}-${ImageVersion}" >> $GITHUB_ENV
77
shell: bash
8-
- run: echo "$HOME/.mint/bin" >> $GITHUB_PATH
9-
shell: bash
108
- uses: mikehardy/buildcache-action@v2
119
with:
1210
cache_key: ${{ env.IMAGE }}-buildcache-

.github/workflows/cron-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
INSTALL_ALLURE: true
5050
INSTALL_YEETD: true
5151
INSTALL_IPSW: true
52-
SKIP_MINT_BOOTSTRAP: true
52+
SKIP_SWIFT_BOOTSTRAP: true
5353
- uses: ./.github/actions/setup-ios-runtime
5454
if: ${{ matrix.setup_runtime }}
5555
timeout-minutes: 60

.github/workflows/smoke-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
env:
172172
INSTALL_ALLURE: true
173173
INSTALL_YEETD: true
174-
SKIP_MINT_BOOTSTRAP: true
174+
SKIP_SWIFT_BOOTSTRAP: true
175175
- name: Run UI Tests (Debug)
176176
run: bundle exec fastlane test_e2e_mock device:"${{ env.IOS_SIMULATOR_DEVICE }}" batch:'${{ matrix.batch }}' test_without_building:true
177177
timeout-minutes: 100

.github/workflows/sonar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: ./.github/actions/bootstrap
2222
env:
2323
INSTALL_SONAR: true
24-
SKIP_MINT_BOOTSTRAP: true
24+
SKIP_SWIFT_BOOTSTRAP: true
2525

2626
- uses: actions/github-script@v6
2727
id: get_pr_number

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Agents should optimize for API stability, backwards compatibility, accessibility
1212
• Xcode: 15.x or newer (Apple Silicon supported)
1313
• Platforms / deployment targets: Use the values set in Package.swift/podspecs; do not lower targets without approval
1414
• CI: GitHub Actions (assume PR validation for build + tests + lint)
15-
• Linters & docs: SwiftLint via Mint
15+
• Linters & docs: SwiftLint and SwiftFormat
1616

1717
### Project layout (high level)
1818

Githubfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
export ALLURECTL_VERSION='2.16.0'
44
export XCRESULTS_VERSION='1.19.1'
55
export YEETD_VERSION='1.0'
6-
export MINT_VERSION='0.17.5'
76
export SONAR_VERSION='6.2.1.4610'
87
export IPSW_VERSION='3.1.592'
98
export INTERFACE_ANALYZER_VERSION='1.0.7'
9+
export SWIFT_LINT_VERSION='0.55.1'
10+
export SWIFT_FORMAT_VERSION='0.47.12'
11+
export SWIFT_GEN_VERSION='6.5.1'

Mintfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

Scripts/bootstrap.sh

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# shellcheck source=/dev/null
33
# Usage: ./bootstrap.sh
44
# This script will:
5-
# - install Mint and bootstrap its dependencies
6-
# - install Vale
5+
# - install SwiftLint, SwiftFormat, SwiftGen
76
# - link git hooks
87
# - install allure dependencies if `INSTALL_ALLURE` environment variable is provided
98
# - install sonar-scanner if `INSTALL_SONAR` environment variable is provided
@@ -27,19 +26,41 @@ if [ "${GITHUB_ACTIONS:-}" != "true" ]; then
2726
bundle exec lefthook install
2827
fi
2928

30-
if [ "${SKIP_MINT_BOOTSTRAP:-}" != true ]; then
31-
puts "Bootstrap Mint dependencies"
32-
git clone https://github.com/yonaskolb/Mint.git fastlane/mint
33-
root=$(pwd)
34-
cd fastlane/mint
35-
swift run mint install "yonaskolb/mint@${MINT_VERSION}"
36-
cd $root
37-
rm -rf fastlane/mint
38-
mint bootstrap --link
29+
if [ "${SKIP_SWIFT_BOOTSTRAP:-}" != true ]; then
30+
puts "Install SwiftLint v${SWIFT_LINT_VERSION}"
31+
DOWNLOAD_URL="https://github.com/realm/SwiftLint/releases/download/${SWIFT_LINT_VERSION}/SwiftLint.pkg"
32+
DOWNLOAD_PATH="/tmp/SwiftLint-${SWIFT_LINT_VERSION}.pkg"
33+
curl -sL "$DOWNLOAD_URL" -o "$DOWNLOAD_PATH"
34+
sudo installer -pkg "$DOWNLOAD_PATH" -target /
35+
swiftlint version
36+
37+
puts "Install SwiftFormat v${SWIFT_FORMAT_VERSION}"
38+
DOWNLOAD_URL="https://github.com/nicklockwood/SwiftFormat/releases/download/${SWIFT_FORMAT_VERSION}/swiftformat.zip"
39+
DOWNLOAD_PATH="/tmp/swiftformat-${SWIFT_FORMAT_VERSION}.zip"
40+
BIN_PATH="/usr/local/bin/swiftformat"
41+
brew uninstall swiftformat || true
42+
curl -sL "$DOWNLOAD_URL" -o "$DOWNLOAD_PATH"
43+
unzip -o "$DOWNLOAD_PATH" -d /tmp/swiftformat-${SWIFT_FORMAT_VERSION}
44+
sudo mv /tmp/swiftformat-${SWIFT_FORMAT_VERSION}/swiftformat "$BIN_PATH"
45+
sudo chmod +x "$BIN_PATH"
46+
swiftformat --version
47+
48+
puts "Install SwiftGen v${SWIFT_GEN_VERSION}"
49+
DOWNLOAD_URL="https://github.com/SwiftGen/SwiftGen/releases/download/${SWIFT_GEN_VERSION}/swiftgen-${SWIFT_GEN_VERSION}.zip"
50+
DOWNLOAD_PATH="/tmp/swiftgen-${SWIFT_GEN_VERSION}.zip"
51+
INSTALL_DIR="/usr/local/lib/swiftgen"
52+
BIN_PATH="/usr/local/bin/swiftgen"
53+
curl -sL "$DOWNLOAD_URL" -o "$DOWNLOAD_PATH"
54+
sudo rm -rf "$INSTALL_DIR"
55+
sudo mkdir -p "$INSTALL_DIR"
56+
sudo unzip -o "$DOWNLOAD_PATH" -d "$INSTALL_DIR"
57+
sudo sudo rm -f "$BIN_PATH"
58+
sudo sudo ln -s "$INSTALL_DIR/bin/swiftgen" "$BIN_PATH"
59+
swiftgen --version
3960
fi
4061

4162
if [[ ${INSTALL_SONAR-default} == true ]]; then
42-
puts "Install sonar scanner"
63+
puts "Install sonar scanner v${SONAR_VERSION}"
4364
DOWNLOAD_URL="https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_VERSION}-macosx-x64.zip"
4465
curl -sL "${DOWNLOAD_URL}" -o ./fastlane/sonar.zip
4566
cd fastlane
@@ -51,12 +72,12 @@ if [[ ${INSTALL_SONAR-default} == true ]]; then
5172
fi
5273

5374
if [[ ${INSTALL_ALLURE-default} == true ]]; then
54-
puts "Install allurectl"
75+
puts "Install allurectl v${ALLURECTL_VERSION}"
5576
DOWNLOAD_URL="https://github.com/allure-framework/allurectl/releases/download/${ALLURECTL_VERSION}/allurectl_darwin_amd64"
5677
curl -sL "${DOWNLOAD_URL}" -o ./fastlane/allurectl
5778
chmod +x ./fastlane/allurectl
5879

59-
puts "Install xcresults"
80+
puts "Install xcresults v${XCRESULTS_VERSION}"
6081
DOWNLOAD_URL="https://github.com/eroshenkoam/xcresults/releases/download/${XCRESULTS_VERSION}/xcresults"
6182
curl -sL "${DOWNLOAD_URL}" -o ./fastlane/xcresults
6283
chmod +x ./fastlane/xcresults

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2611,7 +2611,7 @@
26112611
);
26122612
runOnlyForDeploymentPostprocessing = 0;
26132613
shellPath = /bin/sh;
2614-
shellScript = "# Adds support for Apple Silicon brew directory\nexport PATH=\"$PATH:/opt/homebrew/bin\"\n\nif which mint >/dev/null && mint which swiftgen; then\n xcrun --sdk macosx mint run swiftgen config run --config Sources/StreamChatSwiftUI/.swiftgen.yml\nelse\n echo \"Warning: Bootstrap not run, please run ./Scripts/bootstrap.sh\"\nfi\n";
2614+
shellScript = "# Adds support for Apple Silicon brew directory\nexport PATH=\"$PATH:/opt/homebrew/bin\"\n\nif which swiftgen; then\n xcrun --sdk macosx swiftgen config run --config Sources/StreamChatSwiftUI/.swiftgen.yml\nelse\n echo \"Warning: Bootstrap not run, please run ./Scripts/bootstrap.sh\"\nfi\n";
26152615
};
26162616
/* End PBXShellScriptBuildPhase section */
26172617

0 commit comments

Comments
 (0)