-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (66 loc) · 2 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
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
# https://matklad.github.io/2021/09/04/fast-rust-builds.html
# indicates that non-incremental builds improve CI performance.
CARGO_INCREMENTAL: 0
# Since we're not shipping any build artifacts, turning off debug
# symbols will speed things up without hurting anything.
RUSTFLAGS: '-C debuginfo=0'
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: add gdal repo
run: sudo apt-add-repository ppa:ubuntugis/ppa
- name: and update...
run: sudo apt-get update
- name: install gdal (sigh)
run: sudo apt install -y libgdal-dev gdal-bin
- uses: actions/checkout@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
# tarpaulin can only handle doctests on nightly, so let's run them
# here.
- name: Run doc tests
run: cargo test --doc
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
version: '0.18.5'
env:
PROPTEST_CASES: 5000
- name: Upload to codecov.io
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml
release:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: [ build ]
steps:
- name: install cargo release
uses: actions-rs/[email protected]
with:
crate: cargo-release
version: latest
use-tool-cache: true
- uses: actions/checkout@v2
- run: git config user.name "GitHub actions"
- run: git config user.email "[email protected]"
- name: cargo release
run: cargo release --execute --no-confirm --token ${{secrets.CRATES_IO_TOKEN}}