|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - "*" |
| 9 | + |
| 10 | +jobs: |
| 11 | + |
| 12 | + "sanity-Tests": |
| 13 | + runs-on: macOS-latest |
| 14 | + steps: |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v2 |
| 17 | + - name: Install swiftformat |
| 18 | + run: brew install swiftformat |
| 19 | + - name: Run sanity |
| 20 | + run: ./scripts/sanity.sh . |
| 21 | + |
| 22 | + "tuxOS-Tests": |
| 23 | + runs-on: ubuntu-latest |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + images: |
| 27 | + - swift:5.1 |
| 28 | + - swift:5.2 |
| 29 | + - swiftlang/swift:nightly-5.3-bionic |
| 30 | + - swiftlang/swift:nightly-bionic |
| 31 | + container: |
| 32 | + image: ${{ matrix.images }} |
| 33 | + steps: |
| 34 | + - name: Checkout |
| 35 | + uses: actions/checkout@v2 |
| 36 | + - name: Test |
| 37 | + run: swift test --enable-code-coverage --enable-test-discovery |
| 38 | + - name: Convert coverage files |
| 39 | + run: | |
| 40 | + llvm-cov export -format="lcov" \ |
| 41 | + .build/debug/swift-extras-uuidPackageTests.xctest \ |
| 42 | + -ignore-filename-regex="\/Tests\/" \ |
| 43 | + -instr-profile .build/debug/codecov/default.profdata > info.lcov |
| 44 | + - name: Install curl |
| 45 | + run: apt-get update && apt-get install -y curl # required by the codecov action. |
| 46 | + - name: Upload to codecov.io |
| 47 | + uses: codecov/codecov-action@v1 |
| 48 | + with: |
| 49 | + file: info.lcov |
| 50 | + |
| 51 | + "tuxOS-Performance-Tests": |
| 52 | + runs-on: ubuntu-latest |
| 53 | + strategy: |
| 54 | + matrix: |
| 55 | + images: |
| 56 | + - swift:5.1 |
| 57 | + - swift:5.2 |
| 58 | + - swiftlang/swift:nightly-5.3-bionic |
| 59 | + - swiftlang/swift:nightly-bionic |
| 60 | + container: |
| 61 | + image: ${{ matrix.images }} |
| 62 | + steps: |
| 63 | + - name: Checkout |
| 64 | + uses: actions/checkout@v2 |
| 65 | + - name: Build and run test |
| 66 | + run: swift run -c release --enable-test-discovery |
| 67 | + |
| 68 | + "macOS-Tests": |
| 69 | + runs-on: macOS-latest |
| 70 | + strategy: |
| 71 | + matrix: |
| 72 | + xcode: |
| 73 | + - Xcode_11.1.app |
| 74 | + - Xcode_11.6.app |
| 75 | + - Xcode_12.app |
| 76 | + steps: |
| 77 | + - name: Checkout |
| 78 | + uses: actions/checkout@v2 |
| 79 | + - name: Show all Xcode versions |
| 80 | + run: ls -an /Applications/ | grep Xcode* |
| 81 | + - name: Change Xcode command line tools |
| 82 | + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}/Contents/Developer |
| 83 | + - name: Swift version |
| 84 | + run: swift --version |
| 85 | + - name: Xcode Tests |
| 86 | + run: | |
| 87 | + swift package generate-xcodeproj --skip-extra-files --enable-code-coverage |
| 88 | + xcodebuild -quiet -parallel-testing-enabled YES -scheme swift-extras-uuid-Package -enableCodeCoverage YES build test |
| 89 | + - name: Codecov |
| 90 | + run: bash <(curl -s https://codecov.io/bash) -f info.lcov |
| 91 | + |
| 92 | + "macOS-Performance-Tests": |
| 93 | + runs-on: macOS-latest |
| 94 | + strategy: |
| 95 | + matrix: |
| 96 | + xcode: |
| 97 | + - Xcode_11.1.app |
| 98 | + - Xcode_11.6.app |
| 99 | + - Xcode_12.app |
| 100 | + steps: |
| 101 | + - name: Checkout |
| 102 | + uses: actions/checkout@v2 |
| 103 | + - name: Change Xcode command line tools |
| 104 | + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}/Contents/Developer |
| 105 | + - name: Swift version |
| 106 | + run: swift --version |
| 107 | + - name: Build and run test |
| 108 | + run: swift run -c release |
0 commit comments