Skip to content

Commit e75445f

Browse files
authored
Move size task into ci action (home-assistant#2239)
<!-- Thank you for submitting a Pull Request and helping to improve Home Assistant. Please complete the following sections to help the processing and review of your changes. Please do not delete anything from this template. --> ## Summary <!-- Provide a brief summary of the changes you have made and most importantly what they aim to achieve --> ## Screenshots <!-- If this is a user-facing change not in the frontend, please include screenshots in light and dark mode. --> ## Link to pull request in Documentation repository <!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" --> Documentation: home-assistant/companion.home-assistant# ## Any other notes <!-- If there is any other information of note, like if this Pull Request is part of a bigger change, please include it here. -->
1 parent 41e0aeb commit e75445f

File tree

5 files changed

+54
-87
lines changed

5 files changed

+54
-87
lines changed

.env.sample

-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ HOMEASSISTANT_APP_STORE_CONNECT_TEAM_ID=
99
# lokalise auth token and project id
1010
HOMEASSISTANT_LOKALIZE_TOKEN=
1111
HOMEASSISTANT_LOKALIZE_PROJECT_ID=
12-
# sentry auth token, organization and project
13-
SENTRY_AUTH_TOKEN=
14-
SENTRY_ORG=
15-
SENTRY_PROJECT=
1612

1713
# contents of the p8 file
1814
APP_STORE_CONNECT_API_KEY_KEY=

.github/workflows/ci.yml

+54-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ jobs:
6060
test:
6161
runs-on: macos-12
6262
timeout-minutes: 60
63-
env:
64-
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
6563
steps:
6664
- uses: actions/checkout@v3
6765

@@ -122,3 +120,57 @@ jobs:
122120
with:
123121
name: ios-simulator
124122
path: ~/Library/Developer/Xcode/DerivedData/HomeAssistant-*/Build/Products/Debug-iphonesimulator/*.app
123+
124+
size:
125+
runs-on: macos-12
126+
timeout-minutes: 60
127+
steps:
128+
- uses: actions/checkout@v3
129+
130+
- uses: actions/cache@v3
131+
name: "Cache: Pods"
132+
id: cache_pods
133+
with:
134+
path: |
135+
Pods
136+
Tools/MaterialDesignIcons.ttf
137+
Tools/MaterialDesignIcons.json
138+
key: >-
139+
${{ runner.os }}-pods-${{ env.DEVELOPER_DIR }}-
140+
${{ hashFiles('**/Gemfile.lock', '**/Podfile.lock', 'Tools/BuildMaterialDesignIconsFont.sh') }}
141+
142+
- uses: actions/cache@v3
143+
name: "Cache: Gems"
144+
id: cache_gems
145+
with:
146+
path: vendor/bundle
147+
key: >-
148+
${{ runner.os }}-gems-${{ env.ImageVersion }}-${{ env.DEVELOPER_DIR }}-${{ hashFiles('**/Gemfile.lock') }}
149+
150+
- name: Install Brews
151+
# right now, we don't need anything from brew for sizing, so save some time
152+
if: ${{ false }}
153+
run: brew bundle
154+
155+
- name: Install Gems
156+
if: steps.cache_gems.outputs.cache-hit != 'true'
157+
run: bundle install --jobs 4 --retry 3
158+
159+
- name: Install Pods Release
160+
if: steps.cache_pods.outputs.cache-hit != 'true'
161+
run: bundle exec pod install --repo-update
162+
163+
- name: Build app
164+
run: bundle exec fastlane ios size
165+
env:
166+
P12_KEY_IOS_APP_STORE: ${{ secrets.P12_KEY_IOS_APP_STORE }}
167+
P12_KEY_MAC_APP_STORE: ${{ secrets.P12_KEY_MAC_APP_STORE }}
168+
P12_KEY_MAC_DEVELOPER_ID: ${{ secrets.P12_KEY_MAC_DEVELOPER_ID }}
169+
P12_VALUE_IOS_APP_STORE: ${{ secrets.P12_VALUE_IOS_APP_STORE }}
170+
P12_VALUE_MAC_APP_STORE: ${{ secrets.P12_VALUE_MAC_APP_STORE }}
171+
P12_VALUE_MAC_DEVELOPER_ID: ${{ secrets.P12_VALUE_MAC_DEVELOPER_ID }}
172+
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_TOKEN }}
173+
EMERGE_REPO_NAME: ${{ github.repository }}
174+
EMERGE_PR_NUMBER: ${{ github.event.number }}
175+
EMERGE_SHA: ${{ github.event.pull_request.head.sha }}
176+
EMERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }}

.github/workflows/distribute.yml

-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ jobs:
5151
EMERGE_REPO_NAME: ${{ github.repository }}
5252
EMERGE_SHA: ${{ github.sha }}
5353
EMERGE_BASE_SHA: ${{ github.event.before }}
54-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
55-
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
56-
# hard-coded so it doesn't cause 'ios' to be *** everywhere in the logs
57-
SENTRY_PROJECT: ios
5854

5955
- name: Dump Version Information
6056
run: cat Configuration/Version.xcconfig

.github/workflows/size.yml

-68
This file was deleted.

fastlane/Fastfile

-9
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ lane :update_dsyms do
8686
output_directory: directory
8787
)
8888

89-
upload_path_to_sentry(path: directory)
9089
FileUtils.rm_r directory
9190
end
9291

@@ -461,14 +460,6 @@ private_lane :provisioning_profile_specifiers do |options|
461460
specifiers
462461
end
463462

464-
private_lane :upload_path_to_sentry do |options|
465-
sh('sentry-cli', 'upload-dif', options[:path])
466-
end
467-
468-
private_lane :upload_archive_to_sentry do
469-
sh('sentry-cli', 'upload-dif', lane_context[SharedValues::XCODEBUILD_ARCHIVE])
470-
end
471-
472463
private_lane :upload_binary_to_apple do |options|
473464
attempts = 0
474465

0 commit comments

Comments
 (0)