51
.github/workflows/ci.yml
vendored
51
.github/workflows/ci.yml
vendored
@@ -6,26 +6,31 @@ on:
|
|||||||
- .github/workflows/ci.yml
|
- .github/workflows/ci.yml
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '3 3 * * 5' # 3:03 AM, every Friday
|
- cron: '3 3 * * 5' # 3:03 AM, every Friday
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.head_ref || 'push' }}
|
group: ${{ github.head_ref || 'push' }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
smoke:
|
verify-linuxmain:
|
||||||
runs-on: macos-latest
|
runs-on: macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: swift test --generate-linuxmain
|
- run: swift test --generate-linuxmain
|
||||||
- run: git diff --exit-code
|
- run: git diff --exit-code
|
||||||
|
|
||||||
apple:
|
apple:
|
||||||
runs-on: macos-latest
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
|
- macos-11
|
||||||
platform:
|
platform:
|
||||||
- iOS
|
- iOS
|
||||||
- tvOS
|
- tvOS
|
||||||
- macOS
|
- macOS
|
||||||
- watchOS
|
- watchOS
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: mxcl/xcodebuild@v1
|
- uses: mxcl/xcodebuild@v1
|
||||||
@@ -35,25 +40,13 @@ jobs:
|
|||||||
warnings-as-errors: true
|
warnings-as-errors: true
|
||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1
|
||||||
|
|
||||||
linux-swift-4:
|
|
||||||
name: linux (${{ matrix.swift }})
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
swift: ['4.2', '5.0']
|
|
||||||
container:
|
|
||||||
image: swift:${{ matrix.swift }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- run: useradd -ms /bin/bash mxcl
|
|
||||||
- run: chown -R mxcl .
|
|
||||||
- run: su mxcl -c 'swift test --parallel'
|
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
swift:
|
swift:
|
||||||
|
- swift:4.2
|
||||||
|
- swift:5.0
|
||||||
- swift:5.1
|
- swift:5.1
|
||||||
- swift:5.2
|
- swift:5.2
|
||||||
- swift:5.3
|
- swift:5.3
|
||||||
@@ -62,12 +55,22 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: ${{ matrix.swift }}
|
image: ${{ matrix.swift }}
|
||||||
steps:
|
steps:
|
||||||
|
- uses: mxcl/get-swift-version@v1
|
||||||
|
id: swift
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- run: useradd -ms /bin/bash mxcl
|
- run: useradd -ms /bin/bash mxcl
|
||||||
# ^^ we need to be a normal user and not root for the tests to be valid
|
|
||||||
- run: chown -R mxcl .
|
- run: chown -R mxcl .
|
||||||
- run: su mxcl -c 'swift test --parallel --enable-code-coverage'
|
# ^^ we need to be a normal user and not root for the tests to be valid
|
||||||
|
|
||||||
|
- run: echo ARGS=--enable-code-coverage >> $GITHUB_ENV
|
||||||
|
if: ${{ steps.swift.outputs.marketing-version > 5 }}
|
||||||
|
|
||||||
|
- run: su mxcl -c "swift test --parallel $ARGS"
|
||||||
|
|
||||||
- name: Generate `.lcov`
|
- name: Generate `.lcov`
|
||||||
|
if: ${{ steps.swift.outputs.marketing-version > 5 }}
|
||||||
run: |
|
run: |
|
||||||
apt-get -qq update && apt-get -qq install curl
|
apt-get -qq update && apt-get -qq install curl
|
||||||
b=$(swift build --show-bin-path)
|
b=$(swift build --show-bin-path)
|
||||||
@@ -77,6 +80,8 @@ jobs:
|
|||||||
--ignore-filename-regex='\.build|Tests' \
|
--ignore-filename-regex='\.build|Tests' \
|
||||||
"$b"/*.xctest \
|
"$b"/*.xctest \
|
||||||
> info.lcov
|
> info.lcov
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1
|
||||||
|
if: ${{ steps.swift.outputs.marketing-version > 5 }}
|
||||||
with:
|
with:
|
||||||
file: ./info.lcov
|
file: ./info.lcov
|
||||||
|
|||||||
Reference in New Issue
Block a user