Add API to decorate link with user/session info (close #819) #897
Workflow file for this run
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: Build | |
on: [push] | |
jobs: | |
podspec: | |
name: Lint Podspec for ${{ matrix.platform }} | |
runs-on: macos-11 | |
strategy: | |
matrix: | |
platform: [ios, osx, tvos, watchos] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Lint Podspec | |
run: pod lib lint --platforms=${{ matrix.platform }} | |
test_framework: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- name: "xcodebuild (iOS 15.2, Xcode 13.2.1)" | |
os: macos-12 | |
xcode-version: "13.2.1" | |
sdk: iphonesimulator15.2 | |
destination: "platform=iOS Simulator,OS=15.2,name=iPhone 13" | |
- name: "xcodebuild (macOS 12.1, Xcode 13.2.1)" | |
os: macos-12 | |
xcode-version: "13.2.1" | |
sdk: macosx12.1 | |
destination: "platform=OS X" | |
- name: "xcodebuild (watchOS 8.3, Xcode 13.2.1)" | |
os: macos-12 | |
xcode-version: "13.2.1" | |
sdk: watchos8.3 | |
destination: "platform=watchOS Simulator,OS=8.3,name=Apple Watch Series 7 - 45mm" | |
- name: "xcodebuild (tvOS 15.2, Xcode 13.2.1)" | |
os: macos-12 | |
xcode-version: "13.2.1" | |
sdk: appletvsimulator15.2 | |
destination: "platform=tvOS Simulator,OS=15.2,name=Apple TV" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# -- Micro -- | |
- name: Cache Micro | |
id: cache-micro | |
uses: actions/cache@v3 | |
with: | |
path: micro.jar | |
key: ${{ runner.os }}-micro | |
- name: Get micro | |
if: steps.cache-micro.outputs.cache-hit != 'true' | |
run: curl -o micro.jar -L https://github.com/snowplow-incubator/snowplow-micro/releases/download/micro-1.7.0/snowplow-micro-1.7.0.jar | |
- name: Run Micro in background | |
run: java -jar micro.jar & | |
- name: Wait on Micro endpoint | |
timeout-minutes: 2 | |
run: while ! nc -z '0.0.0.0' 9090; do sleep 1; done | |
# -- Micro -- | |
- name: Select Xcode Version | |
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode-version }}.app/Contents/Developer | |
- name: Build & Test | |
run: | | |
set -o pipefail && xcodebuild \ | |
-scheme SnowplowTracker \ | |
-sdk "${{ matrix.sdk }}" \ | |
-destination "${{ matrix.destination }}" \ | |
clean test | xcpretty | |
build_objc_demo_app: | |
name: "ObjC demo (iOS ${{ matrix.version.ios }})" | |
needs: test_framework | |
runs-on: macos-${{ matrix.version.macos }} | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode }}.app/Contents/Developer | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- {ios: 15.5, iphone: iPhone 12 Pro, watchos: 8.5, watch: Apple Watch Series 5 - 44mm, macos: '12', xcode: 13.4} | |
- {ios: 14.4, iphone: iPhone 8, watchos: 7.2, watch: Apple Watch Series 4 - 40mm, macos: '11', xcode: 12.4} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build | |
env: | |
IOS: ${{ matrix.version.ios }} | |
WATCHOS: ${{ matrix.version.watchos }} | |
IPHONE: ${{ matrix.version.iphone }} | |
WATCH: ${{ matrix.version.watch }} | |
run: | | |
cd Examples/demo/ | |
. .scripts/setup.sh | |
.scripts/test_ios_demo.sh -app SnowplowObjCDemo -podfile Podfile -ios "${BUILD_WORKSPACE_OBJC_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_OBJC_DEMO}" | |
build_swift_cocoapods_demo_app: | |
name: "Swift demo (Cocoapods) (iOS ${{ matrix.version.ios }})" | |
needs: test_framework | |
runs-on: macos-${{ matrix.version.macos }} | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode }}.app/Contents/Developer | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- {ios: '14.4', iphone: iPhone 12 Pro, watchos: '7.2', watch: Apple Watch Series 5 - 44mm, macos: '11', xcode: 12.4} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build | |
env: | |
IOS: ${{ matrix.version.ios }} | |
WATCHOS: ${{ matrix.version.watchos }} | |
IPHONE: ${{ matrix.version.iphone }} | |
WATCH: ${{ matrix.version.watch }} | |
run: | | |
cd Examples/demo/ | |
. .scripts/setup.sh | |
.scripts/test_ios_demo.sh -app SnowplowSwiftCocoapodsDemo -podfile Podfile -ios "${BUILD_WORKSPACE_SWIFT_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_SWIFT_DEMO_IOS}" -watch "${BUILD_DEST_PAIRED}" "${BUILD_SCHEME_SWIFT_DEMO_WATCH}" | |
build_swift_spm_demo_app: | |
name: "Swift demo (SPM) (iOS ${{ matrix.version.ios }})" | |
needs: test_framework | |
runs-on: macos-${{ matrix.version.macos }} | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode }}.app/Contents/Developer | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- {ios: '14.4', iphone: iPhone 11 Pro, watchos: '7.2', watch: Apple Watch Series 5 - 44mm, macos: '11', xcode: 12.4} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Get branch name | |
id: branch | |
run: | | |
# Set git branch or git tag as slug | |
if [[ ${GITHUB_REF} =~ ^refs\/tags\/ ]]; then | |
GIT_BRANCH=master | |
else | |
if [ -n "${GITHUB_HEAD_REF}" ]; then | |
GIT_BRANCH="${GITHUB_HEAD_REF}" | |
else | |
GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" | |
fi | |
fi | |
echo ::set-output name=name::${GIT_BRANCH} | |
- name: Build | |
env: | |
IOS: ${{ matrix.version.ios }} | |
WATCHOS: ${{ matrix.version.watchos }} | |
IPHONE: ${{ matrix.version.iphone }} | |
WATCH: ${{ matrix.version.watch }} | |
BRANCH: ${{ steps.branch.outputs.name }} | |
run: | | |
cd Examples/demo/ | |
. .scripts/setup.sh | |
.scripts/test_ios_demo.sh -app SnowplowSwiftSPMDemo -spm ${BRANCH} -ios "${BUILD_WORKSPACE_SWIFT_SPM_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_SWIFT_SPM_DEMO_IOS}" | |
build_iglu_central_app: | |
name: "Iglu Central (SPM) (iOS ${{ matrix.version.ios }})" | |
needs: test_framework | |
runs-on: macos-${{ matrix.version.macos }} | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode }}.app/Contents/Developer | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- {ios: 15.5, iphone: iPhone 12 Pro, macos: '12', xcode: 13.4} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build | |
env: | |
IOS: ${{ matrix.version.ios }} | |
IPHONE: ${{ matrix.version.iphone }} | |
BRANCH: ${{ steps.branch.outputs.name }} | |
run: | | |
cd Examples/demo/ | |
. .scripts/setup.sh | |
.scripts/test_ios_demo.sh -app IgluCentral -ios "${BUILD_WORKSPACE_IGLU_CENTRAL}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_IGLU_CENTRAL_IOS}" |