Skip to content

Commit d2b0332

Browse files
committed
[ci] Windows
Windows doesn’t like certain characters in filenames 🙄
1 parent ecbb3a6 commit d2b0332

File tree

2 files changed

+37
-24
lines changed

2 files changed

+37
-24
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
name: CI
2+
23
on:
34
pull_request:
45
paths:
56
- '**/*.swift'
67
- .github/workflows/ci.yml
78
schedule:
89
- cron: '3 3 * * 5' # 3:03 AM, every Friday
10+
11+
concurrency:
12+
group: ${{ github.head_ref || 'scheduled' }}
13+
cancel-in-progress: true
14+
915
jobs:
1016
smoke:
1117
runs-on: macos-latest
1218
steps:
13-
- uses: technote-space/auto-cancel-redundant-job@v1
1419
- uses: actions/checkout@v2
1520
- run: swift test --generate-linuxmain
1621
- run: git diff --exit-code
1722

1823
apple:
1924
runs-on: macos-latest
25+
name: ${{ matrix.platform }}
2026
strategy:
2127
matrix:
2228
platform:
@@ -33,38 +39,36 @@ jobs:
3339
warnings-as-errors: true
3440
- uses: codecov/codecov-action@v1
3541

36-
linux-swift-4:
37-
name: linux (${{ matrix.swift }})
38-
runs-on: ubuntu-latest
39-
strategy:
40-
matrix:
41-
swift: ['4.2', '5.0']
42-
container:
43-
image: swift:${{ matrix.swift }}
44-
steps:
45-
- uses: actions/checkout@v2
46-
- run: useradd -ms /bin/bash mxcl
47-
- run: chown -R mxcl .
48-
- run: su mxcl -c 'swift test --parallel'
49-
5042
linux:
5143
runs-on: ubuntu-latest
5244
strategy:
5345
matrix:
5446
swift:
55-
- '5.1'
56-
- '5.2'
57-
- '5.3'
58-
- '5.4'
47+
- swift:5.1
48+
- swift:5.2
49+
- swift:5.3
50+
- swift:5.4
51+
- swiftlang/swift:nightly-5.5
52+
code-cov:
53+
- true
54+
include:
55+
- swift: swift:4.2
56+
code-cov: false
57+
- swift: swift:5.0
58+
code-cov: false
5959
container:
60-
image: swift:${{ matrix.swift }}
60+
image: ${{ matrix.swift }}
6161
steps:
6262
- uses: actions/checkout@v2
63-
- run: useradd -ms /bin/bash mxcl
64-
# ^^ we need to be a normal user and not root for the tests to be valid
65-
- run: chown -R mxcl .
66-
- run: su mxcl -c 'swift test --parallel --enable-code-coverage'
63+
- run: |
64+
useradd -ms /bin/bash mxcl
65+
chown -R mxcl .
66+
# ^^ we need to be a normal user and not root for the tests to be valid
67+
- run: su mxcl -c "swift test --parallel $ARGS"
68+
env:
69+
ARGS: ${{ matrix.code-cov && '--enable-code-coverage' || '' }}
6770
- name: Generate `.lcov`
71+
if: ${{ matrix.code-cov }}
6872
run: |
6973
apt-get -qq update && apt-get -qq install curl
7074
b=$(swift build --show-bin-path)
@@ -75,5 +79,14 @@ jobs:
7579
"$b"/*.xctest \
7680
> info.lcov
7781
- uses: codecov/codecov-action@v1
82+
if: ${{ matrix.code-cov }}
7883
with:
7984
file: ./info.lcov
85+
86+
windows:
87+
runs-on: windows-latest
88+
steps:
89+
- uses: seanmiddleditch/gha-setup-vsdevenv@v3
90+
- uses: mxcl/setup-swift@v1
91+
- uses: actions/checkout@v2
92+
- run: swift test --parallel
File renamed without changes.

0 commit comments

Comments
 (0)