-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 1.82 KB
/
ci.yml
File metadata and controls
64 lines (60 loc) · 1.82 KB
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
# CI Matrix Policy
#
# Category A (tools-version 6.2 + macOS 26 min): macos-26 + Swift 6.2
# Category B (tools-version 6.2 + older macOS): macos-15 + 6.2, macos-26 + 6.2
# Category C (tools-version 6.0): macos-15 + 6.1, macos-15 + 6.3, macos-26 + 6.3
# Linux (if viable): ubuntu + Swift 6.1, ubuntu + Swift 6.3
#
# When Swift 6.4 ships: bump 6.1→6.2 and 6.3→6.4 in Category C
# When bumping tools-version to 6.2: drop 6.0/6.1, move to Category A or B
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests:
name: Build and Test
strategy:
fail-fast: false
matrix:
include:
- os: macos-15
swift: "6.1"
- os: macos-15
swift: "6.3"
- os: macos-26
swift: "6.3"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: SwiftyLab/setup-swift@latest
with:
swift-version: ${{ matrix.swift }}
- name: Build
run: swift build -v
- name: Test
run: swift test -v
lint:
name: Run Swiftlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: norio-nomura/action-swiftlint@3.2.1
swift-format:
name: Run swift-format
runs-on: ubuntu-latest
container:
image: swift:latest
steps:
- uses: actions/checkout@v6
- name: Download .swift-format config
run: |
apt-get update && apt-get install -y wget
wget -O .swift-format https://gist.githubusercontent.com/RISCfuture/e0c21afb7bd80a88d128a42bf40d2ecd/raw/.swift-format
- name: Run swift-format lint
run: swift format lint -r .