Add AtomDerivedScope and deprecate AtomScope(inheriting:content:) #501
Workflow file for this run
This file contains hidden or 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
# https://github.com/actions/virtual-environments | |
name: test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_16.1.app | |
IOS_SIMULATOR: '"platform=iOS Simulator,name=iPhone 16 Pro"' | |
IOS_SIMULATOR_XCODE_15: '"platform=iOS Simulator,name=iPhone 15 Pro"' | |
MACOS: '"platform=macOS"' | |
TVOS_SIMULATOR: '"platform=tvOS Simulator,name=Apple TV 4K (3rd generation)"' | |
WATCHOS_SIMULATOR: '"platform=watchOS Simulator,name=Apple Watch Ultra 2 (49mm)"' | |
jobs: | |
test: | |
name: Test | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Test library iOS | |
run: scripts/test.sh library -destinations ${{ env.IOS_SIMULATOR }} | |
- name: Test library macOS | |
run: scripts/test.sh library -destinations ${{ env.MACOS }} | |
- name: Test library tvOS | |
run: scripts/test.sh library -destinations ${{ env.TVOS_SIMULATOR }} | |
- name: Test library watchOS | |
run: scripts/test.sh library -destinations ${{ env.WATCHOS_SIMULATOR }} | |
test_with_xcode_15: | |
name: Test with Xcode 15 | |
runs-on: macos-14 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.app | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Test library iOS | |
run: scripts/test.sh library -destinations ${{ env.IOS_SIMULATOR_XCODE_15 }} | |
- name: Test library macOS | |
run: scripts/test.sh library -destinations ${{ env.MACOS }} | |
- name: Test library tvOS | |
run: scripts/test.sh library -destinations ${{ env.TVOS_SIMULATOR }} | |
- name: Test library watchOS | |
run: scripts/test.sh library -destinations ${{ env.WATCHOS_SIMULATOR }} | |
test_examples: | |
name: Test examples | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Test example iOS | |
run: scripts/test.sh example-ios -destinations ${{ env.IOS_SIMULATOR }} | |
- name: Test example cross platform | |
run: | | |
scripts/test.sh example-cross-platform -destinations \ | |
${{ env.MACOS }} \ | |
${{ env.TVOS_SIMULATOR }} | |
test_upcoming_features: | |
name: Test upcoming features with Xcode 15 | |
runs-on: macos-14 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.app | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Test upcoming features | |
run: ENABLE_UPCOMING_FEATURES=1 scripts/test.sh library -destinations ${{ env.IOS_SIMULATOR_XCODE_15 }} | |
test_language_mode: | |
name: Test Swift 5 language mode | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
enable_upcoming_features: | |
- 0 | |
- 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Test Swift 5 language mode | |
run: ENABLE_UPCOMING_FEATURES=${{ matrix.enable_upcoming_features }} scripts/test.sh library SWIFT_VERSION=5 -destinations ${{ env.IOS_SIMULATOR }} | |
benchmark: | |
name: Benchmark | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run benchmark test | |
run: scripts/test.sh benchmark -destinations ${{ env.IOS_SIMULATOR }} | |
validation: | |
name: Validation | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show environments | |
run: | | |
swift --version | |
xcodebuild -version | |
- uses: actions/cache@v4 | |
with: | |
path: Tools/bin | |
key: spm-${{ runner.os }}-${{env.DEVELOPER_DIR}}-${{ hashFiles('Tools/Package.swift') }} | |
- name: Validate lint | |
run: make lint | |
- name: Validate format | |
run: | | |
make format | |
if [ -n "$(git status --porcelain)" ]; then git diff && echo "Make sure that the code is formated by 'make format'."; exit 1; fi | |
- name: Validate example project | |
run: | | |
make proj | |
if [ -n "$(git status --porcelain)" ]; then git diff && echo "Make sure that Xcode projects are formated by 'make proj'."; exit 1; fi |