| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- name: "Alamofire CI"
- on:
- push:
- branches:
- - master
- - hotfix
- paths:
- - ".github/workflows/**"
- - "Package.swift"
- - "Source/**"
- - "Tests/**"
- pull_request:
- paths:
- - ".github/workflows/**"
- - "Package.swift"
- - "Source/**"
- - "Tests/**"
- concurrency:
- group: ${{ github.ref_name }}
- cancel-in-progress: true
- jobs:
- macOS:
- name: Test macOS, All Xcodes and Swifts
- runs-on: ${{ matrix.runsOn }}
- env:
- DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - xcode: "Xcode_14.1.app"
- runsOn: macOS-12
- name: "macOS 12, Xcode 14.1, Swift 5.7.1"
- testPlan: "macOS"
- - xcode: "Xcode_14.0.1.app"
- runsOn: macOS-12
- name: "macOS 12, Xcode 14.0.1, Swift 5.7.0"
- testPlan: "macOS"
- - xcode: "Xcode_13.4.1.app"
- runsOn: macOS-12
- name: "macOS 12, Xcode 13.4.1, Swift 5.6.1"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_13.3.1.app"
- runsOn: macOS-12
- name: "macOS 12, Xcode 13.3.1, Swift 5.6.0"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_13.2.1.app"
- runsOn: macOS-11
- name: "macOS 11, Xcode 13.2.1, Swift 5.5.2"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_13.1.app"
- runsOn: macOS-11
- name: "macOS 11, Xcode 13.1, Swift 5.5.1"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_13.0.app"
- runsOn: macOS-11
- name: "macOS 11, Xcode 13.0, Swift 5.5.0"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_12.5.1.app"
- runsOn: macOS-11
- name: "macOS 11, Xcode 12.5.1, Swift 5.4.2"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_12.4.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, Xcode 12.4, Swift 5.3.2"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_12.3.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, Xcode 12.3, Swift 5.3.2"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_12.2.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, Xcode 12.2, Swift 5.3.1"
- testPlan: "macOS-NoTS"
- - xcode: "Xcode_12.1.1.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, Xcode 12.1.1, Swift 5.3.0"
- testPlan: "macOS-NoTS"
- steps:
- - uses: actions/checkout@v3
- - name: Install Firewalk
- run: "brew install alamofire/alamofire/firewalk && firewalk &"
- - name: ${{ matrix.name }}
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire macOS" -destination "platform=macOS" -testPlan "${{ matrix.testPlan }}" clean test | xcpretty
- Catalyst:
- name: Test Catalyst
- runs-on: macOS-12
- env:
- DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v3
- - 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
- Latest:
- name: Test Latest (iOS, tvOS, watchOS)
- runs-on: macOS-12
- env:
- DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - destination: "OS=16.1,name=iPhone 14 Pro"
- name: "iOS"
- scheme: "Alamofire iOS"
- - destination: "OS=16.1,name=Apple TV"
- name: "tvOS"
- scheme: "Alamofire tvOS"
- - destination: "OS=9.1,name=Apple Watch Series 8 (45mm)"
- name: "watchOS"
- scheme: "Alamofire watchOS"
- steps:
- - uses: actions/checkout@v3
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk && firewalk &
- - name: ${{ matrix.name }}
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean test | xcpretty
- iOS:
- name: "Test Old iOS"
- runs-on: firebreak
- env:
- DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - destination: "OS=15.5,name=iPhone 13 Pro"
- name: "iOS 15.5"
- testPlan: "iOS-NoTS"
- - destination: "OS=14.5,name=iPhone 12 Pro"
- name: "iOS 14.5"
- testPlan: "iOS-NoTS"
- - destination: "OS=13.7,name=iPhone 11 Pro"
- name: "iOS 13.7"
- testPlan: "iOS-NoTS"
- - destination: "OS=12.4,name=iPhone Xs"
- name: "iOS 12.4"
- testPlan: "iOS-Old"
- steps:
- - uses: actions/checkout@v3
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk &
- - name: ${{ matrix.name }}
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire iOS" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test | xcpretty
- tvOS:
- name: Test Old tvOS
- runs-on: firebreak
- env:
- DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - destination: "OS=15.4,name=Apple TV"
- name: "tvOS 15.4"
- testPlan: "tvOS-NoTS"
- - destination: "OS=14.5,name=Apple TV"
- name: "tvOS 14.5"
- testPlan: "tvOS-NoTS"
- - destination: "OS=13.4,name=Apple TV"
- name: "tvOS 13.4"
- testPlan: "tvOS-NoTS"
- - destination: "OS=12.4,name=Apple TV"
- name: "tvOS 12.4"
- testPlan: "tvOS-Old"
- steps:
- - uses: actions/checkout@v3
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk &
- - name: ${{ matrix.name }}
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire tvOS" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test | xcpretty
- watchOS:
- name: Test Old watchOS
- runs-on: firebreak
- env:
- DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - destination: "OS=8.5,name=Apple Watch Series 7 (45mm)"
- name: "watchOS 8.5"
- testPlan: "watchOS-NoTS"
- - destination: "OS=7.4,name=Apple Watch Series 6 (44mm)"
- name: "watchOS 7.4"
- testPlan: "watchOS-NoTS"
- steps:
- - uses: actions/checkout@v3
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk && firewalk &
- - name: ${{ matrix.name}}
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire watchOS" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test | xcpretty
- SPM:
- name: Test with SPM
- runs-on: ${{ matrix.runsOn }}
- env:
- DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - xcode: "Xcode_14.1.app"
- runsOn: macOS-12
- name: "macOS 12, SPM 5.7.1 Test"
- run: "swift test -c debug"
- - xcode: "Xcode_14.0.1.app"
- runsOn: macOS-12
- name: "macOS 12, SPM 5.7.0 Test"
- run: "swift test -c debug"
- - xcode: "Xcode_13.4.1.app"
- runsOn: macOS-12
- name: "macOS 12, SPM 5.6.1 Test"
- run: "swift test -c debug"
- - xcode: "Xcode_13.3.1.app"
- runsOn: macOS-12
- name: "macOS 12, SPM 5.6.0 Test"
- run: "swift test -c debug"
- - xcode: "Xcode_13.2.1.app"
- runsOn: macOS-11
- name: "macOS 11, SPM 5.5.2 Test"
- run: "swift test -c debug"
- - xcode: "Xcode_13.1.app"
- runsOn: macOS-11
- name: "macOS 11, SPM 5.5.1 Test"
- run: "swift test -c debug"
- - xcode: "Xcode_13.0.app"
- runsOn: macOS-11
- name: "macOS 11, SPM 5.5.0 Test"
- run: "swift test -c debug"
- - xcode: "Xcode_12.5.1.app"
- runsOn: macOS-11
- name: "macOS 11, SPM 5.4.2 Build"
- run: "swift build -c debug"
- - xcode: "Xcode_12.4.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, SPM 5.3.2 Build"
- run: "swift build -c debug"
- - xcode: "Xcode_12.3.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, SPM 5.3.2 Build"
- run: "swift build -c debug"
- - xcode: "Xcode_12.2.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, SPM 5.3.1 Build"
- run: "swift build -c debug"
- - xcode: "Xcode_12.1.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, SPM 5.3.0 Build"
- run: "swift build -c debug"
- steps:
- - uses: actions/checkout@v3
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk && firewalk &
- - name: Test SPM
- run: ${{ matrix.run }}
- Linux:
- name: Linux
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- include:
- - image: swift:5.7-bionic
- - image: swift:5.7-focal
- - image: swift:5.7-centos7
- - image: swift:5.7-amazonlinux2
- - image: swiftlang/swift:nightly-bionic
- - image: swiftlang/swift:nightly-focal
- - image: swiftlang/swift:nightly-jammy
- # - image: swiftlang/swift:nightly-centos7
- - image: swiftlang/swift:nightly-centos8
- - image: swiftlang/swift:nightly-amazonlinux2
- container:
- image: ${{ matrix.image }}
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v3
- - name: ${{ matrix.image }}
- run: swift build --build-tests -c debug
- Windows:
- name: Windows
- runs-on: windows-2019
- timeout-minutes: 10
- steps:
- - name: "Clone Project"
- uses: actions/checkout@v3
- - uses: seanmiddleditch/gha-setup-vsdevenv@master
- - name: Install Swift
- run: |
- Install-Binary -Url "https://download.swift.org/swift-5.6-release/windows10/swift-5.6-RELEASE/swift-5.6-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
|