-
Notifications
You must be signed in to change notification settings - Fork 35
45 lines (40 loc) · 1.11 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
rust_version: [stable, beta, nightly]
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust_version }}
- name: Report versions
run: |
rustc -Vv
cargo -V
- uses: actions/checkout@v4
- run: cargo build --verbose
- run: cargo test --verbose
- run: cargo build --verbose --manifest-path ./dxf2json/Cargo.toml
- run: cargo build --verbose --manifest-path ./examples/Cargo.toml
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
with:
components: rustfmt
- uses: actions/checkout@v4
- run: cargo fmt --all -- --check
publish:
name: Publish to crates.io
if: startsWith(github.ref, 'refs/tags/v')
needs: [build, formatting]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo publish --token ${{ secrets.CRATES_IO_API_KEY }} --verbose