Skip to content

Commit

Permalink
ci: change rust-toolchain format to toml (#5070)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolYeh910 authored Jan 30, 2025
1 parent f146f06 commit 76561dc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/ci_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,15 @@ jobs:
- uses: camshaft/rust-cache@v1

- uses: SebRollen/[email protected]
id: read_toml
with:
file: '${{env.ROOT_PATH}}/rust-toolchain.toml'
field: 'toolchain.channel'

# Enforce that clippy's msrv matches rust-toolchain
- name: Check MSRV
run: grep $(cat ${{env.ROOT_PATH}}/rust-toolchain) ${{env.ROOT_PATH}}/.clippy.toml
run: grep "${{steps.read_toml.outputs.value}}" ${{env.ROOT_PATH}}/.clippy.toml

# We don't need to format the generated files,
# but if they don't exist other code breaks.
Expand All @@ -327,15 +333,22 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true

- uses: SebRollen/[email protected]
id: read_toml
with:
file: '${{env.ROOT_PATH}}/rust-toolchain.toml'
field: 'toolchain.channel'

# Enforce crate msrv matches rust-toolchain
- name: Check MSRV of s2n-tls
run: grep "rust-version = \"$(cat ${{env.ROOT_PATH}}/rust-toolchain)\"" ${{env.ROOT_PATH}}/s2n-tls/Cargo.toml
run: grep "rust-version = \"${{steps.read_toml.outputs.value}}\"" ${{env.ROOT_PATH}}/s2n-tls/Cargo.toml

- name: Check MSRV of s2n-tls-sys
run: grep "rust-version = \"$(cat ${{env.ROOT_PATH}}/rust-toolchain)\"" ${{env.ROOT_PATH}}/s2n-tls-sys/templates/Cargo.template
run: grep "rust-version = \"${{steps.read_toml.outputs.value}}\"" ${{env.ROOT_PATH}}/s2n-tls-sys/templates/Cargo.template

- name: Check MSRV of s2n-tokio
run: grep "rust-version = \"$(cat ${{env.ROOT_PATH}}/rust-toolchain)\"" ${{env.ROOT_PATH}}/s2n-tls-tokio/Cargo.toml
run: grep "rust-version = \"${{steps.read_toml.outputs.value}}\"" ${{env.ROOT_PATH}}/s2n-tls-tokio/Cargo.toml

pcaps:
runs-on: ubuntu-24.04
Expand Down
1 change: 0 additions & 1 deletion bindings/rust/extended/rust-toolchain

This file was deleted.

2 changes: 2 additions & 0 deletions bindings/rust/extended/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.63.0"
1 change: 0 additions & 1 deletion bindings/rust/standard/bench/rust-toolchain

This file was deleted.

2 changes: 2 additions & 0 deletions bindings/rust/standard/bench/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "stable"
1 change: 0 additions & 1 deletion bindings/rust/standard/rust-toolchain

This file was deleted.

2 changes: 2 additions & 0 deletions bindings/rust/standard/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.74.0"

0 comments on commit 76561dc

Please sign in to comment.