implementing snyk scanning using #1
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: | |
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 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- {ios: 14.4, iphone: iPhone 11, watchos: 7.2, watch: Apple Watch Series 5 - 44mm, macos: '10.15', xcode: 12.4} | |
- {ios: 12.4, iphone: iPhone 5s, watchos: 5.3, watch: Apple Watch Series 2 - 38mm, macos: 10.15, xcode: 10.3} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Test | |
env: | |
IOS: ${{ matrix.version.ios }} | |
WATCHOS: ${{ matrix.version.watchos }} | |
IPHONE: ${{ matrix.version.iphone }} | |
WATCH: ${{ matrix.version.watch }} | |
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}" | |
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: '14.4', iphone: iPhone 11, watchos: '7.2', watch: Apple Watch Series 5 - 44mm, macos: '10.15', xcode: 12.4} | |
- {ios: 12.4, iphone: iPhone 5s, watchos: 5.3, watch: Apple Watch Series 2 - 38mm, macos: 10.15, xcode: 10.3} | |
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 | |
with: | |
repository: snowplow-incubator/snowplow-objc-tracker-examples | |
ref: ${{ steps.example_branch.outputs.name }} | |
path: examples | |
- 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 SnowplowDemo -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 }})" | |
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, watchos: '7.2', watch: Apple Watch Series 5 - 44mm, macos: '10.15', xcode: 12.4} | |
#- {ios: 12.4, iphone: iPhone 5s, watchos: 5.3, watch: Apple Watch Series 2 - 38mm, macos: 10.15, xcode: 10.3} | |
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 | |
with: | |
repository: snowplow-incubator/snowplow-objc-tracker-examples | |
ref: ${{ steps.example_branch.outputs.name }} | |
path: examples | |
- 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 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 | |
build_swift_cocoapods_demo_app: | |
name: "Swift demo (Cocoapods ${{ matrix.podfile.type }}) (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: '10.15', xcode: 12.4} | |
#- {ios: 12.4, iphone: iPhone Xs Max, watchos: 5.3, watch: Apple Watch Series 2 - 38mm, macos: 10.15, xcode: 10.3} | |
podfile: | |
- {file: Podfile, type: "no directive"} | |
- {file: Podfile_frameworks, type: "use_frameworks! directive"} | |
- {file: Podfile_modular_headers, type: "use_modular_headers! directive"} | |
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 | |
with: | |
repository: snowplow-incubator/snowplow-objc-tracker-examples | |
ref: ${{ steps.example_branch.outputs.name }} | |
path: examples | |
- 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 ${{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}" | |
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: '10.15', 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: 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 | |
with: | |
repository: snowplow-incubator/snowplow-objc-tracker-examples | |
ref: ${{ steps.example_branch.outputs.name }} | |
path: examples | |
- 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}" |