Skip to content

Updated to Swift 6 in Native ads samples #879

Updated to Swift 6 in Native ads samples

Updated to Swift 6 in Native ads samples #879

Workflow file for this run

name: Build Status
# Step 1: Build on pull-requests or pushes to main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# Step 2: Build the samples
build:
name: Build
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
xcode: [15.3, 16.0]
regex:
- "Objective-C/advanced"
- "Swift/advanced"
- "Objective-C/admob"
- "Swift/admob"
- "Objective-C/admanager"
- "Swift/admanager"
continue-on-error: true
steps:
- name: Clone Repo
uses: actions/checkout@v1
- name: Select the Google Mobile Ads SDK minimum Xcode version (15.3)
# Available Xcode versions:
# https://github.com/actions/runner-images/blob/main/images/macos/toolsets/toolset-14.json
run: |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
echo "Selected Xcode version:"
/usr/bin/xcodebuild -version
- name: Pod repo update
run: pod repo update
- name: Install xcpretty
run: sudo gem install xcpretty
- name: Set commit range (push to the main branch, e.g. merge)
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: echo "COMMIT_RANGE="${{ github.event.before }}.."" >> $GITHUB_ENV
- name: Set commit range (pull request)
if: github.event_name == 'pull_request'
run: echo "COMMIT_RANGE="HEAD~.."" >> $GITHUB_ENV
- name: Build
id: folder-${{ matrix.regex }}-version${{ matrix.xcode }}

Check failure on line 57 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build Status

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 57, Col: 13): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.regex .github/workflows/build.yml (Line: 71, Col: 16): Unexpected symbol: 'folder-${regex}-version${{'. Located at position 7 within expression: steps.folder-${regex}-version${{ matrix.xcode[0]
run: .github/workflows/build/build.sh
shell: bash
env:
COMMIT_RANGE: ${{ env.COMMIT_RANGE }}
REGEX: ${{ matrix.regex }}
# Step 3: Check overall status
check_status:
name: Check Status
needs: build
runs-on: ubuntu-latest
steps:
- name: Determine overall status
run: |
for regex in ${{ matrix.regex }}; do
if [[ ${{ steps.folder-${regex}-version${{ matrix.xcode[0] }}.outcome }} == 'failure' && ${{ steps.folder-${regex}-version${{ matrix.xcode[1] }}.outcome }} == 'failure' ]]; then
echo "Both Xcode ${{ matrix.xcode[0] }} and ${{ matrix.xcode[1] }} builds failed for regex: ${regex}"
exit 1 # Fail the workflow.
fi
done
echo "Overall build succeeded."