Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ jobs:
path: /tmp/.buildx-cache
key: ${{ matrix.target }}-buildx-${{ github.sha }}
restore-keys: ${{ matrix.target }}-buildx-
# Configure buildx to use Docker layer caching
- uses: docker/setup-buildx-action@v3
if: matrix.os == 'ubuntu-24.04'

- name: Cache compiler-rt
id: cache-compiler-rt
Expand All @@ -155,14 +158,10 @@ jobs:
shell: bash
run: ./ci/run.sh ${{ matrix.target }}

# Configure buildx to use Docker layer caching
- uses: docker/setup-buildx-action@v3
if: matrix.os == 'ubuntu-24.04'

# Otherwise we use our docker containers to run builds
- name: Run in Docker
if: matrix.os == 'ubuntu-24.04'
run: cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }}
run: ./ci/run-docker.sh ${{ matrix.target }}

- name: Print test logs if available
if: always()
Expand Down Expand Up @@ -193,7 +192,7 @@ jobs:
rustup default nightly
rustup component add clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -D clippy::all
- run: cargo clippy --workspace --all-targets

benchmarks:
name: Benchmarks
Expand Down
7 changes: 5 additions & 2 deletions .release-plz.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[workspace]
[[package]]
name = "compiler_builtins"
semver_check = false

# As part of the release process, we delete `libm/Cargo.toml`. Since
# this is only run in CI, we shouldn't need to worry about it.
allow_dirty = true
publish_allow_dirty = true

[[package]]
name = "libm"
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"compiler-builtins",
"crates/libm-macros",
"crates/musl-math-sys",
"crates/panic-handler",
"crates/util",
"libm",
"libm-test",
Expand Down
12 changes: 7 additions & 5 deletions ci/miri.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/bin/bash
set -ex
set -eux

# We need Tree Borrows as some of our raw pointer patterns are not
# compatible with Stacked Borrows.
export MIRIFLAGS="-Zmiri-tree-borrows"

# One target that sets `mem-unaligned` and one that does not,
# and a big-endian target.
TARGETS=(x86_64-unknown-linux-gnu
targets=(
x86_64-unknown-linux-gnu
armv7-unknown-linux-gnueabihf
s390x-unknown-linux-gnu)
for TARGET in "${TARGETS[@]}"; do
s390x-unknown-linux-gnu
)
for target in "${targets[@]}"; do
# Only run the `mem` tests to avoid this taking too long.
cargo miri test --manifest-path builtins-test/Cargo.toml --features no-asm --target $TARGET -- mem
cargo miri test --manifest-path builtins-test/Cargo.toml --features no-asm --target "$target" -- mem
done
13 changes: 7 additions & 6 deletions ci/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ set -euxo pipefail

host_arch="$(uname -m | sed 's/arm64/aarch64/')"

# Directories and files that do not yet exist need to be created before
# calling docker, otherwise docker will create them but they will be owned
# by root.
mkdir -p target
cargo generate-lockfile
cargo generate-lockfile --manifest-path builtins-test-intrinsics/Cargo.toml

run() {
local target="$1"

Expand All @@ -19,12 +26,6 @@ run() {
echo "target is emulated"
fi

# Directories and files that do not yet exist need to be created before
# calling docker, otherwise docker will create them but they will be owned
# by root.
mkdir -p target
cargo generate-lockfile --manifest-path builtins-test-intrinsics/Cargo.toml

run_cmd="HOME=/tmp"

if [ "${GITHUB_ACTIONS:-}" = "true" ]; then
Expand Down
Loading