Skip to content

Commit

Permalink
Remove toolchain setup steps from our GitHub Actions workflows.
Browse files Browse the repository at this point in the history
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 (actions-rs/toolchain#126), so I removed that step as well.
  • Loading branch information
jrvanwhy authored and alistair23 committed Dec 11, 2020
1 parent ba262d5 commit cf02e5e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/[email protected]
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
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,12 @@ jobs:
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/[email protected]
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
# GitHub Actions at the time of this writing.
- name: Build and Test
run: |
cd "${GITHUB_WORKSPACE}"
rustup target add riscv32imc-unknown-none-elf thumbv7em-none-eabi
make -j2 setup
make -j2 test
11 changes: 0 additions & 11 deletions .github/workflows/size-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ jobs:
- name: Clone repository
uses: actions/[email protected]

# 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/[email protected]
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.
Expand All @@ -46,13 +37,11 @@ jobs:
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'
Expand Down

0 comments on commit cf02e5e

Please sign in to comment.