Skip to content

Commit 4392f1c

Browse files
committed
Adds a 'ci/validate-linux' command to use a docker container to run ci/validate in linux env
1 parent 189d9d9 commit 4392f1c

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

ci/Dockerfile.validate

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM rust:1.85-bookworm
2+
3+
# Install protobuf compiler (required by Cross.toml), shellcheck (for ci/validate), and libfuse (for fuser crate)
4+
RUN apt-get update && apt-get install -y \
5+
protobuf-compiler \
6+
shellcheck \
7+
libfuse3-dev \
8+
pkg-config \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
# Install nextest for testing
12+
RUN curl -LsSf https://get.nexte.st/latest/linux-musl | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
13+
14+
WORKDIR /workspace
15+
16+
# Copy over the source
17+
COPY . .
18+
19+
# Run validation
20+
CMD ["bash", "-c", "ci/validate"]

ci/validate-linux

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -o errexit
3+
set -o nounset
4+
set -o pipefail
5+
6+
# Build the validation Docker image
7+
echo "Building Linux validation environment..."
8+
docker build -f ./ci/Dockerfile.validate -t lading-validate .
9+
10+
# Run validation in the container
11+
echo "Running validation in Linux container..."
12+
docker run --rm -v "$(pwd):/workspace" lading-validate
13+
14+
echo "Linux validation passed!"

0 commit comments

Comments
 (0)