Skip to content

Commit

Permalink
Switch to github actions (#1581)
Browse files Browse the repository at this point in the history
* switch to github actions

* fix actions branch

* add cache to actions and make release use xcode11.7

* update order

* fix release and other builds

* switch all actions back to xcode11

* properly set xcode11

* see if parseui builds on xcode 11.6

* add release actions, switch badges

* Make ParseUI run on Xcode11.7

* change filename

* update release

* only release on publish

* Updates FBSDK download URL in ParseUI build script

* Fix bad iOS tests that failed constantly in Xcode 12 and randomly in Xcode 11. Should work on both now.

My guess is that XCTest received some improvements in objective-c which is why the failures in 12 are more consistent.

* run all on xcode 12 except for release

* fix curl command in ParseUI script

* run ParseUI build in xcode 11

* ParseUI on xcode 12

* fixed multiple bolts files in ParsUI-swift

* add missing bolts to Parse project

* Try ParseUI with Xcode 11.6

* add dependencies

* add Parse dependency to ParseUI

* try ParseUI swift

* Update ci.yml

* add FB script to ParseUI-swift, return ParseUI-obj back to the way it was

* Update code in ParseUI project

* Switch ParseUI back to all

* move parseui to circle

* move parseui to circle

* revert

* clean up ParseUI

* Update Carthage before build

* Update ci.yml

* Update ci.yml

* fix ParseUI build

* Update ci.yml

* make parseUI run after facebook to give priority to the first 5

* Bump codecov

Make sure added features have some minimum amount of tests.

* Fix threading issues that caused random failures in tests: testMigratingDataFromExtensionsSandbox and testMigratingDataFromMainSandbox

* Move waitForTestExpectations in test cases

* Make longer running builds start in first round

* Fix docs build

* Revert test change, will fail as there's something up with the failing test

* Disable ParseClientConfigurationTests.testExtensionDataSharing for now

Co-authored-by: Darren Black <[email protected]>
  • Loading branch information
cbaker6 and drdaz authored Jan 6, 2021
1 parent 6124d39 commit 9771d1f
Show file tree
Hide file tree
Showing 21 changed files with 351 additions and 226 deletions.
36 changes: 1 addition & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defaults: &defaults
macos:
xcode: "11.6.0"
xcode: "11.7.0"
shell: /bin/bash --login -eo pipefail
aliases:
- &cache-pull
Expand All @@ -25,38 +25,6 @@ aliases:

version: 2
jobs:
ios:
<<: *defaults
steps:
- checkout
- restore_cache: *cache-pull
- run: *prepare
- save_cache: *cache-push
- run: bundle exec rake test:ios
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: build/reports
macos:
<<: *defaults
steps:
- checkout
- restore_cache: *cache-pull
- run: *prepare
- save_cache: *cache-push
- run:
name: "Create and set the default keychain"
command: |
security create-keychain -p "" temporary
security default-keychain -s temporary
security unlock-keychain -p "" temporary
security set-keychain-settings -lut 7200 temporary
- run: bundle exec rake test:macos
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: build/reports
- store_artifacts:
path: build/reports
destination: test_results
carthage:
<<: *defaults
steps:
Expand All @@ -70,8 +38,6 @@ workflows:
version: 2
pr:
jobs:
- ios
- macos
- carthage
nightly:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ coverage:
changes: false
project:
default:
target: 65
target: 74
comment: false
186 changes: 186 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
CI_XCODE_VER_OLDER: '/Applications/Xcode_11.6.app/Contents/Developer'

jobs:
ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Submodules and Bundle Install
run: |
git submodule update --init --recursive
sudo gem install bundler
bundle config set path 'vendor/bundle'
bundle install
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:ios
- name: Send codecov
run: bash <(curl https://codecov.io/bash)

macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Submodules and Bundle Install
run: |
git submodule update --init --recursive
sudo gem install bundler
bundle config set path 'vendor/bundle'
bundle install
- name: Create and set the default keychain
run: |
security create-keychain -p "" temporary
security default-keychain -s temporary
security unlock-keychain -p "" temporary
security set-keychain-settings -lut 7200 temporary
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:macos
- name: Send codecov
run: bash <(curl https://codecov.io/bash)

facebook_utils:
needs: macos
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Submodules and Bundle Install
run: |
git submodule update --init --recursive
sudo gem install bundler
bundle config set path 'vendor/bundle'
bundle install
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:facebook_utils:ios
- name: Send codecov
run: bash <(curl https://codecov.io/bash)

twitter_utils:
needs: macos
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Submodules and Bundle Install
run: |
git submodule update --init --recursive
sudo gem install bundler
bundle config set path 'vendor/bundle'
bundle install
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:twitter_utils:ios
- name: Send codecov
run: bash <(curl https://codecov.io/bash)

parseui:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Submodules and Bundle Install
run: |
git submodule update --init --recursive
sudo gem install bundler
bundle config set path 'vendor/bundle'
bundle install
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:parseui:all
- name: Send codecov
run: bash <(curl https://codecov.io/bash)

cocoapods:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod lib lint --allow-warnings --verbose

release:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Submodules and Bundle Install
run: |
git submodule update --init --recursive
sudo gem install bundler
bundle config set path 'vendor/bundle'
bundle install
- name: Build Release
run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake package:release
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}

docs:
needs: macos
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Submodules and Bundle Instal
run: |
git submodule update --init --recursive
sudo gem install bundler
bundle config path vendor/bundle
bundle install
- name: Create Jazzy Docs
run: |
./Scripts/jazzy.sh
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: release
on:
release:
types: [published]
env:
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'

jobs:
cocoapods:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod lib lint --allow-warnings --verbose
- name: Deploy CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push Parse.podspec --allow-warnings --verbose
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}

docs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install Bundle
run: |
bundle config path vendor/bundle
bundle install
- name: Create Jazzy Docs
run: |
./Scripts/jazzy.sh
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
- name: Deploy Jazzy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

release:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Submodules and Bundle Install
run: |
git submodule update --init --recursive
sudo gem install bundler
bundle config set path 'vendor/bundle'
bundle install
- name: Build Release
run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake package:release
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
- name: Deploy assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/release/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
Loading

0 comments on commit 9771d1f

Please sign in to comment.