Skip to content

Commit

Permalink
ci: Use taiki-e/github-actions/install-rust action
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 28, 2024
1 parent d57150e commit 66b25f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,11 @@ jobs:
# - run: |
# C:/msys64/usr/bin/pacman -S --noconfirm moreutils
# if: startsWith(matrix.os, 'windows')
- name: Install Rust
run: rustup toolchain add "${{ matrix.rust }}" --no-self-update && rustup default "${{ matrix.rust }}"
- uses: taiki-e/github-actions/install-rust@main
with:
toolchain: ${{ matrix.rust }}
- run: rustup toolchain add nightly --no-self-update
if: startsWith(matrix.rust, '1.5') || startsWith(matrix.rust, '1.6') || startsWith(matrix.rust, 'nightly-2021') || startsWith(matrix.rust, 'nightly-2022') || startsWith(matrix.rust, 'nightly-2023')
- uses: taiki-e/install-action@cargo-hack
- uses: taiki-e/install-action@cargo-minimal-versions
- uses: taiki-e/install-action@cargo-careful
Expand Down Expand Up @@ -546,8 +548,9 @@ jobs:
- uses: taiki-e/checkout-action@v1
- uses: taiki-e/github-actions/free-device-space@main
if: matrix.target-group == ''
- name: Install Rust
run: rustup toolchain add "${{ matrix.rust }}" --no-self-update && rustup default "${{ matrix.rust }}"
- uses: taiki-e/github-actions/install-rust@main
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@cargo-hack
- run: tools/build.sh
env:
Expand Down Expand Up @@ -584,8 +587,9 @@ jobs:
sudo mv -- "opensbi-${OPENSBI_VERSION}-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin" /usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.bin
sudo mv -- "opensbi-${OPENSBI_VERSION}-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.elf" /usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf
rm -rf -- "opensbi-${OPENSBI_VERSION}-rv-bin"
- name: Install Rust
run: rustup toolchain add "${{ matrix.rust }}" --no-self-update && rustup default "${{ matrix.rust }}"
- uses: taiki-e/github-actions/install-rust@main
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@cargo-hack
if: startsWith(matrix.rust, 'nightly')
- uses: taiki-e/install-action@espup
Expand Down Expand Up @@ -631,8 +635,7 @@ jobs:
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup toolchain add nightly --no-self-update && rustup default nightly
- uses: taiki-e/github-actions/install-rust@nightly
- uses: taiki-e/install-action@cargo-hack
# - run: sudo apt-get -o Acquire::Retries=10 -qq update && sudo apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends moreutils
- run: printf '%s\n' "TARGET=--target=${{ matrix.target }}" >>"${GITHUB_ENV}"
Expand All @@ -655,8 +658,7 @@ jobs:
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup toolchain add nightly --no-self-update && rustup default nightly
- uses: taiki-e/github-actions/install-rust@nightly
# https://github.com/google/sanitizers/issues/1716 / https://github.com/actions/runner-images/issues/9491
- run: sudo sysctl vm.mmap_rnd_bits=28
- uses: taiki-e/install-action@cargo-hack
Expand Down Expand Up @@ -690,8 +692,7 @@ jobs:
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup toolchain add nightly --no-self-update && rustup default nightly
- uses: taiki-e/github-actions/install-rust@nightly
- uses: taiki-e/install-action@cargo-hack
# - run: sudo apt-get -o Acquire::Retries=10 -qq update && sudo apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends moreutils
- uses: taiki-e/install-action@valgrind
Expand All @@ -713,8 +714,9 @@ jobs:
repository-projects: read # for gh pr edit --add-assignee
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup toolchain add nightly --no-self-update --component rustfmt && rustup default nightly
- uses: taiki-e/github-actions/install-rust@nightly
with:
component: rustfmt
- run: tools/no_atomic.sh
- run: tools/gen.sh
- id: diff
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jobs:
contents: write
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update stable --no-self-update
- uses: taiki-e/github-actions/install-rust@stable
- run: cargo package
- uses: taiki-e/create-gh-release-action@v1
with:
Expand Down

0 comments on commit 66b25f8

Please sign in to comment.