-
Notifications
You must be signed in to change notification settings - Fork 11
70 lines (63 loc) · 1.65 KB
/
linux-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Linux Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-changes:
name: Check for Changes
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changed:
- '.github/workflows/linux-tests.yml'
- '**/*.swift'
#########
# Linux #
#########
matrix:
name: Linux Matrix
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: check-changes
strategy:
matrix:
swift: [ "5.2.5", "5.3.3", "5.4.3", "5.5.3", "5.6.3", "5.7.3" ]
os: [ amazonlinux2, bionic, centos7, focal, jammy ]
exclude:
- swift: 5.2.5
os: jammy
- swift: 5.3.3
os: jammy
- swift: 5.4.3
os: jammy
- swift: 5.5.3
os: jammy
- swift: 5.6.3
os: jammy
- swift: 5.7.3
os: centos7
container:
image: swift:${{ matrix.swift }}-${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build and Test
run: swift test --enable-test-discovery
test:
runs-on: ubuntu-latest
name: Linux Tests
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: matrix
steps:
- name: Check build matrix status
if: ${{ needs.matrix.result == 'failure' }}
run: exit 1