Workaround rustup 1.28 (#96)
Test / build (push) Failing after 14s
Test / build (push) Failing after 14s
* Add test for rust-toolchain.toml * Always install * Fix test * Ugh * Fix test
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
[licenses]
|
||||
allow = ["Unicode-DFS-2016", "MIT", "Apache-2.0"]
|
||||
allow = ["Unicode-3.0", "MIT", "Apache-2.0"]
|
||||
|
||||
@@ -38,12 +38,16 @@ jobs:
|
||||
check \
|
||||
""
|
||||
|
||||
# Ensures the action in the PR still works
|
||||
# test:
|
||||
# runs-on: ubuntu-22.04
|
||||
# if: github.event_name == 'pull_request'
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - uses: EmbarkStudios/cargo-deny-action@prep-release # change branch name to PR branch if you are changing it
|
||||
# # with:
|
||||
# # manifest-path: test/Cargo.toml
|
||||
- name: Run check w/rust-toolchain.toml
|
||||
run: |
|
||||
mv ./test/rt.toml ./rust-toolchain.toml
|
||||
docker run -v $PWD:/test test-cargo-deny \
|
||||
"" \
|
||||
"" \
|
||||
"" \
|
||||
"" \
|
||||
"false" \
|
||||
--log-level warn \
|
||||
--manifest-path test/Cargo.toml \
|
||||
check \
|
||||
""
|
||||
@@ -1,6 +1,7 @@
|
||||
[package]
|
||||
name = "root"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
openssl = "0.10"
|
||||
|
||||
+10
-22
@@ -1,22 +1,14 @@
|
||||
#!/bin/sh -l
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
PATH=$PATH:/usr/local/cargo/bin
|
||||
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
if [ -n "$1" ]; then
|
||||
rustup set profile minimal
|
||||
rustup default "$1"
|
||||
else
|
||||
# Ensure active toolchain is installed if explicit rust-version is not passed.
|
||||
# Starting with v1.28, rustup is not going to install active toolchain by default,
|
||||
# and this is needed to install the active toolchain if it's not installed.
|
||||
# See https://blog.rust-lang.org/2025/03/02/Rustup-1.28.0.html#whats-new-in-rustup-1280
|
||||
rustup show active-toolchain || rustup toolchain install
|
||||
fi
|
||||
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
if [ -n "$2" ]; then
|
||||
git config --global credential.helper store
|
||||
git config --global --replace-all url.https://github.com/.insteadOf ssh://[email protected]/
|
||||
git config --global --add url.https://github.com/.insteadOf [email protected]:
|
||||
@@ -25,35 +17,31 @@ then
|
||||
chmod 600 "$HOME/.git-credentials"
|
||||
fi
|
||||
|
||||
if [ -n "$3" ]
|
||||
then
|
||||
if [ -n "$3" ]; then
|
||||
mkdir -p "/root/.ssh"
|
||||
chmod 0700 "/root/.ssh"
|
||||
echo "${3}" > "/root/.ssh/id_rsa"
|
||||
chmod 0600 "/root/.ssh/id_rsa"
|
||||
fi
|
||||
|
||||
if [ -n "$4" ]
|
||||
then
|
||||
if [ -n "$4" ]; then
|
||||
mkdir -p "/root/.ssh"
|
||||
chmod 0700 "/root/.ssh"
|
||||
echo "${4}" > "/root/.ssh/known_hosts"
|
||||
chmod 0600 "/root/.ssh/known_hosts"
|
||||
fi
|
||||
|
||||
if [ -n "$5" ]
|
||||
then
|
||||
if [ -n "$5" ]; then
|
||||
export CARGO_NET_GIT_FETCH_WITH_CLI="$5"
|
||||
fi
|
||||
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift 5
|
||||
|
||||
# Due to how github actions run containers we need to explicitly force colors
|
||||
# as TTY detection fails inside them
|
||||
export CARGO_TERM_COLOR="always"
|
||||
|
||||
# Workaround for rustup 1.28 completely breaking rust-toolchain.toml
|
||||
(cd "$(dirname "$4")"; rustup show || rustup toolchain install)
|
||||
|
||||
cargo-deny $*
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[toolchain]
|
||||
channel = "nightly-2025-01-03"
|
||||
components = ["rustfmt", "clippy"]
|
||||
Reference in New Issue
Block a user