Skip to content

Commit 1176d45

Browse files
committed
Squashed commit of the following:
commit c51671f Author: xxchan <[email protected]> Date: Thu Dec 26 23:37:42 2024 +0800 try fix install msrv Signed-off-by: xxchan <[email protected]> commit 51d0cb2 Author: xxchan <[email protected]> Date: Thu Dec 26 23:33:50 2024 +0800 add separate msrv job; use nightly for default Signed-off-by: xxchan <[email protected]> commit 13f430a Author: xxchan <[email protected]> Date: Thu Dec 26 23:09:44 2024 +0800 fix Signed-off-by: xxchan <[email protected]> commit f2f8b3a Author: xxchan <[email protected]> Date: Thu Dec 26 22:48:56 2024 +0800 ci: use correct rust version Signed-off-by: xxchan <[email protected]>
1 parent 6e07faa commit 1176d45

File tree

2 files changed

+48
-9
lines changed

2 files changed

+48
-9
lines changed

.github/actions/setup-builder/action.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@ name: Prepare Rust Builder
2121
description: 'Prepare Rust Build Environment'
2222
inputs:
2323
rust-version:
24-
description: 'version of rust to install (e.g. stable)'
25-
required: true
26-
default: 'stable'
24+
description: 'version of rust to install and use'
2725
runs:
2826
using: "composite"
2927
steps:
30-
- name: Setup Rust toolchain
28+
- name: Setup specified Rust toolchain
3129
shell: bash
30+
if: ${{ inputs.rust-version != '' }}
3231
run: |
3332
echo "Installing ${{ inputs.rust-version }}"
3433
rustup toolchain install ${{ inputs.rust-version }}
35-
rustup default ${{ inputs.rust-version }}
34+
rustup override set ${{ inputs.rust-version }}
35+
rustup component add rustfmt clippy
36+
- name: Setup Rust toolchain according to rust-toolchain.toml
37+
shell: bash
38+
if: ${{ inputs.rust-version == '' }}
39+
run: |
40+
echo "Installing toolchain according to rust-toolchain.toml"
41+
rustup show
3642
rustup component add rustfmt clippy
3743
- name: Fixup git permissions
3844
# https://github.com/actions/checkout/issues/766

.github/workflows/ci.yml

+37-4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
steps:
4444
- uses: actions/checkout@v4
4545

46+
- name: Setup Rust toolchain
47+
uses: ./.github/actions/setup-builder
48+
4649
- name: Check License Header
4750
uses: apache/skywalking-eyes/[email protected]
4851

@@ -89,8 +92,6 @@ jobs:
8992

9093
- name: Setup Rust toolchain
9194
uses: ./.github/actions/setup-builder
92-
with:
93-
rust-version: ${{ env.rust_msrv }}
9495

9596
- name: Cache Rust artifacts
9697
uses: Swatinem/rust-cache@v2
@@ -109,6 +110,9 @@ jobs:
109110
steps:
110111
- uses: actions/checkout@v4
111112

113+
- name: Setup Rust toolchain
114+
uses: ./.github/actions/setup-builder
115+
112116
- name: Cache Rust artifacts
113117
uses: Swatinem/rust-cache@v2
114118

@@ -122,8 +126,6 @@ jobs:
122126

123127
- name: Setup Rust toolchain
124128
uses: ./.github/actions/setup-builder
125-
with:
126-
rust-version: ${{ env.rust_msrv }}
127129

128130
- name: Cache Rust artifacts
129131
uses: Swatinem/rust-cache@v2
@@ -136,3 +138,34 @@ jobs:
136138

137139
- name: Doc Test
138140
run: cargo test --no-fail-fast --doc --all-features --workspace
141+
142+
# reference: https://github.com/xxchan/arrow-rs/blob/xxchan/vulnerable-hedgehog/.github/workflows/rust.yml#L114-L145
143+
msrv:
144+
name: Verify MSRV
145+
runs-on: ubuntu-latest
146+
steps:
147+
- uses: actions/checkout@v4
148+
- name: Install cargo-msrv
149+
run: cargo install cargo-msrv
150+
- name: Setup Rust toolchain
151+
uses: ./.github/actions/setup-builder
152+
with:
153+
rust-version: ${{ env.rust_msrv }}
154+
- name: Check iceberg
155+
working-directory: crates/iceberg
156+
run: cargo msrv --log-target stdout verify
157+
- name: Check catalog/glue
158+
working-directory: crates/catalog/glue
159+
run: cargo msrv --log-target stdout verify
160+
- name: Check catalog/hms
161+
working-directory: crates/catalog/hms
162+
run: cargo msrv --log-target stdout verify
163+
- name: Check catalog/memory
164+
working-directory: crates/catalog/memory
165+
run: cargo msrv --log-target stdout verify
166+
- name: Check catalog/rest
167+
working-directory: crates/catalog/rest
168+
run: cargo msrv --log-target stdout verify
169+
- name: Check catalog/sql
170+
working-directory: crates/catalog/sql
171+
run: cargo msrv --log-target stdout verify

0 commit comments

Comments
 (0)