fix ci #309
Workflow file for this run
This file contains 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
name: CI | |
on: | |
workflow_dispatch: | |
workflow_call: | |
pull_request: | |
paths: | |
- Sources/** | |
- Tests/** | |
- .github/workflows/ci.yml | |
- PromiseKit.xcodeproj/** | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
swift: | |
- '4.0' | |
- '4.1' | |
- '4.2' | |
container: | |
image: swift:${{ matrix.swift }} | |
steps: | |
- uses: actions/checkout@v1 # DO NOT UPDATE, IT WILL FAIL DUE TO GLIBC | |
- run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 3 | |
- run: swift build # generated linuxmain requires Swift 5 sadly | |
linux-code-cov: | |
name: linux | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
matrix: | |
swift: | |
- '5.0' | |
- '5.1' | |
- '5.2' | |
- '5.3' | |
- '5.4' | |
- '5.5' | |
- '5.6' | |
- '5.7' | |
- '5.8' | |
- '5.9' | |
- '5.10' | |
- '6.0' | |
container: | |
image: swift:${{ matrix.swift }} | |
steps: | |
- uses: actions/checkout@v1 # DO NOT UPDATE, IT WILL FAIL DUE TO GLIBC | |
# - run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 4 | |
# if: ${{ matrix.swift < 6 }} | |
# - run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 4.2 | |
# if: ${{ matrix.swift < 6 }} | |
- run: swift test --enable-code-coverage --parallel | |
- name: Generate Coverage Report | |
if: ${{ matrix.swift < 5.4 }} # fails for SOME REASON | |
run: | | |
apt-get -qq update | |
apt-get -qq install llvm-10 curl | |
export b=$(swift build --show-bin-path) && llvm-cov-10 \ | |
export -format lcov \ | |
-instr-profile=$b/codecov/default.profdata \ | |
--ignore-filename-regex='\.build/' \ | |
$b/*.xctest \ | |
> info.lcov | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: ./info.lcov | |
verify-linuxmain: | |
runs-on: ubuntu-latest | |
container: swift:5.3 | |
name: run --generate-linuxmain | |
steps: | |
- uses: actions/checkout@v1 | |
- run: swift test --generate-linuxmain | |
- run: git diff --exit-code | |
test: | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
dst: | |
- "platform=macOS,arch=arm64,id=0000FE00-392BB8A41C01F642" | |
- "platform=iOS Simulator,OS=17.0.1,name=iPhone 14" | |
- "platform=tvOS Simulator,OS=17.2,name=Apple TV" | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 15.2 | |
- uses: actions/checkout@v4 | |
- uses: sersoft-gmbh/xcodebuild-action@v1 | |
with: | |
project: PromiseKit.xcodeproj | |
scheme: PromiseKit | |
destination: ${{ matrix.dst }} | |
action: test | |
enable-code-coverage: true | |
- uses: codecov/codecov-action@v1 | |
test-android: | |
name: test (Android) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: skiptools/swift-android-action@v2 |