-
Notifications
You must be signed in to change notification settings - Fork 54
build!: bump rust to 1.76 and add rust update script #1693
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
Changes from all commits
a3cf053
c6b14fc
149fb96
84e1568
71c531e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,8 @@ description: "Install dependencies" | |
| inputs: | ||
| toolchain: | ||
| description: Rust toolchain to use, stable / nightly / beta, or exact version | ||
| # The same as in /README.md | ||
| default: "stable" | ||
| # Update using scripts/update-rust-toolchain.sh | ||
| default: "1.76" | ||
| target: | ||
| description: Target Rust platform | ||
| required: false | ||
|
|
@@ -17,7 +17,6 @@ inputs: | |
| description: Enable Rust cache | ||
| required: false | ||
| default: "true" | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you remove new lines? I see it more readable rather then on block of test
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's what I can try to refactor to use multi-line
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, you dynamically update it...
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe just read it from the toolchain file instead of hardcoding? Suggestion from ChatGPT: I would use |
||
| runs: | ||
| using: composite | ||
| steps: | ||
|
|
@@ -28,7 +27,6 @@ runs: | |
| toolchain: ${{ inputs.toolchain }} | ||
| target: ${{ inputs.target }} | ||
| components: ${{ inputs.components }} | ||
|
|
||
| - name: Get protoc arch | ||
| shell: bash | ||
| id: protoc_arch | ||
|
|
@@ -47,7 +45,6 @@ runs: | |
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| # TODO: Move to AMI and build every day | ||
| - name: Install protoc | ||
| id: deps-protoc | ||
|
|
@@ -58,18 +55,15 @@ runs: | |
| unzip /tmp/protoc.zip -d ${HOME}/.local | ||
| echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV | ||
| export PATH="${PATH}:${HOME}/.local/bin" | ||
|
|
||
| - name: Run sccache-cache | ||
| uses: mozilla-actions/sccache-action@v0.0.3 | ||
| with: | ||
| version: "v0.7.1" # Must be the same as in Dockerfile | ||
| if: inputs.cache == 'true' | ||
|
|
||
| - name: Hash ref_name | ||
| id: hashed-ref-name | ||
| shell: bash | ||
| run: echo "key=$(echo '${{ github.ref_name }}' | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache cargo registry (S3 bucket cache) | ||
| uses: strophy/actions-cache@opendal-update | ||
| if: inputs.cache == 'true' | ||
|
|
@@ -84,7 +78,6 @@ runs: | |
| restore-keys: | | ||
| ${{ runner.os }}/cargo/registry/${{ hashFiles('**/Cargo.lock') }} | ||
| ${{ runner.os }}/cargo/registry/ | ||
|
|
||
| # TODO: Move to AMI and build every day | ||
| - name: Install clang | ||
| id: deps-clang | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,8 @@ authors = [ | |
| "Ivan Shumkov <shumkov@dash.org>", | ||
| ] | ||
| edition = "2021" | ||
| rust-version = "1.73" | ||
| # Update using scripts/update-rust-toolchain.sh | ||
| rust-version = "1.76" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we set it here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand the question. The rust-version field is an optional key that tells cargo what version of the Rust language and compiler your package can be compiled with. As we only test on 1.76, we only support this version onwards.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I've never seen such an option, and since it's a minimal value then it's all good. |
||
| license = "MIT" | ||
|
|
||
| [features] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| [toolchain] | ||
| # Rust version the same as in /README.md | ||
| channel = "stable" | ||
|
|
||
| # Update using scripts/update-rust-toolchain.sh | ||
| channel = "1.76" | ||
|
|
||
| targets = ["wasm32-unknown-unknown"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it's using toolchain file if not set?