2021-07-14 16:00:21 +00:00
|
|
|
name: Build CI
|
2021-03-19 17:50:39 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
# Triggers the workflow on any pull request and push to develop
|
|
|
|
push:
|
|
|
|
branches: [ develop ]
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2021-04-28 15:43:05 +00:00
|
|
|
env:
|
|
|
|
# Make the git branch for a PR available to our Fastfile
|
|
|
|
MX_GIT_BRANCH: ${{ github.event.pull_request.head.ref }}
|
|
|
|
|
2021-03-19 17:50:39 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: macos-latest
|
2021-04-20 14:55:38 +00:00
|
|
|
|
2021-03-19 17:50:39 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-04-21 05:38:42 +00:00
|
|
|
# Common cache
|
2021-04-21 07:25:18 +00:00
|
|
|
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
|
2021-04-20 15:41:01 +00:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: Pods
|
|
|
|
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pods-
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: vendor/bundle
|
|
|
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gems-
|
|
|
|
|
2021-06-09 06:35:14 +00:00
|
|
|
# Make sure we use the latest version of MatrixKit
|
|
|
|
- name: Reset MatrixKit pod
|
|
|
|
run: rm -rf Pods/MatrixKit
|
|
|
|
|
2021-04-21 05:38:42 +00:00
|
|
|
# Common setup
|
2021-04-21 07:25:18 +00:00
|
|
|
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
|
2021-04-20 15:41:01 +00:00
|
|
|
- name: Bundle install
|
|
|
|
run: |
|
|
|
|
bundle config path vendor/bundle
|
2021-04-21 05:38:42 +00:00
|
|
|
bundle install --jobs 4 --retry 3
|
2021-03-19 17:50:39 +00:00
|
|
|
- name: Use right MatrixKit and MatrixSDK versions
|
2021-04-28 15:43:05 +00:00
|
|
|
run: bundle exec fastlane point_dependencies_to_related_branches
|
2021-03-19 17:50:39 +00:00
|
|
|
|
2021-04-21 07:25:18 +00:00
|
|
|
# Main step
|
2021-04-21 06:28:45 +00:00
|
|
|
- name: Build iOS simulator
|
|
|
|
run: bundle exec fastlane build
|