-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.79 KB
/
Copy pathci.yml
File metadata and controls
58 lines (52 loc) · 1.79 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
linux:
name: Build & test (Linux)
runs-on: ubuntu-latest
container: swift:6.1
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- run: swift --version
- run: swift build -Xswiftc -warnings-as-errors
- run: swift test -Xswiftc -warnings-as-errors
macos:
name: Build & test (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- run: swift --version
- run: swift build -c release
- run: swift test
conformance:
name: Conformance vectors
runs-on: ubuntu-latest
container: swift:6.1
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Download shared conformance vectors
run: |
apt-get update -qq && apt-get install -y -qq curl
base=https://raw.githubusercontent.com/firechip/cobs-conformance/v1.1.0/vectors
curl -sSfL -o vectors.jsonl "$base/vectors.jsonl"
curl -sSfL -o sentinel.jsonl "$base/sentinel.jsonl"
curl -sSfL -o errors.jsonl "$base/errors.jsonl"
- name: Check conformance
env:
COBS_CONFORMANCE_VECTORS: ${{ github.workspace }}/vectors.jsonl
COBS_CONFORMANCE_SENTINEL: ${{ github.workspace }}/sentinel.jsonl
COBS_CONFORMANCE_ERRORS: ${{ github.workspace }}/errors.jsonl
run: swift test --filter Conformance
lint:
name: swift-format lint
runs-on: ubuntu-latest
container: swift:6.1
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- run: swift format lint --strict --recursive Sources Tests Package.swift