Skip to content

Commit

Permalink
ci: Improve performance of no-std tests
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Nov 9, 2024
1 parent 00bf52d commit 79dcc27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,9 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@cargo-hack
if: startsWith(matrix.rust, 'nightly')
if: matrix.rust == 'stable'
- uses: taiki-e/install-action@espup
if: startsWith(matrix.rust, 'nightly')
if: matrix.rust == 'stable'
- run: |
retry() {
for i in {1..10}; do
Expand Down Expand Up @@ -645,17 +645,19 @@ jobs:
retry sudo apt-get -o Acquire::Retries=10 -qq update
retry sudo apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends "${apt_packages[@]}"
# APT's qemu package doesn't provide firmware for riscv32: https://packages.ubuntu.com/en/jammy/all/qemu-system-data/filelist
OPENSBI_VERSION=1.5.1 # https://github.com/riscv-software-src/opensbi/releases
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "https://github.com/riscv-software-src/opensbi/releases/download/v${OPENSBI_VERSION}/opensbi-${OPENSBI_VERSION}-rv-bin.tar.xz" \
opensbi_version=1.5.1 # https://github.com/riscv-software-src/opensbi/releases
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "https://github.com/riscv-software-src/opensbi/releases/download/v${opensbi_version}/opensbi-${opensbi_version}-rv-bin.tar.xz" \
| tar xJf -
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"
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"
if [[ "${{ matrix.rust }}" == "nightly"* ]]; then
mkdir -p -- "${HOME}"/msp430-gcc
# https://www.ti.com/tool/MSP430-GCC-OPENSOURCE
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-9.3.1.11_linux64.tar.bz2 \
| tar xjf - --strip-components 1 -C "${HOME}"/msp430-gcc
printf '%s\n' "${HOME}"/msp430-gcc/bin >>"${GITHUB_PATH}"
elif [[ "${{ matrix.rust }}" == "stable" ]]; then
retry espup install --targets esp32s2
fi
env:
Expand All @@ -676,9 +678,9 @@ jobs:
if: startsWith(matrix.rust, 'nightly-')
- run: tools/no-std.sh
- run: tools/build.sh +esp xtensa-esp32s2-none-elf
if: startsWith(matrix.rust, 'nightly')
if: matrix.rust == 'stable'
- run: tools/no-std.sh +esp xtensa-esp32s2-none-elf
if: startsWith(matrix.rust, 'nightly')
if: matrix.rust == 'stable'

miri:
needs: tidy
Expand Down
3 changes: 0 additions & 3 deletions tests/msp430/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[build]
target-dir = "../../target"

[target.'cfg(all(target_arch = "msp430", target_os = "none"))']
# Not in PATH (handled in tools/no-std.sh).
# runner = "mspdebug-test-runner.sh"

0 comments on commit 79dcc27

Please sign in to comment.