Skip to content

Commit 727df69

Browse files
committed
ci: Clean up workflow file and docker script
1 parent c907a32 commit 727df69

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

.github/workflows/main.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ jobs:
131131
path: /tmp/.buildx-cache
132132
key: ${{ matrix.target }}-buildx-${{ github.sha }}
133133
restore-keys: ${{ matrix.target }}-buildx-
134+
# Configure buildx to use Docker layer caching
135+
- uses: docker/setup-buildx-action@v3
136+
if: matrix.os == 'ubuntu-24.04'
134137

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

158-
# Configure buildx to use Docker layer caching
159-
- uses: docker/setup-buildx-action@v3
160-
if: matrix.os == 'ubuntu-24.04'
161-
162161
# Otherwise we use our docker containers to run builds
163162
- name: Run in Docker
164163
if: matrix.os == 'ubuntu-24.04'
165-
run: cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }}
164+
run: ./ci/run-docker.sh ${{ matrix.target }}
166165

167166
- name: Print test logs if available
168167
if: always()
@@ -193,7 +192,7 @@ jobs:
193192
rustup default nightly
194193
rustup component add clippy
195194
- uses: Swatinem/rust-cache@v2
196-
- run: cargo clippy -- -D clippy::all
195+
- run: cargo clippy --workspace --all-targets
197196

198197
benchmarks:
199198
name: Benchmarks

ci/run-docker.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ set -euxo pipefail
77

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

10+
# Directories and files that do not yet exist need to be created before
11+
# calling docker, otherwise docker will create them but they will be owned
12+
# by root.
13+
mkdir -p target
14+
cargo generate-lockfile
15+
cargo generate-lockfile --manifest-path builtins-test-intrinsics/Cargo.toml
16+
1017
run() {
1118
local target="$1"
1219

@@ -19,12 +26,6 @@ run() {
1926
echo "target is emulated"
2027
fi
2128

22-
# Directories and files that do not yet exist need to be created before
23-
# calling docker, otherwise docker will create them but they will be owned
24-
# by root.
25-
mkdir -p target
26-
cargo generate-lockfile --manifest-path builtins-test-intrinsics/Cargo.toml
27-
2829
run_cmd="HOME=/tmp"
2930

3031
if [ "${GITHUB_ACTIONS:-}" = "true" ]; then

0 commit comments

Comments
 (0)