Update CI configurations (#2347) #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Release" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-deploy-ios: | |
name: "Build and Deploy iOS Release" | |
runs-on: macos-10.15 | |
steps: | |
- name: "Checkout Repository" | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: "Set version variable" | |
run: | | |
TANGRAM_VERSION=$(if [[ ${{ github.ref_type }} == "tag" ]]; then echo ${{ github.ref_name }}; else echo ${{ github.sha }}; fi) | |
echo "TANGRAM_VERSION=$TANGRAM_VERSION" >> $GITHUB_ENV | |
- name: "Install Jazzy" | |
run: sudo gem install jazzy --no-document --version 0.14.1 | |
- name: "Install ccache" | |
run: brew install ccache | |
- name: "Cache ccache directory" | |
uses: actions/cache@v2 | |
with: | |
path: ~/Library/Caches/ccache | |
key: ios-release-ccache-v1-${{ github.sha }} | |
restore-keys: ios-release-ccache-v1- | |
- name: "Reset ccache stats" | |
run: ccache --zero-stats | |
- name: "Build iOS XCFramework" | |
run: make ios-xcframework BUILD_TYPE=Release CMAKE_OPTIONS="-DTANGRAM_XCODE_USE_CCACHE=1" | |
- name: "Print ccache stats" | |
run: ccache --show-stats | |
- name: "Check bitcode" | |
run: source scripts/check_bitcode.sh build/ios/Release/TangramMap.xcframework/ios-arm64_armv7/TangramMap.framework/TangramMap arm64 armv7 | |
- name: "Arrange pod contents" | |
run: | | |
mkdir build/pod | |
cp -r build/ios/Release/TangramMap.xcframework build/pod/TangramMap.xcframework | |
cp platforms/ios/framework/README.md build/pod/README.md | |
cp LICENSE build/pod/LICENSE | |
- name: "Upload pod" | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tangram-ios-${{ env.TANGRAM_VERSION }} | |
path: build/pod/ | |
- name: "Build docs" | |
run: make ios-docs | |
- name: "Upload docs" | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tangram-ios-docs-${{ env.TANGRAM_VERSION }} | |
path: build/ios-docs/ |