-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-get-device-id
- Loading branch information
Showing
97 changed files
with
5,164 additions
and
1,512 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
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,22 @@ | ||
# Creates jira tickets for new github issues to help triage | ||
name: Jira Issue Creator For iOS | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
workflow_call: | ||
inputs: | ||
label: | ||
type: string | ||
|
||
jobs: | ||
call-workflow-passing-data: | ||
uses: amplitude/Amplitude-TypeScript/.github/workflows/jira-issue-create-template.yml@main | ||
with: | ||
label: "iOS" | ||
subcomponent: "dx_ios_sdk" | ||
secrets: | ||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | ||
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }} |
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 |
---|---|---|
|
@@ -4,17 +4,17 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
dryRun: | ||
description: 'Do a dry run to preview instead of a real release' | ||
description: "Do a dry run to preview instead of a real release" | ||
required: true | ||
default: 'true' | ||
default: "true" | ||
|
||
jobs: | ||
authorize: | ||
name: Authorize | ||
runs-on: macos-10.14 | ||
runs-on: macos-12 | ||
steps: | ||
- name: ${{ github.actor }} permission check to do a release | ||
uses: octokit/request-action@v2.0.0 | ||
uses: octokit/request-action@v2.1.9 | ||
with: | ||
route: GET /repos/:repository/collaborators/${{ github.actor }} | ||
repository: ${{ github.repository }} | ||
|
@@ -23,124 +23,117 @@ jobs: | |
|
||
release: | ||
name: Release | ||
runs-on: macos-10.14 | ||
runs-on: macos-12 | ||
needs: [authorize] | ||
strategy: | ||
matrix: | ||
ruby-version: ["2.7.x"] | ||
node-version: ["12.x"] | ||
ruby-version: ["2.7"] | ||
node-version: ["16.x"] | ||
steps: | ||
- name: Checkout Amplitude-iOS | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Xcode 12 | ||
run: | | ||
sudo xcode-select -switch /Applications/Xcode_12.app | ||
- name: Setup Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
|
||
- name: Cache Bundle Gems and Cocoapods | ||
id: cache-gems-pods | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
Pods | ||
vendor/bundle | ||
key: ${{ runner.os }}-ruby-${{ matrix.ruby-version }}-gems-${{ hashFiles('**/Gemfile.lock') }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
|
||
- name: Install Cocoapods | ||
if: steps.cache-gems-pods.outputs.cache-hit != 'true' | ||
run: | | ||
gem install bundler | ||
bundle config path vendor/bundle | ||
bundle install | ||
pod install | ||
- name: iOS Tests | ||
run: | | ||
xcodebuild test \ | ||
-workspace Amplitude.xcworkspace \ | ||
-scheme Amplitude_iOSTests \ | ||
-sdk iphonesimulator \ | ||
-destination 'platform=iOS Simulator,name=iPhone 11,OS=14.0' | ||
# - name: macOS Tests @TODO Fix flaky macOS tests and re-enable | ||
# run: | | ||
# xcodebuild \ | ||
# -workspace Amplitude.xcworkspace \ | ||
# -scheme Amplitude_macOS \ | ||
# -sdk macosx \ | ||
# -destination 'platform=macosx' \ | ||
# test | ||
|
||
- name: tvOS Tests | ||
run: | | ||
xcodebuild \ | ||
-workspace Amplitude.xcworkspace \ | ||
-scheme Amplitude_tvOS \ | ||
-sdk appletvsimulator \ | ||
-destination 'platform=tvOS Simulator,name=Apple TV' \ | ||
test | ||
- name: Validate Podfile | ||
run: pod lib lint | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Checkout Amplitude-iOS gh-pages for building docs | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'gh-pages' | ||
path: 'Amplitude-iOS-gh-pages' | ||
|
||
- name: Install appledoc binary | ||
run: | | ||
git clone git://github.com/tomaz/appledoc.git | ||
cd appledoc/ | ||
sudo sh install-appledoc.sh | ||
cd ../ | ||
rm -rf appledoc/ | ||
- name: Semantic Release --dry-run | ||
if: ${{ github.event.inputs.dryRun == 'true'}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
GIT_AUTHOR_NAME: amplitude-sdk-bot | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: amplitude-sdk-bot | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
run: | | ||
npx \ | ||
-p lodash \ | ||
-p semantic-release@17 \ | ||
-p @semantic-release/changelog@5 \ | ||
-p @semantic-release/git@9 \ | ||
-p @google/semantic-release-replace-plugin@1 \ | ||
-p @semantic-release/exec@5 \ | ||
semantic-release --dry-run | ||
- name: Semantic Release | ||
if: ${{ github.event.inputs.dryRun == 'false'}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
GIT_AUTHOR_NAME: amplitude-sdk-bot | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: amplitude-sdk-bot | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
run: | | ||
npx \ | ||
-p lodash \ | ||
-p semantic-release@17 \ | ||
-p @semantic-release/changelog@5 \ | ||
-p @semantic-release/git@9 \ | ||
-p @google/semantic-release-replace-plugin@1 \ | ||
-p @semantic-release/exec@5 \ | ||
semantic-release | ||
- name: Checkout Amplitude-iOS | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Xcode 14 | ||
run: | | ||
sudo xcode-select -switch /Applications/Xcode_14.1.app | ||
- name: Carthage Bootstrap | ||
run: carthage bootstrap --use-xcframeworks | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
|
||
- name: Install Cocoapods | ||
run: | | ||
gem install bundler -v 2.4.22 | ||
bundle config path vendor/bundle | ||
bundle install | ||
pod install | ||
- name: iOS Tests | ||
run: | | ||
xcodebuild test \ | ||
-workspace Amplitude.xcworkspace \ | ||
-scheme Amplitude_iOSTests \ | ||
-sdk iphonesimulator \ | ||
-destination 'platform=iOS Simulator,name=iPhone 14' | ||
# - name: macOS Tests @TODO Fix flaky macOS tests and re-enable | ||
# run: | | ||
# xcodebuild \ | ||
# -workspace Amplitude.xcworkspace \ | ||
# -scheme Amplitude_macOS \ | ||
# -sdk macosx \ | ||
# -destination 'platform=macosx' \ | ||
# test | ||
|
||
- name: tvOS Tests | ||
run: | | ||
xcodebuild \ | ||
-workspace Amplitude.xcworkspace \ | ||
-scheme Amplitude_tvOS \ | ||
-sdk appletvsimulator \ | ||
-destination 'platform=tvOS Simulator,name=Apple TV' \ | ||
test | ||
- name: Validate Podfile | ||
run: pod lib lint | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Checkout Amplitude-iOS gh-pages for building docs | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: "gh-pages" | ||
path: "Amplitude-iOS-gh-pages" | ||
|
||
- name: Install appledoc binary | ||
run: | | ||
git clone https://github.com/amplitude/appledoc | ||
cd appledoc/ | ||
sudo sh install-appledoc.sh | ||
cd ../ | ||
sudo rm -rf appledoc/ | ||
- name: Semantic Release --dry-run | ||
if: ${{ github.event.inputs.dryRun == 'true'}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
GIT_AUTHOR_NAME: amplitude-sdk-bot | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: amplitude-sdk-bot | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
run: | | ||
npx \ | ||
-p lodash \ | ||
-p semantic-release@17 \ | ||
-p @semantic-release/changelog@5 \ | ||
-p @semantic-release/git@9 \ | ||
-p @google/[email protected] \ | ||
-p @semantic-release/exec@5 \ | ||
semantic-release --dry-run | ||
- name: Semantic Release | ||
if: ${{ github.event.inputs.dryRun == 'false'}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
GIT_AUTHOR_NAME: amplitude-sdk-bot | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: amplitude-sdk-bot | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
run: | | ||
npx \ | ||
-p lodash \ | ||
-p semantic-release@17 \ | ||
-p @semantic-release/changelog@5 \ | ||
-p @semantic-release/git@9 \ | ||
-p @google/[email protected] \ | ||
-p @semantic-release/exec@5 \ | ||
semantic-release |
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
Oops, something went wrong.