-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
At long last, the time as come to say goodbye to Travis CI 👋. All hail the new king, GitHub Actions 🙌 ## Changes - Setup GitHub Action workflows: + `ci.yml` (Build + Test) + `pod-lint` (CocoaPods Lint) + `release.yml` (GitHub and CocoaPods releases) + `spm.yml` (SwiftPM Build) - Remove .travis.yml. - Add `Gemfile` and `Gemfile.lock`.
- Loading branch information
Showing
8 changed files
with
304 additions
and
66 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '[0-9]+\.[0-9]+\.[0-9]+' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
# https://github.com/actions/virtual-environments/tree/main/images/macos | ||
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer | ||
|
||
WORKSPACE: Alicerce.xcworkspace | ||
SCHEME: Alicerce | ||
|
||
IOS_SDK: iphonesimulator | ||
IOS_DESTINATION: "platform=iOS Simulator,name=iPhone 12 Pro,OS=latest" | ||
|
||
DERIVED_DATA_PATH: build | ||
|
||
jobs: | ||
env-details: | ||
name: Environment details | ||
runs-on: macOS-latest | ||
steps: | ||
- name: xcode version | ||
run: xcodebuild -version -sdk | ||
|
||
- name: list simulators | ||
run: | | ||
xcrun simctl delete unavailable | ||
xcrun simctl list | ||
build-test: | ||
name: Build and Test | ||
runs-on: macOS-latest | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: unit tests | ||
run: | | ||
set -o pipefail | ||
xcodebuild clean build test \ | ||
-workspace "$WORKSPACE" \ | ||
-scheme "$SCHEME" \ | ||
-sdk "$IOS_SDK" \ | ||
-destination "$IOS_DESTINATION" \ | ||
-derivedDataPath "$DERIVED_DATA_PATH" \ | ||
-enableCodeCoverage YES | xcpretty -c | ||
- name: codecov upload | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
xcode_package: '"^$SCHEME$"' | ||
xcode_derived_data: "$DERIVED_DATA_PATH" | ||
#fail_ci_if_error: true | ||
verbose: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CocoaPods Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '[0-9]+\.[0-9]+\.[0-9]+' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
# https://github.com/actions/virtual-environments/tree/main/images/macos | ||
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer | ||
|
||
jobs: | ||
main: | ||
name: Pod Lint | ||
runs-on: macOS-latest | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: ruby versions | ||
run: | | ||
ruby --version | ||
gem --version | ||
bundler --version | ||
- name: cache gems | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: ${{ runner.os }}-gem- | ||
|
||
- name: bundle install | ||
run: | | ||
gem install bundler --no-document | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: pod lint | ||
run: bundle exec pod lib lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["CI", "SPM", "CocoaPods Lint"] | ||
types: [completed] | ||
|
||
jobs: | ||
deploy-github: | ||
name: Deploy Github | ||
runs-on: macOS-latest | ||
if: startsWith(github.ref, 'refs/tags/') && ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build Framework | ||
run: | | ||
carthage build --no-skip-current --cache-builds | ||
carthage archive Alicerce | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: Alicerce.framework.zip | ||
body: | | ||
# Changes | ||
- <!-- Insert changes here --> | ||
deploy-cocoapods: | ||
name: Deploy CocoaPods | ||
runs-on: macOS-latest | ||
if: startsWith(github.ref, 'refs/tags/') && ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: ruby versions | ||
run: | | ||
ruby --version | ||
gem --version | ||
bundler --version | ||
- name: cache gems | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: ${{ runner.os }}-gem- | ||
|
||
- name: bundle install | ||
run: | | ||
gem install bundler --no-document | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: pod trunk push | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
run: pod trunk push --allow-warnings | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: SwiftPM Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '[0-9]+\.[0-9]+\.[0-9]+' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
# https://github.com/actions/virtual-environments/tree/main/images/macos | ||
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer | ||
|
||
PLATFORM_TARGET: x86_64-apple-ios14.0-simulator | ||
|
||
jobs: | ||
main: | ||
name: SwiftPM Build | ||
runs-on: macOS-latest | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: xcode version | ||
run: xcodebuild -version -sdk | ||
|
||
- name: swift build | ||
run: swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "${PLATFORM_TARGET}" |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'cocoapods', '~> 1.10' |
Oops, something went wrong.