Skip to content

Commit

Permalink
Merge pull request #63 from moia-oss/change-toml
Browse files Browse the repository at this point in the history
change toolchain files to toml
  • Loading branch information
rinde authored Oct 9, 2024
2 parents 1a7d7b9 + fb3b27c commit a60ef2a
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
- uses: taiki-e/install-action@v2
with:
tool: just
- run: echo "RUST_TOOLCHAIN=$(just rust-version)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
Expand All @@ -21,9 +24,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: just
- run: |
echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
echo "RUST_TOOLCHAIN_NIGHTLY=$(cat ./rust-toolchain-nightly)" >> $GITHUB_ENV
echo "RUST_TOOLCHAIN=$(just rust-version)" >> $GITHUB_ENV
echo "RUST_TOOLCHAIN_NIGHTLY=$(just rust-nightly-version)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUST_NIGHTLY_VERSION := $(shell cat rust-toolchain-nightly)
RUST_NIGHTLY_VERSION := $(shell sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain-nightly.toml)
GRCOV_VERSION := 0.8.19

install-nightly:
Expand Down
14 changes: 14 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Fail on early and on unset variables in non-shebang recipes
set shell := ["bash", "-euo", "pipefail", "-c"]
# Allow usage of bash methods to handle multiple arguments and work around quoting issues
set positional-arguments
set quiet

rust_version := `sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain.toml`
rust_nightly_version := `sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain-nightly.toml`

rust-version:
echo '{{rust_version}}'

rust-nightly-version:
echo '{{rust_nightly_version}}'
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

1 change: 0 additions & 1 deletion rust-toolchain-nightly

This file was deleted.

2 changes: 2 additions & 0 deletions rust-toolchain-nightly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "nightly-2024-03-21"
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.77.0"

0 comments on commit a60ef2a

Please sign in to comment.