Remove toolchain setup steps from our GitHub Actions workflows. Rustup will not automatically install the correct targets, so we no longer need the `rustup target add` steps. After this, the `actions-rs/toolchain` step doesn't give us much, and is currently broken (https://github.com/actions-rs/toolchain/issues/126), so I removed that step as well.
diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 527e418..94a8b10 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml
@@ -10,16 +10,8 @@ - name: Checkout repository uses: actions/checkout@v2 - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - - name: Install dependencies run: | - rustup target add thumbv7em-none-eabi - rustup target add riscv32imac-unknown-none-elf - rustup target add riscv32imc-unknown-none-elf cargo install elf2tab --version 0.4.0 - name: Build Hello World
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad0738e..5bdae5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml
@@ -31,15 +31,6 @@ with: submodules: true - # Install a Rust toolchain with the components necessary to build - # libtock-rs and its examples. This action doesn't seem to be able to - # install toolchains for multiple targets, so I add the targets later in - # the "Build and Test" step. - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - # The main test step. We let the makefile do most of the work because the # makefile can be tested locally. We experimentally determined that -j2 is # optimal for the Azure Standard_DS2_v2 VM, which is the VM type used by @@ -47,6 +38,5 @@ - name: Build and Test run: | cd "${GITHUB_WORKSPACE}" - rustup target add riscv32imc-unknown-none-elf thumbv7em-none-eabi make -j2 setup make -j2 test
diff --git a/.github/workflows/size-diff.yml b/.github/workflows/size-diff.yml index 2c3b597..7a8e010 100644 --- a/.github/workflows/size-diff.yml +++ b/.github/workflows/size-diff.yml
@@ -29,15 +29,6 @@ - name: Clone repository uses: actions/checkout@v2.3.0 - # Install a Rust toolchain with the components necessary to run - # `print-sizes`. This action doesn't seem to be able to install toolchains - # for multiple targets, so I add the targets later in the "size report" - # step. - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1.0.6 - with: - profile: minimal - # The main diff script. Stores the sizes of the example binaries for both # the merge commit and the target branch. We display the diff in a # separate step to make it easy to navigate to in the GitHub Actions UI. @@ -46,13 +37,11 @@ UPSTREAM_REMOTE_NAME="${UPSTREAM_REMOTE_NAME:-origin}" GITHUB_BASE_REF="${GITHUB_BASE_REF:-master}" cd "${GITHUB_WORKSPACE}" - rustup target add riscv32imc-unknown-none-elf thumbv7em-none-eabi make -j2 examples # The VM this runs on has 2 logical cores. cargo run --release -p print_sizes >'${{runner.temp}}/merge-sizes' git remote set-branches "${UPSTREAM_REMOTE_NAME}" "${GITHUB_BASE_REF}" git fetch --depth=1 "${UPSTREAM_REMOTE_NAME}" "${GITHUB_BASE_REF}" git checkout "${UPSTREAM_REMOTE_NAME}/${GITHUB_BASE_REF}" - rustup target add riscv32imc-unknown-none-elf thumbv7em-none-eabi make -j2 examples cargo run --release -p print_sizes >'${{runner.temp}}/base-sizes'