Skip to content

Commit 746ad43

Browse files
committed
Clean up CircleCI config YAML
reduce duplication in iOS deploy jobs
1 parent 6cd784c commit 746ad43

File tree

1 file changed

+14
-35
lines changed

1 file changed

+14
-35
lines changed

.circleci/config.yml

+14-35
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- checkout
3232
- run: git submodule update --init
3333
- run: cd platforms/android && ./gradlew demo:assembleDebug -Ptangram.abis=armeabi-v7a
34-
build-deploy-android-snapshot:
34+
build-deploy-android:
3535
executor: android-executor
3636
steps:
3737
- checkout
@@ -52,7 +52,7 @@ jobs:
5252
- run: make ios-sim BUILD_TYPE=Debug
5353
- run: make ios-static-sim BUILD_TYPE=Debug
5454
- run: make ios-swift-sim BUILD_TYPE=Debug
55-
build-deploy-ios-snapshot:
55+
build-deploy-ios:
5656
executor: macos-executor
5757
steps:
5858
# Check out repository with submodules.
@@ -77,7 +77,14 @@ jobs:
7777
- run: zip ~/pod.zip LICENSE
7878
- store_artifacts:
7979
path: ~/pod.zip
80-
build-deploy-macos-snapshot:
80+
- when:
81+
condition: << pipeline.git.tag >>
82+
steps:
83+
# Upload and publish the Cocoapods archive to GitHub. The download URL on GitHub uses the file name, labels have no effect.
84+
- run: brew install gh
85+
- run: mv ~/pod.zip ~/tangram-ios-<< pipeline.git.tag >>.zip
86+
- run: gh release upload << pipeline.git.tag >> ~/tangram-ios-<< pipeline.git.tag >>.zip
87+
build-deploy-macos:
8188
executor: macos-executor
8289
steps:
8390
# Check out repository with submodules.
@@ -91,34 +98,6 @@ jobs:
9198
- run: cd build/osx && zip -r ~/demo.zip tangram.app
9299
- store_artifacts:
93100
path: ~/demo.zip
94-
build-deploy-ios-release:
95-
executor: macos-executor
96-
steps:
97-
# Check out repository with submodules.
98-
- checkout
99-
- run: git submodule update --init
100-
# Install dependencies.
101-
- run: sudo gem install jazzy --no-document --version 0.10.0
102-
- run: brew install cmake gh
103-
# Build the framework in release mode and package it into pod.zip
104-
- run: make ios-xcframework BUILD_TYPE=Release
105-
# Check that bitcode is included for required archs.
106-
- run: source scripts/check_bitcode.sh build/ios/Release/TangramMap.xcframework/ios-arm64_armv7/TangramMap.framework/TangramMap arm64 armv7
107-
- run: make ios-docs
108-
- run: cd build/ios-docs && zip -r ~/docs.zip .
109-
- store_artifacts:
110-
path: ~/docs.zip
111-
# To produce the intended structure within the zip archive, we must cd to each file's location.
112-
- run: cd build/ios/Release && zip -r ~/pod.zip TangramMap.xcframework
113-
# Add the readme and license files.
114-
- run: cd platforms/ios/framework && zip ~/pod.zip README.md
115-
- run: zip ~/pod.zip LICENSE
116-
# Upload and publish the Cocoapods archive to GitHub. The download URL on GitHub uses the file name, labels have no effect.
117-
- run: mv ~/pod.zip ~/tangram-ios-${CIRCLE_TAG}.zip
118-
- run: gh release upload ${CIRCLE_TAG} ~/tangram-ios-${CIRCLE_TAG}.zip
119-
- store_artifacts:
120-
path: ~/tangram-ios-${CIRCLE_TAG}.zip
121-
122101
workflows:
123102
version: 2
124103
build-and-deploy:
@@ -135,20 +114,20 @@ workflows:
135114
branches:
136115
ignore: main
137116
# Run on pushes to main
138-
- build-deploy-android-snapshot:
117+
- build-deploy-android:
139118
filters:
140119
branches:
141120
only: main
142-
- build-deploy-macos-snapshot:
121+
- build-deploy-macos:
143122
filters:
144123
branches:
145124
only: main
146-
- build-deploy-ios-snapshot:
125+
- build-deploy-ios:
147126
filters:
148127
branches:
149128
only: main
150129
# Run on tag pushes
151-
- build-deploy-ios-release:
130+
- build-deploy-ios:
152131
filters:
153132
# For any tag of the form 1, 1.2.3, 1.4-beta2, etc. we will deploy a release build.
154133
tags:

0 commit comments

Comments
 (0)