Skip to content

Commit a08be14

Browse files
committed
update rust workflow
1 parent 1e3b7e3 commit a08be14

File tree

1 file changed

+3
-85
lines changed

1 file changed

+3
-85
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -31,61 +31,6 @@ on:
3131

3232
jobs:
3333

34-
# Check workspace wide compile and test with default features for
35-
# mac
36-
macos:
37-
name: Test on Mac
38-
runs-on: macos-latest
39-
steps:
40-
- uses: actions/checkout@v4
41-
with:
42-
submodules: true
43-
- name: Install protoc with brew
44-
run: brew install protobuf
45-
- name: Setup Rust toolchain
46-
run: |
47-
rustup toolchain install stable --no-self-update
48-
rustup default stable
49-
- name: Run tests
50-
shell: bash
51-
run: |
52-
# do not produce debug symbols to keep memory usage down
53-
export RUSTFLAGS="-C debuginfo=0"
54-
cargo test
55-
56-
57-
# Check workspace wide compile and test with default features for
58-
# windows
59-
windows:
60-
name: Test on Windows
61-
runs-on: windows-latest
62-
steps:
63-
- uses: actions/checkout@v4
64-
with:
65-
submodules: true
66-
- name: Install protobuf compiler in /d/protoc
67-
shell: bash
68-
run: |
69-
mkdir /d/protoc
70-
cd /d/protoc
71-
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-win64.zip
72-
unzip protoc-21.4-win64.zip
73-
export PATH=$PATH:/d/protoc/bin
74-
protoc --version
75-
76-
- name: Setup Rust toolchain
77-
run: |
78-
rustup toolchain install stable --no-self-update
79-
rustup default stable
80-
- name: Run tests
81-
shell: bash
82-
run: |
83-
# do not produce debug symbols to keep memory usage down
84-
export RUSTFLAGS="-C debuginfo=0"
85-
export PATH=$PATH:/d/protoc/bin
86-
cargo test
87-
88-
8934
# Run cargo fmt for all crates
9035
lint:
9136
name: Lint (cargo fmt)
@@ -98,18 +43,7 @@ jobs:
9843
uses: ./.github/actions/setup-builder
9944
- name: Setup rustfmt
10045
run: rustup component add rustfmt
101-
- name: Format arrow
102-
run: cargo fmt --all -- --check
103-
- name: Format parquet
104-
# Many modules in parquet are skipped, so check parquet separately
105-
# https://github.com/apache/arrow-rs/issues/6179
106-
working-directory: parquet
107-
run: |
108-
# if this fails, run this from the parquet directory:
109-
# cargo fmt -p parquet -- --config skip_children=true `find . -name "*.rs" \! -name format.rs`
110-
cargo fmt -p parquet -- --check --config skip_children=true `find . -name "*.rs" \! -name format.rs`
11146
- name: Format object_store
112-
working-directory: object_store
11347
run: cargo fmt --all -- --check
11448

11549
msrv:
@@ -119,32 +53,16 @@ jobs:
11953
image: amd64/rust
12054
steps:
12155
- uses: actions/checkout@v4
122-
- name: Setup Rust toolchain
123-
uses: ./.github/actions/setup-builder
12456
- name: Install cargo-msrv
12557
run: cargo install cargo-msrv
12658
- name: Downgrade object_store dependencies
127-
working-directory: object_store
12859
# Necessary because tokio 1.30.0 updates MSRV to 1.63
12960
# and url 2.5.1, updates to 1.67
13061
run: |
13162
cargo update -p tokio --precise 1.29.1
13263
cargo update -p url --precise 2.5.0
13364
cargo update -p once_cell --precise 1.20.3
134-
- name: Downgrade arrow-pyarrow-integration-testing dependencies
135-
working-directory: arrow-pyarrow-integration-testing
136-
# Necessary because half 2.5 requires rust 1.81 or newer
137-
run: |
138-
cargo update -p half --precise 2.4.0
139-
- name: Downgrade workspace dependencies
140-
# Necessary because half 2.5 requires rust 1.81 or newer
141-
run: |
142-
cargo update -p half --precise 2.4.0
143-
- name: Check all packages
65+
- name: Check
14466
run: |
145-
# run `cargo msrv verify --manifest-path "path/to/Cargo.toml"` to see problematic dependencies
146-
find . -mindepth 2 -name Cargo.toml | while read -r dir
147-
do
148-
echo "Checking package '$dir'"
149-
cargo msrv verify --manifest-path "$dir" --output-format=json || exit 1
150-
done
67+
# run `cargo msrv verify` to see problems
68+
cargo msrv verify --output-format=json || exit 1

0 commit comments

Comments
 (0)