| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- name: "Alamofire CI"
- on:
- push:
- branches:
- - master
- - hotfix
- paths:
- - 'Source/**'
- - 'Tests/**'
- - '.github/workflows/**'
- - 'Package.swift'
- pull_request:
- paths:
- - 'Source/**'
- - 'Tests/**'
- - '.github/workflows/**'
- - 'Package.swift'
- concurrency:
- group: ci
- cancel-in-progress: true
- jobs:
- macOS_5_1:
- name: Build macOS (5.1)
- runs-on: macOS-10.15
- env:
- DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: macOS (5.1)
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire macOS" -destination "platform=macOS" clean build | xcpretty
- macOS_5_2:
- name: Test macOS (5.2)
- runs-on: macOS-10.15
- env:
- DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk && firewalk &
- - name: macOS (5.2)
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire macOS" -destination "platform=macOS" clean test | xcpretty
- macOS_5_3:
- name: Test macOS (5.3)
- runs-on: macOS-10.15
- env:
- DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk && firewalk &
- - name: macOS (5.3)
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire macOS" -destination "platform=macOS" clean test | xcpretty
- macOS_5_4:
- name: Test macOS (5.4)
- runs-on: firebreak
- env:
- DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: arch -arch arm64e brew install alamofire/alamofire/firewalk || arch -arch arm64e brew upgrade alamofire/alamofire/firewalk && arch -arch x86_64 firewalk &
- - name: macOS (5.4)
- run: set -o pipefail && arch -arch arm64e env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire macOS" -destination "platform=macOS" clean test | xcpretty
- Catalyst:
- name: Test Catalyst
- runs-on: macOS-10.15
- env:
- DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk && firewalk &
- - name: Catalyst
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire iOS" -destination "platform=macOS" clean test | xcpretty
- iOS:
- name: Test iOS
- runs-on: firebreak
- env:
- DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer
- timeout-minutes: 10
- strategy:
- matrix:
- destination: ["OS=14.5,name=iPhone 12 Pro"]
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: arch -arch arm64e brew install alamofire/alamofire/firewalk || arch -arch arm64e brew upgrade alamofire/alamofire/firewalk && arch -arch x86_64 firewalk &
- - name: iOS - ${{ matrix.destination }}
- run: set -o pipefail && arch -arch arm64e env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire iOS" -destination "${{ matrix.destination }}" clean test | xcpretty
- iOS_15:
- name: Test iOS 15
- runs-on: firebreak
- env:
- DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer
- timeout-minutes: 10
- strategy:
- matrix:
- destination: ["OS=15.0,name=iPhone 13 Pro"]
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: arch -arch arm64e brew install alamofire/alamofire/firewalk || arch -arch arm64e brew upgrade alamofire/alamofire/firewalk && arch -arch x86_64 firewalk &
- - name: iOS - ${{ matrix.destination }}
- run: set -o pipefail && arch -arch arm64e env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire iOS" -destination "${{ matrix.destination }}" clean test | xcpretty
- tvOS:
- name: Test tvOS
- runs-on: firebreak
- env:
- DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer
- timeout-minutes: 10
- strategy:
- matrix:
- destination: ["OS=14.5,name=Apple TV"]
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: arch -arch arm64e brew install alamofire/alamofire/firewalk || arch -arch arm64e brew upgrade alamofire/alamofire/firewalk && arch -arch x86_64 firewalk &
- - name: tvOS - ${{ matrix.destination }}
- run: set -o pipefail && arch -arch arm64e env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire tvOS" -destination "${{ matrix.destination }}" clean test | xcpretty
- watchOS:
- name: Test watchOS
- runs-on: firebreak
- env:
- DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer
- timeout-minutes: 10
- strategy:
- matrix:
- destination: ["OS=7.4,name=Apple Watch Series 6 - 44mm"]
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: arch -arch arm64e brew install alamofire/alamofire/firewalk || arch -arch arm64e brew upgrade alamofire/alamofire/firewalk && arch -arch x86_64 firewalk &
- - name: watchOS - ${{ matrix.destination }}
- run: set -o pipefail && arch -arch arm64e env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire watchOS" -destination "${{ matrix.destination }}" clean test | xcpretty
- SPM:
- name: Test with SPM
- runs-on: firebreak
- env:
- DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: arch -arch arm64e brew install alamofire/alamofire/firewalk || arch -arch arm64e brew upgrade alamofire/alamofire/firewalk && arch -arch x86_64 firewalk &
- - name: SPM Test
- run: arch -arch arm64e swift test -c debug
- Linux:
- name: Linux
- runs-on: ubuntu-20.04
- container:
- image: swift:5.4.1-focal
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: SPM Linux build
- run: swift build --build-tests -c debug
- Linux_Nightly:
- name: Linux Nightly
- runs-on: ubuntu-20.04
- container:
- image: swiftlang/swift:nightly-focal
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: SPM Linux build
- run: swift build --build-tests -c debug
- Windows:
- name: Windows
- runs-on: windows-2019
- timeout-minutes: 10
- steps:
- - name: "Clone Project"
- uses: actions/checkout@v2
- - uses: seanmiddleditch/gha-setup-vsdevenv@master
- - name: Install Swift
- run: |
- Install-Binary -Url "https://swift.org/builds/swift-5.4.1-release/windows10/swift-5.4.1-RELEASE/swift-5.4.1-RELEASE-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
- - name: Set Environment Variables
- run: |
- echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- - name: Adjust Paths
- run: |
- echo "C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- - name: Install Supporting Files
- run: |
- Copy-Item "$env:SDKROOT\usr\share\ucrt.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\ucrt\module.modulemap"
- Copy-Item "$env:SDKROOT\usr\share\visualc.modulemap" -destination "$env:VCToolsInstallDir\include\module.modulemap"
- Copy-Item "$env:SDKROOT\usr\share\visualc.apinotes" -destination "$env:VCToolsInstallDir\include\visualc.apinotes"
- Copy-Item "$env:SDKROOT\usr\share\winsdk.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\um\module.modulemap"
- - name: SPM Windows build
- shell: cmd
- run: |
- cd ${{ github.workspace}}
- set SDKROOT=%SystemDrive%\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk
- %SystemDrive%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swift-build.exe --build-tests -c debug -Xlinker /INCREMENTAL:NO -v
- if not exist .build\x86_64-unknown-windows-msvc\debug\Alamofire.swiftmodule exit 1
|