[ci] more; some fixes I found

This commit is contained in:
Max Howell
2021-05-28 09:35:35 -04:00
parent f9cee2c75f
commit eb33ff8906
8 changed files with 106 additions and 70 deletions

21
.github/workflows/cd.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: CD
on:
release:
types: published
jobs:
docs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: sersoft-gmbh/swifty-docs-action@v1
with:
module-version: ${{ github.event.inputs.version }}
pods:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: pod trunk push --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
VERSION: ${{ github.event.inputs.version }}

View File

@@ -1,5 +1,5 @@
name: CI
on: [pull_request]
on: pull_request
jobs:
smoke:
runs-on: macos-latest
@@ -8,39 +8,22 @@ jobs:
- uses: actions/checkout@v2
- run: swift test --generate-linuxmain
- run: git diff --exit-code
macOS:
needs: smoke
runs-on: macos-latest
strategy:
matrix:
xcode:
# - 10.3 # Swift 5.0 (doesnt work on GHA macOS image :-/)
- 11.3 # Swift 5.1
- ^11.4 # Swift 5.2
# - ^12.5 # Swift 5.4 (not yet available on GHA)
steps:
- uses: actions/checkout@v2
- name: setup-xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- run: swift --version
- run: swift test --parallel
otherOS:
needs: smoke
apple:
runs-on: macos-latest
strategy:
matrix:
destination:
- platform=iOS Simulator,OS=latest,name=iPhone 11
- platform=iOS Simulator,OS=latest,name=iPhone 12
- platform=tvOS Simulator,OS=latest,name=Apple TV
# - platform=watchOS Simulator,OS=latest,name=Apple Watch Series 5 - 40mm
# ^^ coming with Xcode 12.5 which is not yet available on GHA
- platform=macOS
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 12 # Swift 5.3
- run: swift --version
xcode-version: 12.4
- run: swift package generate-xcodeproj --enable-code-coverage
- uses: sersoft-gmbh/xcodebuild-action@v1
with:
@@ -49,43 +32,31 @@ jobs:
destination: ${{ matrix.destination }}
action: test
- uses: codecov/codecov-action@v1
watchOS:
needs: smoke
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: swift package generate-xcodeproj
- uses: sersoft-gmbh/xcodebuild-action@v1
with:
project: Path.swift.xcodeproj
scheme: Path.swift-Package
destination: platform=watchOS Simulator,OS=latest,name=Apple Watch Series 5 - 40mm
action: build
linux-4-2:
needs: smoke
linux-swift-4:
name: linux (4.2)
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: fwal/setup-swift@v1
with:
swift-version: 4.2
- run: swift test --parallel # doesnt support code coverage
- uses: actions/checkout@v2
- run: swift test --parallel
linux:
needs: smoke
runs-on: ubuntu-18.04
strategy:
matrix:
swift:
- 5.0.3
- 5.1
- 5.2
# - 5.3 # 1 test fails
# - 5.4
- '5.0'
- '5.1'
- '5.2'
- '5.3'
steps:
- uses: actions/checkout@v2
- uses: fwal/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v2
- run: swift test --parallel --enable-code-coverage
- name: Generate Coverage Report
run: |
@@ -98,4 +69,15 @@ jobs:
> info.lcov
- uses: codecov/codecov-action@v1
with:
file: ./info.lcov
file: ./info.lcov
# code coverage fails with 5.4 for some reason
linux-swift-5-4:
name: linux (5.4)
runs-on: ubuntu-18.04
steps:
- uses: fwal/setup-swift@v1
with:
swift-version: 5.4
- uses: actions/checkout@v2
- run: swift test --parallel