-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (48 loc) · 1.37 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
name: xet-core CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fmt:
name: Rustfmt
runs-on:
group: cpu-low
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
- name: Format
run: |
cargo fmt --manifest-path ./Cargo.toml --all -- --check
cargo fmt --manifest-path ./hf_xet/Cargo.toml --all -- --check
build_and_test:
runs-on:
group: cpu-high
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust 1.79
uses: dtolnay/[email protected]
with:
components: clippy
- name: Install protoc compiler
run: |
sudo apt-get install unzip
cd $HOME
curl https://github.com/protocolbuffers/protobuf/releases/download/v23.1/protoc-23.1-linux-x86_64.zip -L -o protoc.zip
unzip protoc.zip -d .protoc
rm protoc.zip
echo "PATH=$HOME/.protoc/bin:$PATH" >> $GITHUB_ENV
- name: Lint
run: |
cargo clippy -r --verbose -- -D warnings # elevates warnings to errors
- name: Build and Test
run: |
cargo test --verbose --no-fail-fast --features "strict"