-
Notifications
You must be signed in to change notification settings - Fork 7
74 lines (54 loc) · 1.84 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
name: ci
on:
push:
pull_request:
schedule: [cron: "40 8 * * *"]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
checklinks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: trevyn/lychee-action@v1
id: lychee
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --verbose --no-progress --header="accept=text/html" "**/*.md" "**/*.rs" "**/*.json" "**/*.toml" "**/*.yml"
- name: Fail if there were link-check errors
run: exit ${{ steps.lychee.outputs.exit_code }}
test:
name: test ${{ matrix.os }} rust ${{ matrix.rust }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust: ["1.65", stable, beta, nightly]
steps:
- uses: actions/checkout@v4
- run: rustup default ${{ matrix.rust }} && rustup update ${{ matrix.rust }}
- run: go version
- run: go mod vendor
working-directory: "librclone-sys"
- run: cargo test -- --nocapture
- run: cargo test -- --nocapture
working-directory: "librclone-sys"
- run: cargo doc --no-deps
publish:
needs: [checklinks, test]
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, 'librclone@') && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v4
- run: rustup default stable && rustup update stable
- run: go mod vendor
working-directory: "librclone-sys"
- name: cargo publish librclone-sys
run: cargo publish --allow-dirty --no-verify --token ${{ secrets.CARGO_TOKEN }}
working-directory: "librclone-sys"
- name: cargo publish librclone
run: cargo publish --no-verify --token ${{ secrets.CARGO_TOKEN }}