-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (83 loc) · 2.32 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
name: Rust
on:
push:
branches:
- 'main'
- '!gh-pages'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
steps:
- uses: actions/checkout@v4
- name: Install C deps
run: |
set -x
sudo apt-get install libibus-1.0-dev
shell: bash
- name: install just
run: |
set -x
# create ~/bin
mkdir -p ~/bin
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/bin
export PATH="$PATH:$HOME/bin"
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install bindgen
run: |
set -x
mkdir bindgen && cd bindgen
sudo apt-get install libclang1
URL_ROOT=https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.4
BINDGEN_TAR=bindgen-cli-x86_64-unknown-linux-gnu.tar.xz
SHA256_FILE=${BINDGEN_TAR}.sha256
wget "$URL_ROOT/$BINDGEN_TAR" -O bindgen_cli.tar.xz
tar -xf ./bindgen_cli.tar.xz --strip-components=1
echo "$(pwd)" >> $GITHUB_PATH
shell: bash
- run: |
set -x
just --yes ffi
git diff --exit-code
- run: just build
- run: cargo test
- run: cd vncharset && cargo test
msrv:
runs-on: ubuntu-latest
if: false
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
# add_of_mut! requires for soundness
MSRV: 1.51.0
steps:
- uses: actions/checkout@v4
- run: |
rustup toolchain install ${{ env.MSRV }}
rustup default ${{ env.MSRV }}
- run: |
rustup run stable cargo generate-lockfile
rustup run stable cargo fetch
- run: |
cargo build --all-targets --locked
- run: |
cargo test
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo fmt --all -- --check
clippy:
if: false
runs-on: ubuntu-latest
needs: [build]
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
steps:
- uses: actions/checkout@v4
- run: |
rustup toolchain install nightly -c clippy
rustup default nightly
- run: cargo clippy --all-targets --all-features -- -Dwarnings