Skip to content

Commit d17598b

Browse files
committed
Split macOS, linux builds again
It appears the codeclimate-action messes with the swift setup
1 parent 68dc568 commit d17598b

File tree

1 file changed

+17
-50
lines changed

1 file changed

+17
-50
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10,66 +10,33 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13-
build:
14-
name: Build ${{ matrix.swift }} on ${{ matrix.os }}
15-
runs-on: ${{ matrix.os }}
16-
strategy:
17-
matrix:
18-
os: [ubuntu-latest, macos-latest]
19-
swift: ["5.4", "5.5", "5.6"]
13+
macos:
14+
name: Build and test on macos-latest
15+
runs-on: macOS-latest
2016
steps:
21-
- uses: swift-actions/setup-swift@v1
22-
with:
23-
swift-version: ${{ matrix.swift }}
2417
- uses: actions/checkout@v2
2518
- name: Set code coverage path
2619
run: echo "codecov_path=$(swift test --show-codecov-path)" >> $GITHUB_ENV
2720
- name: Test and publish code coverage to Code Climate
28-
if: ${{ matrix.os }} == "macos-latest"
2921
uses: paulofaria/codeclimate-action@master
3022
env:
3123
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
3224
with:
3325
downloadUrl: https://github.com/paulofaria/test-reporter/releases/download/0.9.0/test-reporter-0.9.0-darwin-amd64
34-
coverageCommand: swift test --enable-code-coverage
26+
coverageCommand: swift test --enable-test-discovery --enable-code-coverage
3527
coverageLocations: ${{ env.codecov_path }}:lcov-json
28+
29+
linux:
30+
name: Build ${{ matrix.swift }} on ${{ matrix.os }}
31+
runs-on: ${{ matrix.os }}
32+
strategy:
33+
matrix:
34+
os: [ubuntu-latest]
35+
swift: ["5.4", "5.5", "5.6"]
36+
steps:
37+
- uses: swift-actions/setup-swift@v1
38+
with:
39+
swift-version: ${{ matrix.swift }}
40+
- uses: actions/checkout@v2
3641
- name: Test
37-
if: ${{ matrix.os }} != "macos-latest"
3842
run: swift test
39-
40-
41-
42-
# macos:
43-
# name: Build and test on macos-latest
44-
# runs-on: macOS-latest
45-
# steps:
46-
# - uses: actions/checkout@v2
47-
# - name: Set code coverage path
48-
# run: echo "codecov_path=$(swift test --show-codecov-path)" >> $GITHUB_ENV
49-
# - name: Test and publish code coverage to Code Climate
50-
# uses: paulofaria/codeclimate-action@master
51-
# env:
52-
# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
53-
# with:
54-
# downloadUrl: https://github.com/paulofaria/test-reporter/releases/download/0.9.0/test-reporter-0.9.0-darwin-amd64
55-
# coverageCommand: swift test --enable-test-discovery --enable-code-coverage
56-
# coverageLocations: ${{ env.codecov_path }}:lcov-json
57-
58-
# linux:
59-
# name: Build and test on ${{ matrix.tag }}-${{ matrix.os }}
60-
# runs-on: ubuntu-latest
61-
# strategy:
62-
# matrix:
63-
# os:
64-
# - focal
65-
# - bionic
66-
# tag:
67-
# - swift:5.3
68-
# - swift:5.4
69-
# container:
70-
# image: ${{ matrix.tag }}-${{ matrix.os }}
71-
# steps:
72-
# - name: Checkout
73-
# uses: actions/checkout@v2
74-
# - name: Test
75-
# run: swift test --enable-test-discovery --enable-code-coverage --sanitize=thread

0 commit comments

Comments
 (0)