From 19d8913e3242b0ab0836764359ff55f4f6f0b90a Mon Sep 17 00:00:00 2001 From: konstin Date: Tue, 25 Apr 2023 21:54:53 -0600 Subject: [PATCH] Use musl in ecosystem docker (#3998) This prevents errors when the host glibc is newer than the one in the docker container --- .github/workflows/{ruff.yaml => release.yaml} | 0 scripts/Dockerfile.ecosystem | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) rename .github/workflows/{ruff.yaml => release.yaml} (100%) diff --git a/.github/workflows/ruff.yaml b/.github/workflows/release.yaml similarity index 100% rename from .github/workflows/ruff.yaml rename to .github/workflows/release.yaml diff --git a/scripts/Dockerfile.ecosystem b/scripts/Dockerfile.ecosystem index 91570fa10d..89198d79d8 100644 --- a/scripts/Dockerfile.ecosystem +++ b/scripts/Dockerfile.ecosystem @@ -6,9 +6,14 @@ # Either download https://github.com/akx/ruff-usage-aggregate/blob/master/data/known-github-tomls.jsonl as # `github_search.jsonl` or follow the instructions in the README to scrape your own dataset. # +# Setup: +# ``` +# apt-get install musl-tools # or corresponding command to install musl on your platform, e.g. `yay musl` +# rustup target add x86_64-unknown-linux-musl +# ``` # From the project root: # ``` -# cargo build +# cargo build --target x86_64-unknown-linux-musl # docker buildx build -f scripts/Dockerfile.ecosystem -t ruff-ecosystem-checker --load . # docker run --rm ruff-ecosystem-checker # ``` @@ -17,6 +22,6 @@ FROM python:3.11 RUN python -m venv .venv && .venv/bin/pip install ruff ADD scripts/check_ecosystem.py check_ecosystem.py ADD github_search.jsonl github_search.jsonl -ADD target/debug/ruff ruff-new +ADD target/x86_64-unknown-linux-musl/debug/ruff ruff-new CMD ["python", "check_ecosystem.py", "--verbose", "--projects", "github_search.jsonl", "ruff-new", ".venv/bin/ruff"]