Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: change rust-toolchain file to toml #70

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ jobs:
- uses: taiki-e/install-action@v2
with:
tool: just
- uses: actions-rs/[email protected]
- run: |
echo "RUST_TOOLCHAIN=$(sed -nr 's/channel = "(.*)"/\1/p' ./rust-toolchain.toml)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
override: true
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
sharedKey: debug-build
shared-key: debug-build
- run: just test
lint:
runs-on: ubuntu-20.04
Expand All @@ -26,15 +28,17 @@ jobs:
with:
tool: just
- run: |
echo "RUST_TOOLCHAIN=$(sed -nr 's/channel = "(.*)"/\1/p' ./rust-toolchain.toml)" >> $GITHUB_ENV
echo "RUST_TOOLCHAIN_NIGHTLY=$(cat ./rust-toolchain-nightly)" >> $GITHUB_ENV
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }}
components: rustfmt
- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
sharedKey: debug-build-nightly
shared-key: debug-build-nightly
- run: just lint "strict"
7 changes: 5 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- run: |
echo "RUST_TOOLCHAIN=$(sed -nr 's/channel = "(.*)"/\1/p' ./rust-toolchain.toml)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

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