| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- 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: ${{ github.ref_name }}
- cancel-in-progress: true
- jobs:
- macOS:
- name: Test macOS (5.6, 5.5, 5.4, 5.3)
- runs-on: ${{ matrix.runsOn }}
- defaults:
- run:
- shell: ${{ matrix.shell }}
- env:
- DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - xcode: "Xcode_13.3.app"
- runsOn: firebreak
- name: "macOS 12, Swift 5.6"
- firewalk: "brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk &"
- shell: "/usr/bin/arch -arch arm64e /bin/zsh {0}"
- - xcode: "Xcode_13.2.1.app"
- runsOn: macOS-11
- name: "macOS 11, Swift 5.5"
- firewalk: "brew install alamofire/alamofire/firewalk && firewalk &"
- shell: "/bin/zsh {0}"
- - xcode: "Xcode_12.5.1.app"
- runsOn: macOS-11
- name: "macOS 11, Swift 5.4"
- firewalk: "brew install alamofire/alamofire/firewalk && firewalk &"
- shell: "/bin/zsh {0}"
- - xcode: "Xcode_12.4.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, Swift 5.3"
- firewalk: "brew install alamofire/alamofire/firewalk && firewalk &"
- shell: "/bin/zsh {0}"
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: ${{ matrix.firewalk }}
- - name: ${{ matrix.name }}
- run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "Alamofire.xcodeproj" -scheme "Alamofire macOS" -destination "platform=macOS" clean test | xcpretty
- Catalyst:
- name: Test Catalyst
- runs-on: macOS-11
- env:
- DEVELOPER_DIR: /Applications/Xcode_13.2.1.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
- Latest:
- name: Test Latest (iOS, tvOS, watchOS)
- runs-on: firebreak
- defaults:
- run:
- shell: "/usr/bin/arch -arch arm64e /bin/zsh {0}"
- env:
- DEVELOPER_DIR: "/Applications/Xcode_13.3.app/Contents/Developer"
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - destination: "OS=15.4,name=iPhone 13 Pro"
- name: "iOS"
- scheme: "Alamofire iOS"
- - destination: "OS=15.4,name=Apple TV"
- name: "tvOS"
- scheme: "Alamofire tvOS"
- - destination: "OS=8.5,name=Apple Watch Series 7 - 45mm"
- name: "watchOS"
- scheme: "Alamofire watchOS"
- steps:
- - uses: actions/checkout@v2
- - 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 "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean test | xcpretty
- iOS:
- name: "Test iOS"
- runs-on: firebreak
- defaults:
- run:
- shell: "/usr/bin/arch -arch arm64e /bin/zsh {0}"
- env:
- DEVELOPER_DIR: "/Applications/Xcode_13.3.app/Contents/Developer"
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - destination: "OS=14.5,name=iPhone 12 Pro"
- name: "iOS 14.5"
- testPlan: "iOS"
- - destination: "OS=13.7,name=iPhone 11 Pro"
- name: "iOS 13.7"
- testPlan: "iOS"
- - destination: "OS=12.4,name=iPhone Xs"
- name: "iOS 12.4"
- testPlan: "iOS-Old"
- steps:
- - uses: actions/checkout@v2
- - 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 tvOS
- runs-on: firebreak
- defaults:
- run:
- shell: "/usr/bin/arch -arch arm64e /bin/zsh {0}"
- env:
- DEVELOPER_DIR: /Applications/Xcode_13.3.app/Contents/Developer
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - destination: "OS=14.5,name=Apple TV"
- name: "tvOS 14.5"
- testPlan: "tvOS"
- - destination: "OS=13.4,name=Apple TV"
- name: "tvOS 13.4"
- testPlan: "tvOS"
- - destination: "OS=12.4,name=Apple TV"
- name: "tvOS 12.4"
- testPlan: "tvOS-Old"
- steps:
- - uses: actions/checkout@v2
- - 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 watchOS
- runs-on: macOS-11
- env:
- DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - destination: "OS=7.4,name=Apple Watch Series 6 - 44mm"
- name: "watchOS 7.4"
- steps:
- - uses: actions/checkout@v2
- - 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 }}" clean test | xcpretty
- Thread_Sanitizer:
- name: Test Thread Sanitizer
- runs-on: macOS-11
- env:
- DEVELOPER_DIR: "/Applications/Xcode_13.2.1.app/Contents/Developer"
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- include:
- - scheme: "Alamofire macOS"
- destination: "platform=macOS"
- testPlan: "macOS-TS"
- name: "macOS Thread Sanitizer"
- - scheme: "Alamofire iOS"
- destination: "OS=15.2,name=iPhone 13 Pro"
- testPlan: "iOS-TS"
- name: "iOS Thread Sanitizer"
- - scheme: "Alamofire tvOS"
- destination: "OS=15.2,name=Apple TV"
- testPlan: "tvOS-TS"
- name: "tvOS Thread Sanitizer"
- - scheme: "Alamofire watchOS"
- destination: "OS=8.3,name=Apple Watch Series 7 - 45mm"
- testPlan: "watchOS-TS"
- name: "watchOS Thread Sanitizer"
- steps:
- - uses: actions/checkout@v2
- - 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 }}" -testPlan "${{ matrix.testPlan }}" clean test | xcpretty
- SPM:
- name: Test with SPM
- runs-on: firebreak
- defaults:
- run:
- shell: "/usr/bin/arch -arch arm64e /bin/zsh {0}"
- env:
- DEVELOPER_DIR: "/Applications/Xcode_13.3.app/Contents/Developer"
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk || brew upgrade alamofire/alamofire/firewalk && firewalk &
- - name: Test SPM
- run: swift test -c debug
- SPM_Older:
- 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_13.2.1.app"
- runsOn: macOS-11
- name: "macOS 11, SPM 5.5 Build"
- - xcode: "Xcode_12.5.1.app"
- runsOn: macOS-11
- name: "macOS 11, SPM 5.4 Build"
- - xcode: "Xcode_12.4.app"
- runsOn: macOS-10.15
- name: "macOS 10.15, SPM 5.3 Build"
- steps:
- - uses: actions/checkout@v2
- - name: Install Firewalk
- run: brew install alamofire/alamofire/firewalk && firewalk &
- - name: Test SPM
- run: swift build -c debug
- Linux:
- name: Linux
- runs-on: ubuntu-20.04
- container:
- image: swift:5.6.0-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://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
|