forked from tuist/cache-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (103 loc) · 4.88 KB
/
benchmark-tuist-mastodon.yml
File metadata and controls
124 lines (103 loc) · 4.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Benchmark Mastodon Generated App
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: benchmark-tuist-mastodon-${{ github.head_ref }}
cancel-in-progress: true
jobs:
cache-uploads:
name: Clean build with cache uploads
runs-on: ghcr.io/cirruslabs/macos-runner:tahoe
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
working-directory: mastodon-tuist-ios
run: tuist install
- name: Generate project
working-directory: mastodon-tuist-ios
run: tuist generate --no-binary-cache
- name: Benchmark clean build with cache uploads
working-directory: mastodon-tuist-ios
run: |
hyperfine --warmup 1 --runs 5 \
--prepare 'rm -rf ~/Library/Developer/Xcode/DerivedData' \
'xcodebuild -workspace MastodonTuist.xcworkspace -scheme Mastodon build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO COMPILATION_CACHE_ENABLE_CACHING="YES" COMPILATION_CACHE_ENABLE_PLUGIN="YES" COMPILATION_CACHE_REMOTE_SERVICE_PATH="$HOME/.cirruslabs/omni-cache.sock"' \
--show-output
pre-warmed:
name: Clean build with pre-warmed cache
runs-on: ghcr.io/cirruslabs/macos-runner:tahoe
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Skip Xcode Macro Fingerprint Validation
run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: Skip Xcode Package Validation
run: defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidation -bool YES
- name: Install dependencies
working-directory: mastodon-tuist-ios
run: tuist install
- name: Generate project
working-directory: mastodon-tuist-ios
run: tuist generate --no-binary-cache
- name: Benchmark clean build with pre-warmed cache
working-directory: mastodon-tuist-ios
run: |
hyperfine --warmup 1 --runs 5 \
--setup 'xcodebuild -workspace MastodonTuist.xcworkspace -scheme Mastodon build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO COMPILATION_CACHE_ENABLE_CACHING="YES" COMPILATION_CACHE_ENABLE_PLUGIN="YES" COMPILATION_CACHE_REMOTE_SERVICE_PATH="$HOME/.cirruslabs/omni-cache.sock"' \
--prepare 'rm -rf ~/Library/Developer/Xcode/DerivedData' \
'xcodebuild -workspace MastodonTuist.xcworkspace -scheme Mastodon build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO COMPILATION_CACHE_ENABLE_CACHING="YES" COMPILATION_CACHE_ENABLE_PLUGIN="YES" COMPILATION_CACHE_REMOTE_SERVICE_PATH="$HOME/.cirruslabs/omni-cache.sock"' \
--show-output
no-cache:
name: Clean build without caching
runs-on: ghcr.io/cirruslabs/macos-runner:tahoe
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
working-directory: mastodon-tuist-ios
run: tuist install
- name: Generate project
working-directory: mastodon-tuist-ios
run: tuist generate --no-binary-cache
- name: Benchmark clean build without caching
working-directory: mastodon-tuist-ios
run: |
hyperfine --warmup 1 --runs 5 \
--prepare 'rm -rf ~/Library/Developer/Xcode/DerivedData' \
'xcodebuild -workspace MastodonTuist.xcworkspace -scheme Mastodon build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO COMPILATION_CACHE_ENABLE_CACHING=NO' \
--show-output
local-cache:
name: Clean build with local caching
runs-on: ghcr.io/cirruslabs/macos-runner:tahoe
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
working-directory: mastodon-tuist-ios
run: tuist install
- name: Generate project
working-directory: mastodon-tuist-ios
run: tuist generate --no-binary-cache
- name: Benchmark clean build with local caching
working-directory: mastodon-tuist-ios
run: |
hyperfine --warmup 1 --runs 5 \
--setup 'rm -rf ~/Library/Developer/Xcode/DerivedData' \
--prepare 'xcodebuild -workspace MastodonTuist.xcworkspace -scheme Mastodon clean' \
'xcodebuild -workspace MastodonTuist.xcworkspace -scheme Mastodon build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO COMPILATION_CACHE_ENABLE_CACHING="YES" COMPILATION_CACHE_ENABLE_PLUGIN=NO' \
--show-output