-
Notifications
You must be signed in to change notification settings - Fork 8
89 lines (66 loc) · 2.61 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
77
78
79
80
81
82
83
84
85
86
87
88
89
name: ci
on:
push:
pull_request:
schedule: [cron: "40 1 * * *"]
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 rust ${{ matrix.rust }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: ["1.72.1", stable, beta, nightly]
steps:
- uses: actions/checkout@v4
- run: rustup default ${{ matrix.rust }} && rustup update ${{ matrix.rust }}
- name: Enable type layout randomization
run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
if: matrix.rust == 'nightly'
- name: cargo test turbosql-impl
run: cargo test --features "test" -- --nocapture --test-threads=1
working-directory: "turbosql-impl"
- name: cargo test turbosql
run: cargo test --features "test" -- --nocapture --test-threads=1
working-directory: "turbosql"
- run: cargo doc --no-deps
- run: >
echo -e "\n[patch.crates-io]\nrusqlite = {git = \"https://github.com/rusqlite/rusqlite\", branch = \"master\"}" >> Cargo.toml
- run: cargo clean
- name: rusqlite master cargo test turbosql-impl
if: matrix.rust != '1.72.1'
run: cargo test --features "test" -- --nocapture --test-threads=1 --skip ui
working-directory: "turbosql-impl"
- name: rusqlite master cargo test turbosql
if: matrix.rust != '1.72.1'
run: cargo test --features "test" -- --nocapture --test-threads=1 --skip ui
working-directory: "turbosql"
publish:
needs: [test]
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, 'turbosql@') && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- run: rustup default stable && rustup update stable
- name: cargo publish turbosql-impl
run: cargo publish --no-verify --allow-dirty --token ${{ secrets.CARGO_TOKEN }}
working-directory: "turbosql-impl"
- name: cargo publish turbosql
run: cargo publish --no-verify --allow-dirty --token ${{ secrets.CARGO_TOKEN }}
working-directory: "turbosql"