Skip to content

Commit cdd9b03

Browse files
committed
test ios
1 parent a811081 commit cdd9b03

File tree

5 files changed

+125
-12
lines changed

5 files changed

+125
-12
lines changed

.github/workflows/build_nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ jobs:
6767
echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ${{ github.workspace }}/sample_app/ios/firebase-service-account.json
6868
6969
- name: Build and release
70+
working-directory: sample_app/ios
7071
env:
7172
GOOGLE_APPLICATION_CREDENTIALS: "${{ github.workspace }}/sample_app/ios/firebase-service-account.json"
7273
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
7374
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
7475
run: |
75-
flutter build ios --no-codesign
76-
cd ios
7776
bundle exec fastlane deploy_to_firebase
7877
7978
build_and_deploy_android:
8079
runs-on: ubuntu-latest
8180
timeout-minutes: 15
82-
if: ${{ github.event_name == 'push' || inputs.build_android == true }}
81+
# if: ${{ github.event_name == 'push' || inputs.build_android == true }}
82+
if: false
8383
steps:
8484
- name: Install Bot SSH Key
8585
uses: webfactory/[email protected]

sample_app/Fastfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
opt_out_usage
2+
3+
# Have an easy way to get the root of the project
4+
def root_path
5+
Dir.pwd.sub(/.*\Kfastlane/, '').sub(/.*\Kandroid/, '').sub(/.*\Kios/, '').sub(/.*\K\/\//, '')
6+
end
7+
8+
# Have an easy way to run flutter tasks on the root of the project
9+
lane :sh_on_root do |options|
10+
Dir.chdir(root_path) { sh(options[:command]) }
11+
end
12+
13+
# Tasks to be reused on each platform flow
14+
lane :fetch_dependencies do
15+
sh_on_root(command: "flutter pub get --suppress-analytics")
16+
end
17+
18+
# Tasks to be reused on each platform flow
19+
lane :build_autogenerated_code do
20+
sh_on_root(command: "flutter pub run build_runner build --delete-conflicting-outputs")
21+
end
22+
23+
# Tasks to be reused on each platform flow
24+
lane :lint do
25+
sh_on_root(command: "flutter format --suppress-analytics --set-exit-if-changed -n lib/main.dart lib/src/ test/")
26+
end
27+
28+
# Tasks to be reused on each platform flow
29+
lane :test do |options|
30+
sh_on_root(command: "flutter test --no-pub --coverage --suppress-analytics")
31+
end

sample_app/ios/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
source "https://rubygems.org"
22

33
gem "fastlane"
4+
gem "cocoapods"
45

56
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
67
eval_gemfile(plugins_path) if File.exist?(plugins_path)

sample_app/ios/Gemfile.lock

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@ GEM
55
base64
66
nkf
77
rexml
8+
activesupport (5.2.8.1)
9+
concurrent-ruby (~> 1.0, >= 1.0.2)
10+
i18n (>= 0.7, < 2)
11+
minitest (~> 5.1)
12+
tzinfo (~> 1.1)
813
addressable (2.8.7)
914
public_suffix (>= 2.0.2, < 7.0)
15+
algoliasearch (1.27.5)
16+
httpclient (~> 2.8, >= 2.8.3)
17+
json (>= 1.5.1)
1018
artifactory (3.0.17)
1119
atomos (0.1.3)
1220
aws-eventstream (1.3.1)
@@ -29,16 +37,57 @@ GEM
2937
babosa (1.0.4)
3038
base64 (0.2.0)
3139
claide (1.1.0)
40+
cocoapods (1.10.2)
41+
addressable (~> 2.6)
42+
claide (>= 1.0.2, < 2.0)
43+
cocoapods-core (= 1.10.2)
44+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
45+
cocoapods-downloader (>= 1.4.0, < 2.0)
46+
cocoapods-plugins (>= 1.0.0, < 2.0)
47+
cocoapods-search (>= 1.0.0, < 2.0)
48+
cocoapods-trunk (>= 1.4.0, < 2.0)
49+
cocoapods-try (>= 1.1.0, < 2.0)
50+
colored2 (~> 3.1)
51+
escape (~> 0.0.4)
52+
fourflusher (>= 2.3.0, < 3.0)
53+
gh_inspector (~> 1.0)
54+
molinillo (~> 0.6.6)
55+
nap (~> 1.0)
56+
ruby-macho (~> 1.4)
57+
xcodeproj (>= 1.19.0, < 2.0)
58+
cocoapods-core (1.10.2)
59+
activesupport (> 5.0, < 6)
60+
addressable (~> 2.6)
61+
algoliasearch (~> 1.0)
62+
concurrent-ruby (~> 1.1)
63+
fuzzy_match (~> 2.0.4)
64+
nap (~> 1.0)
65+
netrc (~> 0.11)
66+
public_suffix
67+
typhoeus (~> 1.0)
68+
cocoapods-deintegrate (1.0.5)
69+
cocoapods-downloader (1.6.3)
70+
cocoapods-plugins (1.0.0)
71+
nap
72+
cocoapods-search (1.0.1)
73+
cocoapods-trunk (1.6.0)
74+
nap (>= 0.8, < 2.0)
75+
netrc (~> 0.11)
76+
cocoapods-try (1.2.0)
3277
colored (1.2)
3378
colored2 (3.1.2)
3479
commander (4.6.0)
3580
highline (~> 2.0.0)
81+
concurrent-ruby (1.3.5)
3682
declarative (0.0.20)
3783
digest-crc (0.7.0)
3884
rake (>= 12.0.0, < 14.0.0)
3985
domain_name (0.6.20240107)
4086
dotenv (2.8.1)
4187
emoji_regex (3.2.3)
88+
escape (0.0.4)
89+
ethon (0.16.0)
90+
ffi (>= 1.15.0)
4291
excon (0.112.0)
4392
faraday (1.10.4)
4493
faraday-em_http (~> 1.0)
@@ -116,6 +165,9 @@ GEM
116165
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
117166
fastlane-sirp (1.0.0)
118167
sysrandom (~> 1.0)
168+
ffi (1.17.1)
169+
fourflusher (2.3.1)
170+
fuzzy_match (2.0.4)
119171
gh_inspector (1.1.3)
120172
google-apis-androidpublisher_v3 (0.54.0)
121173
google-apis-core (>= 0.11.0, < 2.a)
@@ -162,17 +214,23 @@ GEM
162214
domain_name (~> 0.5)
163215
httpclient (2.9.0)
164216
mutex_m
217+
i18n (1.14.7)
218+
concurrent-ruby (~> 1.0)
165219
jmespath (1.6.2)
166220
json (2.10.1)
167221
jwt (2.10.1)
168222
base64
169223
mini_magick (4.13.2)
170224
mini_mime (1.1.5)
225+
minitest (5.25.4)
226+
molinillo (0.6.6)
171227
multi_json (1.15.0)
172228
multipart-post (2.4.1)
173229
mutex_m (0.3.0)
174230
nanaimo (0.4.0)
231+
nap (1.1.0)
175232
naturally (2.2.1)
233+
netrc (0.11.0)
176234
nkf (0.2.0)
177235
optparse (0.6.0)
178236
os (1.1.4)
@@ -186,6 +244,7 @@ GEM
186244
retriable (3.1.2)
187245
rexml (3.4.1)
188246
rouge (3.28.0)
247+
ruby-macho (1.4.0)
189248
ruby2_keywords (0.0.5)
190249
rubyzip (2.4.1)
191250
security (0.1.5)
@@ -201,11 +260,16 @@ GEM
201260
terminal-notifier (2.0.0)
202261
terminal-table (3.0.2)
203262
unicode-display_width (>= 1.1.1, < 3)
263+
thread_safe (0.3.6)
204264
trailblazer-option (0.1.2)
205265
tty-cursor (0.7.1)
206266
tty-screen (0.8.2)
207267
tty-spinner (0.9.3)
208268
tty-cursor (~> 0.7)
269+
typhoeus (1.4.1)
270+
ethon (>= 0.9.0)
271+
tzinfo (1.2.11)
272+
thread_safe (~> 0.1)
209273
uber (0.1.0)
210274
unicode-display_width (2.6.0)
211275
word_wrap (1.0.0)
@@ -225,6 +289,7 @@ PLATFORMS
225289
ruby
226290

227291
DEPENDENCIES
292+
cocoapods
228293
fastlane
229294
fastlane-plugin-firebase_app_distribution
230295

sample_app/ios/fastlane/Fastfile

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
fastlane_version "2.226.0"
22
default_platform :ios
33

4+
import '../../Fastfile'
5+
46
before_all do
57
if is_ci
68
setup_ci()
@@ -20,6 +22,18 @@ lane :match_me do
2022
)
2123
end
2224

25+
lane :build do |options|
26+
fetch_dependencies
27+
28+
sign_enabled = options[:sign_enabled] || false
29+
sign_param = sign_enabled ? '' : '--no-codesign'
30+
31+
config_only = options[:config_only] || false
32+
config_param = config_only ? '--config-only' : ''
33+
34+
sh_on_root(command: "flutter build ios --no-pub --suppress-analytics --release #{sign_param} #{config_param}")
35+
end
36+
2337
desc "Installs all Certs and Profiles necessary for appstore"
2438
lane :match_appstore do
2539
match(
@@ -35,15 +49,17 @@ end
3549
lane :deploy_to_firebase do
3650
match_me
3751

38-
gym(
39-
workspace: "./Runner.xcworkspace",
40-
scheme: "Runner",
41-
export_method: "ad-hoc",
42-
export_options: "./fastlane/beta_gym_export_options.plist",
43-
silent: true,
44-
clean: true,
45-
include_symbols: true,
46-
output_directory: "./dist"
52+
build(
53+
sign_enabled: true,
54+
)
55+
56+
build_app(
57+
scheme: "Runner",
58+
export_method: "ad-hoc",
59+
silent: true,
60+
clean: true,
61+
include_symbols: true,
62+
output_directory: './dist',
4763
)
4864

4965
message = changelog_from_git_commits(commits_count: 10)

0 commit comments

Comments
 (0)