Skip to content

Commit 58db05f

Browse files
bors[bot]Bromeon
andauthored
Merge #969
969: CI: replace unmaintained actions-rs toolchain with manual installation r=Bromeon a=Bromeon Also move env variables to composite action. bors r+ Co-authored-by: Jan Haller <bromeon@gmail.com>
2 parents 2dc480a + 2e21854 commit 58db05f

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

.github/composite/rust/action.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,29 @@ inputs:
1919
runs:
2020
using: "composite"
2121
steps:
22-
- uses: actions-rs/toolchain@v1
23-
with:
24-
profile: minimal
25-
toolchain: ${{ inputs.rust }}
26-
override: true # use selected toolchain for remainder of this step
27-
components: ${{ inputs.components }}
22+
- name: "Configure"
23+
id: configure
24+
run: |
25+
echo "components=$( for c in ${cs//,/ }; do echo -n ' --component' $c; done )" >> $GITHUB_OUTPUT
26+
env:
27+
cs: ${{ inputs.components }}
28+
shell: bash
29+
30+
- name: "Rustup"
31+
run: |
32+
rustup toolchain install ${{ inputs.rust }} --profile minimal --no-self-update ${{ steps.configure.outputs.components }}
33+
rustup default ${{ inputs.rust }}
34+
shell: bash
2835

29-
# For notes about the cache, see 'Full CI' workflow
3036
- uses: Swatinem/rust-cache@v2
3137
with:
3238
shared-key: ${{ inputs.cache-key }}
39+
40+
- name: "Set environment variables used by toolchain"
41+
run: |
42+
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
43+
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
44+
echo RUST_BACKTRACE=1 >> $GITHUB_ENV
45+
46+
rustc --version --verbose
47+
shell: bash

.github/workflows/full-ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@
2525
name: Full CI
2626

2727
env:
28-
# Environment variables used by toolchain
29-
CARGO_TERM_COLOR: always
30-
CARGO_INCREMENTAL: 0
31-
RUST_BACKTRACE: 1
32-
3328
# Local variables
3429
# Note: using variables is limited at the moment, see https://github.com/actions/runner/issues/480
3530
GDRUST_FEATURES: "gdnative/async,gdnative/serde,gdnative_bindings_generator/debug"

.github/workflows/minimal-ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
name: Minimal CI
66

77
env:
8-
# Environment variables used by toolchain
9-
CARGO_TERM_COLOR: always
10-
CARGO_INCREMENTAL: 0
11-
RUST_BACKTRACE: 1
12-
138
# Local variables
149
# Note: using variables is limited at the moment, see https://github.com/actions/runner/issues/480
1510
GODOT_VER: "3.5.1-stable"

0 commit comments

Comments
 (0)