Skip to content

docs: Move atomic operation overview by architecture to its own markd… #2118

docs: Move atomic operation overview by architecture to its own markd…

docs: Move atomic operation overview by architecture to its own markd… #2118

Workflow file for this run

name: CI
permissions:
contents: read
on:
pull_request:
push:
branches:
- main
- dev
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUST_TEST_THREADS: 1
RUSTDOCFLAGS: -D warnings
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
ATOMIC_MAYBE_UNINIT_DENY_WARNINGS: 1
defaults:
run:
shell: bash --noprofile --norc -CeEuxo pipefail {0}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
check-external-types:
uses: taiki-e/github-actions/.github/workflows/check-external-types.yml@main
deny:
uses: taiki-e/github-actions/.github/workflows/deny.yml@main
docs:
uses: taiki-e/github-actions/.github/workflows/docs.yml@main
msrv:
needs: tidy
uses: taiki-e/github-actions/.github/workflows/msrv.yml@main
with:
event_name: ${{ github.event_name }}
tidy:
uses: taiki-e/github-actions/.github/workflows/tidy.yml@main
permissions:
contents: read
pull-requests: write # for gh pr edit --add-assignee
repository-projects: read # for gh pr edit --add-assignee
secrets: inherit
test:
needs: tidy
strategy:
fail-fast: false
matrix:
include:
- rust: '1.59' # LLVM 13
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
- rust: stable
- rust: beta
- rust: nightly
- rust: nightly
flags: -C panic=abort -Z panic_abort_tests
- rust: nightly
flags: -Z codegen-backend=cranelift
- rust: nightly
# target: x86_64-apple-darwin
os: macos-13 # x86_64
- rust: '1.59' # LLVM 13
target: aarch64-apple-darwin
os: macos-latest # AArch64
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: aarch64-apple-darwin
os: macos-latest # AArch64
- rust: stable
target: aarch64-apple-darwin
os: macos-latest # AArch64
- rust: nightly
target: aarch64-apple-darwin
os: macos-latest # AArch64
- rust: '1.59' # LLVM 13
target: aarch64-unknown-linux-gnu
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: aarch64-unknown-linux-gnu
- rust: stable
target: aarch64-unknown-linux-gnu
- rust: nightly
target: aarch64-unknown-linux-gnu
- rust: nightly
target: aarch64-unknown-linux-gnu
flags: -Z codegen-backend=cranelift
- rust: nightly-2021-12-16 # Rust 1.59, LLVM 13 (oldest version we can use stable asm on this target)
target: aarch64_be-unknown-linux-gnu
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version that MaybeUninit register is supported)
target: aarch64_be-unknown-linux-gnu
- rust: nightly-2024-11-07 # TODO: https://github.com/BurntSushi/memchr/pull/162
target: aarch64_be-unknown-linux-gnu
- rust: '1.59' # LLVM 13
target: armv5te-unknown-linux-gnueabi
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: armv5te-unknown-linux-gnueabi
- rust: stable
target: armv5te-unknown-linux-gnueabi
- rust: nightly
target: armv5te-unknown-linux-gnueabi
- rust: '1.59' # LLVM 13
target: arm-unknown-linux-gnueabi
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: arm-unknown-linux-gnueabi
- rust: stable
target: arm-unknown-linux-gnueabi
- rust: nightly
target: arm-unknown-linux-gnueabi
- rust: '1.59' # LLVM 13
target: armv7-unknown-linux-gnueabi
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: armv7-unknown-linux-gnueabi
- rust: stable
target: armv7-unknown-linux-gnueabi
- rust: nightly
target: armv7-unknown-linux-gnueabi
- rust: '1.59' # LLVM 13
target: armv7-unknown-linux-gnueabihf
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: armv7-unknown-linux-gnueabihf
- rust: stable
target: armv7-unknown-linux-gnueabihf
- rust: nightly
target: armv7-unknown-linux-gnueabihf
- rust: nightly-2022-09-16 # Rust 1.65, LLVM 15 (version that this target was added)
target: armeb-unknown-linux-gnueabi
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version that MaybeUninit register is supported)
target: armeb-unknown-linux-gnueabi
- rust: nightly
target: armeb-unknown-linux-gnueabi
- rust: '1.59' # LLVM 13
target: i586-unknown-linux-gnu
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: i586-unknown-linux-gnu
- rust: stable
target: i586-unknown-linux-gnu
- rust: nightly
target: i586-unknown-linux-gnu
- rust: '1.59' # LLVM 13
target: i686-unknown-linux-gnu
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: i686-unknown-linux-gnu
- rust: stable
target: i686-unknown-linux-gnu
- rust: nightly
target: i686-unknown-linux-gnu
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version that MaybeUninit register is supported)
target: hexagon-unknown-linux-musl
- rust: nightly
target: hexagon-unknown-linux-musl
- rust: '1.72' # LLVM 16, inline asm for loongarch has been stabilized in Rust 1.72
target: loongarch64-unknown-linux-gnu
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: loongarch64-unknown-linux-gnu
- rust: stable
target: loongarch64-unknown-linux-gnu
- rust: nightly
target: loongarch64-unknown-linux-gnu
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: mips-unknown-linux-gnu
- rust: nightly
target: mips-unknown-linux-gnu
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: mipsel-unknown-linux-gnu
- rust: nightly
target: mipsel-unknown-linux-gnu
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: mips64-unknown-linux-gnuabi64
- rust: nightly
target: mips64-unknown-linux-gnuabi64
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: mips64el-unknown-linux-gnuabi64
- rust: nightly
target: mips64el-unknown-linux-gnuabi64
- rust: nightly-2023-09-20 # Rust 1.74, LLVM 17 (cannot built with nightly-2023-08-24 due to compiler failure from libc when building std)
target: mipsisa32r6-unknown-linux-gnu
- rust: nightly
target: mipsisa32r6-unknown-linux-gnu
- rust: nightly-2023-09-20 # Rust 1.74, LLVM 17 (cannot built with nightly-2023-08-24 due to compiler failure from libc when building std)
target: mipsisa32r6el-unknown-linux-gnu
- rust: nightly
target: mipsisa32r6el-unknown-linux-gnu
- rust: nightly-2023-09-20 # Rust 1.74, LLVM 17 (cannot built with nightly-2023-08-24 due to compiler failure from libc when building std)
target: mipsisa64r6-unknown-linux-gnuabi64
- rust: nightly
target: mipsisa64r6-unknown-linux-gnuabi64
- rust: nightly-2023-09-20 # Rust 1.74, LLVM 17 (cannot built with nightly-2023-08-24 due to compiler failure from libc when building std)
target: mipsisa64r6el-unknown-linux-gnuabi64
- rust: nightly
target: mipsisa64r6el-unknown-linux-gnuabi64
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: powerpc-unknown-linux-gnu
- rust: nightly
target: powerpc-unknown-linux-gnu
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: powerpc64-unknown-linux-gnu
- rust: nightly
target: powerpc64-unknown-linux-gnu
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: powerpc64le-unknown-linux-gnu
- rust: nightly
target: powerpc64le-unknown-linux-gnu
- rust: nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: riscv32gc-unknown-linux-gnu
- rust: nightly
target: riscv32gc-unknown-linux-gnu
- rust: '1.59' # LLVM 13
target: riscv64gc-unknown-linux-gnu
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: riscv64gc-unknown-linux-gnu
- rust: stable
target: riscv64gc-unknown-linux-gnu
- rust: nightly
target: riscv64gc-unknown-linux-gnu
# TODO: cranelift doesn't support cfg(target_feature): https://github.com/rust-lang/rustc_codegen_cranelift/issues/1400
# - rust: nightly
# target: riscv64gc-unknown-linux-gnu
# flags: -Z codegen-backend=cranelift
# - rust: '1.84' # LLVM 19 (oldest stable version we can use asm on this target)
# target: s390x-unknown-linux-gnu
- rust: nightly-2024-01-05 # Rust 1.77, LLVM 17 (oldest version we can use asm_experimental_arch on this target)
target: s390x-unknown-linux-gnu
- rust: nightly
target: s390x-unknown-linux-gnu
- rust: nightly-2024-11-08 # Rust 1.84, LLVM 19 (oldest version we can use asm_experimental_arch on this target)
target: sparc64-unknown-linux-gnu
- rust: nightly
target: sparc64-unknown-linux-gnu
- rust: '1.59' # LLVM 13
target: thumbv7neon-unknown-linux-gnueabihf
- rust: '1.74' # LLVM 17 (oldest version that MaybeUninit register is supported)
target: thumbv7neon-unknown-linux-gnueabihf
- rust: stable
target: thumbv7neon-unknown-linux-gnueabihf
- rust: nightly
target: thumbv7neon-unknown-linux-gnueabihf
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- run: |
lscpu
# 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
if: startsWith(matrix.os, 'ubuntu') || matrix.os == ''
- run: |
sysctl hw.optional machdep.cpu
# brew install moreutils
if: startsWith(matrix.os, 'macos')
- uses: taiki-e/github-actions/install-rust@main
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@cargo-hack
- uses: taiki-e/install-action@cargo-minimal-versions
- uses: taiki-e/install-action@cargo-careful
if: startsWith(matrix.rust, 'nightly')
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
if: matrix.target != ''
- run: printf '%s\n' "RUSTFLAGS=${RUSTFLAGS} --cfg qemu" >>"${GITHUB_ENV}"
if: matrix.target != '' && !startsWith(matrix.target, 'i686') && !startsWith(matrix.target, 'x86_64') && !startsWith(matrix.os, 'macos')
- run: |
printf '%s\n' "RUSTFLAGS=${RUSTFLAGS} ${{ matrix.flags }}" >>"${GITHUB_ENV}"
printf '%s\n' "RUSTDOCFLAGS=${RUSTDOCFLAGS} ${{ matrix.flags }}" >>"${GITHUB_ENV}"
if: matrix.flags != ''
- run: printf '%s\n' "TARGET=--target=${{ matrix.target }}" >>"${GITHUB_ENV}"
if: matrix.target != '' && !contains(matrix.target, '-darwin')
# TODO: LLVM bug: Undefined temporary symbol error when building std.
- run: printf 'RELEASE=--release\n' >>"${GITHUB_ENV}"
if: startsWith(matrix.target, 'mips-') || startsWith(matrix.target, 'mipsel-')
- run: tools/test.sh -vv ${TARGET:-} ${DOCTEST_XCOMPILE:-} ${BUILD_STD:-} ${RELEASE:-}
# We test doctest only once with the default build conditions because doctest is slow.
# src/tests has extended copies of doctest, so this will not reduce test coverage.
# x86_64 +cmpxchg16b
# macOS is skipped because it is +cmpxchg16b by default
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+cmpxchg16b
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+cmpxchg16b
if: (matrix.target == '' || startsWith(matrix.target, 'x86_64')) && !startsWith(matrix.os, 'macos')
# x86 -sse2
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=-sse2
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=-sse2
if: startsWith(matrix.target, 'i686')
# x86 -x87
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+soft-float,-x87,-mmx
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+soft-float,-x87,-mmx
if: startsWith(matrix.target, 'i586')
# aarch64 +lse
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+lse
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+lse
# macOS is skipped because it is +rcpc,+lse,+lse2 by default
if: startsWith(matrix.target, 'aarch64') && !contains(matrix.target, '-darwin')
# aarch64 +rcpc,+lse,+lse2
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+rcpc,+lse,+lse2
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+rcpc,+lse,+lse2
# macOS is skipped because it is +rcpc,+lse,+lse2 by default
if: startsWith(matrix.target, 'aarch64') && !contains(matrix.target, '-darwin')
# arm v8 little endian
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+v8
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+v8
if: matrix.target == 'armv7-unknown-linux-gnueabi'
# arm v6 with legacy cp15_barrier
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} --cfg atomic_maybe_uninit_use_cp15_barrier
RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg atomic_maybe_uninit_use_cp15_barrier
if: matrix.target == 'arm-unknown-linux-gnueabi'
# arm v7 big endian
# armeb-unknown-linux-gnueabi is v8 by default, use custom target instead
- run: tools/test.sh -vv --tests --target armebv7-unknown-linux-gnueabi -Z build-std ${RELEASE:-}
env:
CARGO_TARGET_ARMEBV7_UNKNOWN_LINUX_GNUEABI_LINKER: armeb-unknown-linux-gnueabi-gcc
CARGO_TARGET_ARMEBV7_UNKNOWN_LINUX_GNUEABI_RUNNER: qemu-armeb
if: startsWith(matrix.rust, 'nightly') && matrix.target == 'armeb-unknown-linux-gnueabi'
# arm v4t
- run: tools/test.sh -vv --tests --target armv4t-unknown-linux-gnueabi -Z build-std ${RELEASE:-}
env:
CARGO_TARGET_ARMV4T_UNKNOWN_LINUX_GNUEABI_LINKER: arm-linux-gnueabi-gcc
CARGO_TARGET_ARMV4T_UNKNOWN_LINUX_GNUEABI_RUNNER: qemu-arm
if: startsWith(matrix.rust, 'nightly') && matrix.target == 'armv5te-unknown-linux-gnueabi'
# powerpc64 pwr7
# powerpc64- (big-endian) is skipped because it is pre-pwr8 by default
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-cpu=pwr7
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-cpu=pwr7
if: startsWith(matrix.target, 'powerpc64le-')
# powerpc64 pwr8
# powerpc64le- (little-endian) is skipped because it is pwr8 by default
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-cpu=pwr8
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-cpu=pwr8
if: startsWith(matrix.target, 'powerpc64-')
# riscv +zabha
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+zabha
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+zabha
QEMU_CPU: max
if: startsWith(matrix.target, 'riscv')
# s390x z196 (arch9)
- run: tools/test.sh -vv --tests ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-cpu=z196
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-cpu=z196
if: startsWith(matrix.target, 's390x')
- run: cargo minimal-versions build --workspace --no-private --detach-path-deps=skip-exact --all-features ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-}
- run: cargo minimal-versions build --workspace --no-private --detach-path-deps=skip-exact --all-features ${TARGET:-} ${BUILD_STD:-} ${RELEASE:-} --direct
# -Z direct-minimal-versions requires Cargo 1.70.
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')))
build:
needs: tidy
strategy:
fail-fast: false
matrix:
rust:
- '1.59'
- stable
- beta
- nightly-2023-08-23 # The last nightly version that doesn't support MaybeUninit registers.
- nightly-2023-08-24 # The oldest nightly version that supports MaybeUninit registers: https://github.com/rust-lang/rust/pull/114790
- nightly
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- uses: taiki-e/github-actions/install-rust@main
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@cargo-hack
- run: tools/build.sh
no-std:
needs: tidy
strategy:
fail-fast: false
matrix:
rust:
- '1.64' # LLVM 14
- stable
- nightly-2023-08-24 # Rust 1.74, LLVM 17 (oldest version that MaybeUninit register is supported)
- nightly
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- uses: taiki-e/github-actions/install-rust@main
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@cargo-hack
if: matrix.rust == 'stable'
- uses: taiki-e/install-action@espup
if: matrix.rust == 'stable'
- run: |
retry() {
for i in {1..10}; do
if "$@"; then
return 0
else
sleep "${i}"
fi
done
"$@"
}
apt_packages=(
qemu-system-arm
qemu-system-misc
)
if [[ "${{ matrix.rust }}" == "nightly"* ]]; then
apt_packages+=(
avr-libc
gcc-avr
simavr
)
if [[ "${{ matrix.rust }}" != "nightly-2023-08-24" ]]; then
apt_packages+=(
libnspr4
mspdebug
)
fi
fi
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" \
| 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"
if [[ "${{ matrix.rust }}" == "nightly"* ]]; then
if [[ "${{ matrix.rust }}" != "nightly-2023-08-24" ]]; then
mkdir -p -- "${HOME}"/{msp430-gcc,sparc-bcc-gcc,tsim}
# 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}"
# https://www.gaisler.com/anonftp/bcc2/bin/
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused https://www.gaisler.com/anonftp/bcc2/bin/bcc-2.3.1-gcc-sparc-linux64.tar.xz \
| tar xJf - --strip-components 1 -C "${HOME}"/sparc-bcc-gcc
printf '%s\n' "${HOME}"/sparc-bcc-gcc/bin >>"${GITHUB_PATH}"
# https://www.gaisler.com/index.php/downloads/simulators
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused https://www.gaisler.com/tsim3/tsim-eval/tsim-eval-3.1.11.tar.gz \
| tar xzf - --strip-components 1 -C "${HOME}"/tsim
printf '%s\n' "${HOME}"/tsim/tsim/linux-x64 >>"${GITHUB_PATH}"
fi
elif [[ "${{ matrix.rust }}" == "stable" ]]; then
retry espup install --targets esp32,esp32s2,esp32s3
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: rm -- tests/avr/rust-toolchain.toml
if: startsWith(matrix.rust, 'nightly-')
- run: tools/no-std.sh
- run: tools/build.sh +esp xtensa-esp32-none-elf xtensa-esp32s2-none-elf xtensa-esp32s3-none-elf
if: matrix.rust == 'stable'
- run: tools/no-std.sh +esp xtensa-esp32-none-elf xtensa-esp32s2-none-elf xtensa-esp32s3-none-elf
if: matrix.rust == 'stable'
valgrind:
needs: tidy
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- uses: taiki-e/github-actions/install-rust@nightly
# - 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
- run: tools/test.sh valgrind -vv
# +cmpxchg16b
- run: tools/test.sh valgrind -vv
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+cmpxchg16b
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+cmpxchg16b
codegen:
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
pull-requests: write # for gh pr edit --add-assignee
repository-projects: read # for gh pr edit --add-assignee
steps:
- uses: taiki-e/checkout-action@v1
- uses: taiki-e/github-actions/install-rust@nightly
- run: tools/target_spec.sh
- id: diff
run: tools/ci/gen.sh
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
- id: create-pull-request
uses: peter-evans/create-pull-request@v7
with:
title: Update generated code
body: |
Auto-generated by CI using [create-pull-request](https://github.com/peter-evans/create-pull-request).
branch: update-generated-code
token: ${{ secrets.CREATE_PR_TOKEN }}
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
- name: Notify PR author by assigning PR
run: gh pr edit --add-assignee taiki-e "${PR_NUMBER:?}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
- run: git add -N . && git diff --exit-code