-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (64 loc) · 2.12 KB
/
ci.yml
File metadata and controls
75 lines (64 loc) · 2.12 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
name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: "recursive"
- name: Install Rust tools
run: |
rustup update --no-self-update stable
rustup default stable
rustup component add --toolchain stable clippy rustfmt
- name: Set up Ruby
uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
with:
bundler-cache: true
- name: Lint
run: bundle exec rake lint
# Verify that licenses conform to the policy in rust/about.toml
- name: Check licenses
run: |
cargo install cargo-about
cargo about generate rust/about.hbs --manifest-path rust/Cargo.toml --workspace > THIRD_PARTY_LICENSES.html
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ruby: ["3.3", "3.4", "4.0"]
runs-on: ${{ matrix.os }}
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: "recursive"
- name: Set up Ruby
uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Restore Rust compile cache
id: rust-compile-cache-restore
uses: actions/cache/restore@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
rust/target
key: ${{ runner.os }}-rust
- name: Run Rust tests
run: bundle exec rake cargo_test
- name: Run Ruby tests
run: bundle exec rake test
- name: Save Rust compile cache
id: rust-compile-cache-save
uses: actions/cache/save@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
rust/target
key: ${{ steps.rust-compile-cache-restore.outputs.cache-primary-key }}