CircleCi to Github actions migration #35
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: "iOS SDK CI" | |
on: | |
pull_request: | |
push: | |
tags: | |
- "v.*" | |
jobs: | |
setup: | |
name: "Setup" | |
runs-on: macos-13 | |
outputs: | |
bundle-version-finder: ${{ steps.bundle-version-finder.outputs.bundle-version }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install ruby and gem dependencies | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.0.7 | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Find bundle version | |
id: bundle-version-finder | |
run: | | |
bundle_version=$(bundle -v | awk '{print $3}') | |
echo "bundle-version=$bundle_version" >> $GITHUB_OUTPUT | |
sdk-tests: | |
name: "SDK Tests" | |
runs-on: macos-13 | |
needs: [setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Bundle install | |
run: bundle _${{ needs.setup.outputs.bundle-version-finder }}_ install | |
- name: Run Tests | |
run: bundle exec fastlane tests | |
- name: Store Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: ./fastlane/test_output | |
build-demo-swift: | |
name: "Build Demo Swift" | |
runs-on: macos-13 | |
needs: [setup, sdk-tests] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Bundle install | |
run: bundle _${{ needs.setup.outputs.bundle-version-finder }}_ install | |
- name: Build Demo Swift | |
id: build-demo-swift | |
run: bundle exec fastlane demo_swift | |
- name: find output | |
run: ls -R | |
- name: Store Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: demo-swift | |
path: ./demo-ios-swift/Pods | |
build-demo-objc: | |
name: "Build Demo Objective-C" | |
runs-on: macos-13 | |
env: | |
FL_OUTPUT_DIR: output | |
needs: [setup, sdk-tests] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Bundle install | |
run: bundle _${{ needs.setup.outputs.bundle-version-finder }}_ install | |
- name: Build Demo Objective-C | |
run: bundle exec fastlane demo_objc | |
- name: find output | |
run: ls -R | |
- name: Store Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: demo-objc | |
path: ./demo-ios-objc/Pods |