Skip to content

Commit

Permalink
Delete rust-toolchain and use Rust 1.49.0
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Jan 5, 2021
1 parent 95f09d4 commit addf991
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 23 deletions.
12 changes: 2 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ jobs:
# All checks on the codebase that can run in parallel to build_library
sanity:
docker:
# We don't use this Rust version but need an image with a Rust environment
- image: circleci/rust:1.47.0-buster
- image: circleci/rust:1.49.0-buster
steps:
- checkout
- run:
name: Install shellcheck
command: sudo apt install shellcheck
- run:
name: Setup Rust toolchain from ./rust-toolchain
command: echo "RUSTUP_TOOLCHAIN=$RUSTUP_TOOLCHAIN" && rustup show
- run:
name: Show version information
command: rustc --version; cargo --version; rustup --version
Expand All @@ -35,13 +31,9 @@ jobs:

build_library:
docker:
# We don't use this Rust version but need an image with a Rust environment
- image: circleci/rust:1.47.0-buster
- image: circleci/rust:1.49.0-buster
steps:
- checkout
- run:
name: Setup Rust toolchain from ./rust-toolchain
command: echo "RUSTUP_TOOLCHAIN=$RUSTUP_TOOLCHAIN" && rustup show
- run:
name: Show version information
command: rustc --version; cargo --version; rustup --version
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ install all this with no problems.

## Toolchain

The Rust toolchain is pinned in the file `rust-toolchain`. It must be in sync with `Dockerfile.cross`
and `Dockerfile.centos7`.
When choosing a version, please use version with clippy, rustfmt and rls available to make Simon happy.
We fix the Rust version in the CI and build containers, so the following should be in sync:

- Mac: https://rust-lang.github.io/rustup-components-history/x86_64-apple-darwin.html
- Linux: https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu.html
- `.circleci/config.yml`
- `builders/Dockerfile.*`

For development you should be able to use any reasonably up-to-date Rust stable.
4 changes: 2 additions & 2 deletions builders/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ RUN set -eux; \

RUN wget "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-musl/rustup-init"
RUN chmod +x rustup-init
RUN ./rustup-init -y --no-modify-path --default-toolchain 1.47.0; rm rustup-init
RUN ./rustup-init -y --no-modify-path --default-toolchain 1.49.0; rm rustup-init
RUN chmod -R a+w $RUSTUP_HOME $CARGO_HOME

# needed for
# /usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory
ENV LIBRARY_PATH=/usr/local/rustup/toolchains/1.47.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib:$LIBRARY_PATH
ENV LIBRARY_PATH=/usr/local/rustup/toolchains/1.49.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib:$LIBRARY_PATH

# prepare go cache dirs
RUN mkdir -p /.cache/go-build
Expand Down
2 changes: 1 addition & 1 deletion builders/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \
RUN url="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"; \
wget "$url"; \
chmod +x rustup-init; \
./rustup-init -y --no-modify-path --default-toolchain 1.47.0; \
./rustup-init -y --no-modify-path --default-toolchain 1.49.0; \
rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup --version; \
Expand Down
4 changes: 1 addition & 3 deletions builders/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# We don't use this Rust version but need an image with a Rust environment
FROM rust:1.49.0-buster

# Install build dependencies
Expand All @@ -16,8 +15,7 @@ ENV LLVM_SYS_80_PREFIX=/usr/lib/llvm-8

WORKDIR /opt

# Pin to proper nightly and add macOS Rust target
RUN rustup default 1.47.0
# Add macOS Rust target
RUN rustup target add x86_64-apple-darwin

# Build osxcross
Expand Down
2 changes: 1 addition & 1 deletion builders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ can do the cross-compilation.

**Version 0004:**

- Update Rust to 1.47.0.
- Update Rust to 1.49.0.
- Alpine: Update Go to 1.15

**Version 0003:**
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

0 comments on commit addf991

Please sign in to comment.