From 2c077d9a8c9351ca9a33bbe4ac558b37a4d7a377 Mon Sep 17 00:00:00 2001 From: Malte Janduda Date: Sat, 9 Nov 2024 16:14:20 +0100 Subject: [PATCH] fixing clippy toolchain --- .cargo/config.toml | 8 ++++++++ .github/workflows/lint.yaml | 10 ++++------ .github/workflows/test.yaml | 7 +++++-- Makefile | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..f71c4e4 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,8 @@ +[build] +target = "x86_64-unknown-linux-musl" + +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-musl-gcc" + +[target.x86_64-unknown-linux-musl] +linker = "x86_64-linux-musl-gcc" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index d6f05c0..b7b52c8 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,13 +10,11 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 - - name: Install Protobuf Compiler - run: sudo apt-get update && sudo apt-get install protobuf-compiler -y + - name: Install Protobuf Compiler and Musl + run: sudo apt-get update && sudo apt-get install musl-tools musl-dev protobuf-compiler -y - name: Install Rust Toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt, clippy + run: rustup component add clippy && rustup component add rustfmt && rustup target add x86_64-unknown-linux-musl - name: Set up cargo cache uses: actions/cache@v4 @@ -35,4 +33,4 @@ jobs: run: cargo fmt --check - name: Clippy - run: cargo clippy -- -D warnings \ No newline at end of file + run: cargo clippy -- -D warnings diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b7c8c1a..2a7500d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,8 +10,11 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 - - name: Install Protobuf Compiler - run: sudo apt-get update && sudo apt-get install protobuf-compiler -y + - name: Install Protobuf Compiler and Musl + run: sudo apt-get update && sudo apt-get install musl-tools musl-dev protobuf-compiler -y + + - name: Install Rust Toolchain + run: rustup component add clippy && rustup component add rustfmt && rustup target add x86_64-unknown-linux-musl - name: Set up cargo cache uses: actions/cache@v4 diff --git a/Makefile b/Makefile index 36e31de..76d4b5d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ clippy: - cargo clippy + cargo clippy --target=x86_64-unknown-linux-musl --all all: clippy cargo build --target=x86_64-unknown-linux-musl --all