-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update macOS runner image for CI workflow in main branch (#257)
* Update macOS runner image for CI workflow in main branch * Update script to find Swiftlint in path * Add correct Swiftlint in PATH * Update script to install swiftlint if not present * cleanup script for swiftlint * cleanup script for swiftlint, fix span limit test * Update script to build swift packages for iOS target versions available on runner image * Use macOS-14 runner image for full build
- Loading branch information
Showing
3 changed files
with
83 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
|
||
jobs: | ||
full-build: | ||
runs-on: macos-12 | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -17,7 +17,7 @@ jobs: | |
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
xcframework: | ||
runs-on: macos-12 | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -31,62 +31,63 @@ jobs: | |
with: | ||
name: SplunkOtel.xcframework | ||
path: ./SplunkRumWorkspace/SplunkRum/xcframeworks/SplunkOtel.xcframework | ||
saucelabs-prepare: | ||
runs-on: macOS-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
- name: Build for Sauce Labs | ||
run: | | ||
BUILD_FOLDER="work/splunk-otel-ios/splunk-otel-ios/SauceLabsTests" | ||
BUILD_PATH="Build/Products/Debug-iphonesimulator" | ||
xcodebuild -showsdks | ||
# Commented until Saucelabs licensing is fixed | ||
# saucelabs-prepare: | ||
# runs-on: macOS-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# - name: Setup Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.8' | ||
# - name: Build for Sauce Labs | ||
# run: | | ||
# BUILD_FOLDER="work/splunk-otel-ios/splunk-otel-ios/SauceLabsTests" | ||
# BUILD_PATH="Build/Products/Debug-iphonesimulator" | ||
# xcodebuild -showsdks | ||
|
||
xcodebuild -workspace SplunkRumWorkspace/SplunkRumWorkspace.xcworkspace \ | ||
-scheme SauceLabsTestApp \ | ||
-configuration Debug \ | ||
-sdk iphonesimulator \ | ||
-derivedDataPath SauceLabsTests | ||
zip ${GITHUB_WORKSPACE}/SauceLabsTestApp.zip $(find ~/$BUILD_FOLDER/$BUILD_PATH/SauceLabsTestApp.app -type f) | ||
- name: Upload test app to Sauce Labs | ||
id: sl-upload | ||
run: | | ||
cd /Users/runner/work/splunk-otel-ios/splunk-otel-ios/ | ||
item_id=$(curl -u "${{secrets.SAUCELABS_USER}}:${{secrets.SAUCELABS_KEY}}" --location \ | ||
--request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \ | ||
--form 'payload=@"SauceLabsTestApp.zip"' \ | ||
--form 'name="SauceLabsTestApp.zip"' \ | ||
--form 'description="'"$GITHUB_SHA"'"' | jq -r .item.id) | ||
echo "sl_file_id=$item_id" >> $GITHUB_OUTPUT | ||
outputs: | ||
sl_file_id: ${{ steps.sl-upload.outputs.sl_file_id }} | ||
saucelabs-tests: | ||
runs-on: macOS-latest | ||
needs: saucelabs-prepare | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['14', '15', '16'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
- name: Run Sauce Labs test cases | ||
working-directory: SplunkRumWorkspace | ||
env: | ||
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }} | ||
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }} | ||
run: | | ||
cd SauceLabsTestApp/ | ||
python3 -m pip install Appium-Python-Client==2.11.1 | ||
python3 sl_tests.py ${{ matrix.os }} ${{ needs.saucelabs-prepare.outputs.sl_file_id }} | ||
# xcodebuild -workspace SplunkRumWorkspace/SplunkRumWorkspace.xcworkspace \ | ||
# -scheme SauceLabsTestApp \ | ||
# -configuration Debug \ | ||
# -sdk iphonesimulator \ | ||
# -derivedDataPath SauceLabsTests | ||
# zip ${GITHUB_WORKSPACE}/SauceLabsTestApp.zip $(find ~/$BUILD_FOLDER/$BUILD_PATH/SauceLabsTestApp.app -type f) | ||
# - name: Upload test app to Sauce Labs | ||
# id: sl-upload | ||
# run: | | ||
# cd /Users/runner/work/splunk-otel-ios/splunk-otel-ios/ | ||
# item_id=$(curl -u "${{secrets.SAUCELABS_USER}}:${{secrets.SAUCELABS_KEY}}" --location \ | ||
# --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \ | ||
# --form 'payload=@"SauceLabsTestApp.zip"' \ | ||
# --form 'name="SauceLabsTestApp.zip"' \ | ||
# --form 'description="'"$GITHUB_SHA"'"' | jq -r .item.id) | ||
# echo "sl_file_id=$item_id" >> $GITHUB_OUTPUT | ||
# outputs: | ||
# sl_file_id: ${{ steps.sl-upload.outputs.sl_file_id }} | ||
# saucelabs-tests: | ||
# runs-on: macOS-latest | ||
# needs: saucelabs-prepare | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# os: ['14', '15', '16'] | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# - name: Setup Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.8' | ||
# - name: Run Sauce Labs test cases | ||
# working-directory: SplunkRumWorkspace | ||
# env: | ||
# SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }} | ||
# SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }} | ||
# run: | | ||
# cd SauceLabsTestApp/ | ||
# python3 -m pip install Appium-Python-Client==2.11.1 | ||
# python3 sl_tests.py ${{ matrix.os }} ${{ needs.saucelabs-prepare.outputs.sl_file_id }} | ||
check_links: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
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