-
Notifications
You must be signed in to change notification settings - Fork 2
120 lines (102 loc) · 3.03 KB
/
ci.yaml
File metadata and controls
120 lines (102 loc) · 3.03 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Copyright (c) 2025 Graphcore Ltd. All rights reserved.
name: CI
on:
push:
branches-ignore:
- "pr/**"
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
warm-build-deps-cache:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-build-dependencies
warm-dev-deps-cache:
runs-on: ubuntu-latest
needs: warm-build-deps-cache
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dev-dependencies
lint:
runs-on: ubuntu-latest
needs: [warm-build-deps-cache, warm-dev-deps-cache]
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-build-dependencies
- uses: ./.github/actions/install-dev-dependencies
- name: Lint with pre-commit
run: pre-commit run --all-files
check-semantic-versioning:
runs-on: ubuntu-latest
needs: [warm-build-deps-cache, warm-dev-deps-cache]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to cause the main branch to also be fetched
- uses: ./.github/actions/install-build-dependencies
- uses: ./.github/actions/install-dev-dependencies
- uses: ./.github/actions/run-build-command
with:
command: pre-commit run --hook-stage manual --all-files cargo-semver-checks
cache-name: semver
paths: |
target/semver-checks/
build:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: warm-build-deps-cache
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-build-dependencies
- uses: ./.github/actions/run-build-command
with:
command: cargo build --all-features --verbose
cache-name: ${{ github.job }}
test:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: warm-build-deps-cache
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-build-dependencies
- uses: ./.github/actions/run-build-command
with:
command: cargo test --all-features --verbose
cache-name: ${{ github.job }}
paths: |
target/
gwr-developer-guide/doctest_cache/
gwr-developer-guide/rustdoc_cache/
benchmark:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: warm-build-deps-cache
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-build-dependencies
- uses: ./.github/actions/run-build-command
with:
command: cargo bench --all-features --verbose
cache-name: ${{ github.job }}