Skip to content

Commit

Permalink
Merge branch 'release/5.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein committed Apr 4, 2023
2 parents ec912a5 + 4d4e1a8 commit a148c31
Show file tree
Hide file tree
Showing 506 changed files with 20,094 additions and 33,932 deletions.
2,553 changes: 0 additions & 2,553 deletions .doxygen/Doxyfile

This file was deleted.

234 changes: 119 additions & 115 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,92 @@ name: Build
on: [push]

jobs:
test_framework:
name: "Framework (iOS ${{ matrix.version.ios }})"
runs-on: macos-${{ matrix.version.macos }}
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode }}.app/Contents/Developer

podspec:
name: Lint Podspec for ${{ matrix.platform }}
runs-on: macos-11
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}
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 14.0, Xcode 12.0.1)"
os: macos-10.15
xcode-version: "12"
sdk: iphonesimulator14.0
destination: "platform=iOS Simulator,OS=14.0,name=iPhone 11"
- name: "xcodebuild (iOS 15.2, Xcode 13.2.1)"
os: macos-11
xcode-version: "13.2.1"
sdk: iphonesimulator15.2
destination: "platform=iOS Simulator,OS=15.2,name=iPhone 13"
- name: "xcodebuild (macOS 10.15, Xcode 12.0.1)"
os: macos-10.15
xcode-version: "12"
sdk: macosx10.15
destination: "platform=OS X"
- name: "xcodebuild (macOS 12.1, Xcode 13.2.1)"
os: macos-11
xcode-version: "13.2.1"
sdk: macosx12.1
destination: "platform=OS X"
- name: "xcodebuild (watchOS 8.3, Xcode 13.2.1)"
os: macos-11
xcode-version: "13.2.1"
sdk: watchos8.3
destination: "platform=watchOS Simulator,OS=8.3,name=Apple Watch Series 7 - 45mm"
- name: "xcodebuild (tvOS 14.0, Xcode 12.0.1)"
os: macos-10.15
xcode-version: "12"
sdk: appletvsimulator14.0
destination: "platform=tvOS Simulator,OS=14.0,name=Apple TV"
- name: "xcodebuild (tvOS 15.2, Xcode 13.2.1)"
os: macos-11
xcode-version: "13.2.1"
sdk: appletvsimulator15.2
destination: "platform=tvOS Simulator,OS=15.2,name=Apple TV"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Test
env:
IOS: ${{ matrix.version.ios }}
WATCHOS: ${{ matrix.version.watchos }}
IPHONE: ${{ matrix.version.iphone }}
WATCH: ${{ matrix.version.watch }}
# -- 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.3.4/snowplow-micro-1.3.4.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: |
. .scripts/setup.sh
.scripts/test_framework.sh "${BUILD_PROJECT_LIB}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_LIB_IOS}" "${BUILD_DEST_WATCH}" "${BUILD_SCHEME_LIB_WATCH}"
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 }})"
Expand All @@ -46,20 +106,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get example branch name
id: example_branch
run: |
DEMO_BRANCH=$(cat .scripts/demo_apps_branch_name)
echo ::set-output name=name::${DEMO_BRANCH}
- name: Checkout demo app
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: snowplow-incubator/snowplow-objc-tracker-examples
ref: ${{ steps.example_branch.outputs.name }}
path: examples
submodules: true

- name: Build
env:
Expand All @@ -68,12 +117,12 @@ jobs:
IPHONE: ${{ matrix.version.iphone }}
WATCH: ${{ matrix.version.watch }}
run: |
cd examples/demo/
cd Examples/demo/
. .scripts/setup.sh
.scripts/test_ios_demo.sh -app SnowplowDemo -podfile Podfile -ios "${BUILD_WORKSPACE_OBJC_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_OBJC_DEMO}"
.scripts/test_ios_demo.sh -app SnowplowObjCDemo -podfile Podfile -ios "${BUILD_WORKSPACE_OBJC_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_OBJC_DEMO}"
build_swift_carthage_demo_app:
name: "Swift demo (Carthage) (iOS ${{ matrix.version.ios }})"
build_swift_cocoapods_demo_app:
name: "Swift demo (Cocoapods) (iOS ${{ matrix.version.ios }})"
needs: test_framework
runs-on: macos-${{ matrix.version.macos }}
env:
Expand All @@ -83,24 +132,13 @@ jobs:
fail-fast: false
matrix:
version:
- {ios: '14.4', iphone: iPhone 11, watchos: '7.2', watch: Apple Watch Series 5 - 44mm, macos: '11', xcode: 12.4}
- {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@v2

- name: Get example branch name
id: example_branch
run: |
DEMO_BRANCH=$(cat .scripts/demo_apps_branch_name)
echo ::set-output name=name::${DEMO_BRANCH}
- name: Checkout demo app
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: snowplow-incubator/snowplow-objc-tracker-examples
ref: ${{ steps.example_branch.outputs.name }}
path: examples
submodules: true

- name: Build
env:
Expand All @@ -109,19 +147,12 @@ jobs:
IPHONE: ${{ matrix.version.iphone }}
WATCH: ${{ matrix.version.watch }}
run: |
cd examples/demo/
cd Examples/demo/
. .scripts/setup.sh
.scripts/test_ios_demo.sh -app SnowplowSwiftCarthageDemo -carthage -log $GITHUB_WORKSPACE/cart.log -ios "${BUILD_PROJECT_SWIFT_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_SWIFT_DEMO_IOS}"
- name: Load logs if failed
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: carthage-demo-log-${{ matrix.version.ios }}
path: cart.log
.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_cocoapods_demo_app:
name: "Swift demo (Cocoapods ${{ matrix.podfile.type }}) (iOS ${{ matrix.version.ios }})"
build_swift_spm_demo_app:
name: "Swift demo (SPM) (iOS ${{ matrix.version.ios }})"
needs: test_framework
runs-on: macos-${{ matrix.version.macos }}
env:
Expand All @@ -131,42 +162,43 @@ jobs:
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}
podfile:
- {file: Podfile, type: "no directive"}
- {file: Podfile_frameworks, type: "use_frameworks! directive"}
- {file: Podfile_modular_headers, type: "use_modular_headers! directive"}
- {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@v2
uses: actions/checkout@v3
with:
submodules: true

- name: Get example branch name
id: example_branch
- name: Get branch name
id: branch
run: |
DEMO_BRANCH=$(cat .scripts/demo_apps_branch_name)
echo ::set-output name=name::${DEMO_BRANCH}
- name: Checkout demo app
uses: actions/checkout@v2
with:
repository: snowplow-incubator/snowplow-objc-tracker-examples
ref: ${{ steps.example_branch.outputs.name }}
path: examples
# 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/
cd Examples/demo/
. .scripts/setup.sh
.scripts/test_ios_demo.sh -app SnowplowSwiftCocoapodsDemo -podfile ${{matrix.podfile.file}} -ios "${BUILD_WORKSPACE_SWIFT_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_SWIFT_DEMO_IOS}" -watch "${BUILD_DEST_PAIRED}" "${BUILD_SCHEME_SWIFT_DEMO_WATCH}"
.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_swift_spm_demo_app:
name: "Swift demo (SPM) (iOS ${{ matrix.version.ios }})"
build_iglu_central_app:
name: "Iglu Central (SPM) (iOS ${{ matrix.version.ios }})"
needs: test_framework
runs-on: macos-${{ matrix.version.macos }}
env:
Expand All @@ -176,48 +208,20 @@ jobs:
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}
- {ios: 15.5, iphone: iPhone 12 Pro, macos: '12', xcode: 13.4}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get example branch name
id: example_branch
run: |
DEMO_BRANCH=$(cat .scripts/demo_apps_branch_name)
echo ::set-output name=name::${DEMO_BRANCH}
- 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: Checkout demo app
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: snowplow-incubator/snowplow-objc-tracker-examples
ref: ${{ steps.example_branch.outputs.name }}
path: examples
submodules: true

- 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/
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}"
.scripts/test_ios_demo.sh -app IgluCentral -ios "${BUILD_WORKSPACE_IGLU_CENTRAL}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_IGLU_CENTRAL_IOS}"
26 changes: 10 additions & 16 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,25 @@ on:

jobs:
docs:
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get version
id: get_version
run: |
echo $(cat VERSION)
echo ::set-output name=VERSION::$(cat VERSION)
- name: Set up Swift
uses: swift-actions/setup-swift@v1

- name: Update Doxyfile version
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
run: sed -i -e "s|SNOWPLOW_TRACKER_VERSION|${VERSION}|g" ./.doxygen/Doxyfile
- name: Generate documentation
run: |
swift package --allow-writing-to-directory docs generate-documentation --target SnowplowTracker --disable-indexing --output-path docs --transform-for-static-hosting --hosting-base-path snowplow-objc-tracker
- name: Doxygen
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: '.doxygen'
doxyfile-path: './Doxyfile'
- name: Redirect from the index page
run: |
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url='https://snowplow.github.io/snowplow-objc-tracker/documentation/snowplowtracker/'" /></head><body></body></html>' > docs/index.html
- name: Deploy to GitHub Pages
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.doxygen/html
publish_dir: ./docs
10 changes: 3 additions & 7 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Checkout demo app
uses: actions/checkout@v2
with:
repository: snowplow-incubator/snowplow-objc-tracker-examples
path: examples

submodules: true

- name: Run Snyk to check for vulnerabilities in tracker
uses: snyk/actions/cocoapods@master
with:
command: monitor
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
COMMAND: cd examples/demo/SnowplowSwiftCocoapodsDemo
COMMAND: cd Examples/demo/SnowplowSwiftCocoapodsDemo
Loading

0 comments on commit a148c31

Please sign in to comment.