Skip to content

Commit

Permalink
Use rust-toolchain instead
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Jan 18, 2022
1 parent 36c392b commit 6feb915
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hfuzz_workspace/
*.stdout-e
tests/perfs/*-result.json
docker/build-tool/dev_setup.sh
docker/build-tool/rust-toolchain.toml
docker/build-tool/rust-toolchain

# python
venv/
Expand Down
2 changes: 1 addition & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ header:
- "**/*.md"
- "**/*.json"
- "**/*.sql"
- "rust-toolchain.toml"
- "rust-toolchain"
- "rustfmt.toml"
- "**/*.proto"
- ".cargo"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ perf-tool: build-perf-tool
docker buildx build . -f ./docker/perf-tool/Dockerfile --platform linux/amd64 --allow network.host --builder host -t ${HUB}/perf-tool:${TAG} --push
# used for the build of dev container
dev-container:
cp ./rust-toolchain.toml ./docker/build-tool
cp ./rust-toolchain ./docker/build-tool
docker build ./docker/build-tool -t ${HUB}/dev-container:${TAG} -f ./docker/build-tool/Dockerfile
profile:
bash ./scripts/ci/ci-run-profile.sh
Expand Down
4 changes: 2 additions & 2 deletions docker/build-tool/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:buster
COPY ./dev_setup.sh /build_setup.sh
COPY ./rust-toolchain.toml /rust-toolchain.toml
COPY ./rust-toolchain /rust-toolchain
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \
apt-get install -yq \
Expand Down Expand Up @@ -37,7 +37,7 @@ ENV RUSTUP_HOME=/opt/rust/rustup \
RUN curl https://sh.rustup.rs -sSf |\
env CARGO_HOME=/opt/rust/cargo \
sh -s -- -y --default-toolchain stable --profile minimal --no-modify-path && \
export RUST_VERSION="$(awk -F'[ ="]+' '$1 == "channel" { print $2 }' /rust-toolchain.toml)" && \
export RUST_VERSION="$(awk -F'[ ="]+' '$1 == "channel" { print $2 }' /rust-toolchain)" && \
env CARGO_HOME=/opt/rust/cargo rustup install $RUST_VERSION && \
env CARGO_HOME=/opt/rust/cargo rustup set profile minimal && \
env CARGO_HOME=/opt/rust/cargo rustup component add rustfmt rust-src clippy miri --toolchain $RUST_VERSION && \
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/setup/dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ if [[ "$INSTALL_BUILD_TOOLS" == "false" ]] &&
INSTALL_BUILD_TOOLS="true"
fi

if [ ! -f rust-toolchain.toml ]; then
if [ ! -f rust-toolchain ]; then
echo "Unknown location. Please run this from the databend repository. Abort."
exit 1
fi
Expand Down Expand Up @@ -343,7 +343,7 @@ if [[ "$INSTALL_BUILD_TOOLS" == "true" ]]; then

install_rustup "$BATCH_MODE"

install_toolchain "$(awk -F'[ ="]+' '$1 == "channel" { print $2 }' rust-toolchain.toml)"
install_toolchain "$(awk -F'[ ="]+' '$1 == "channel" { print $2 }' rust-toolchain)"

install_pkg lcov "$PACKAGE_MANAGER"
fi
Expand Down

0 comments on commit 6feb915

Please sign in to comment.