From 204aa14a2ad83644a5db7d939990ce03e0ff6e6c Mon Sep 17 00:00:00 2001 From: Yoshihiro OKUMURA Date: Fri, 17 Apr 2026 20:58:43 +0900 Subject: [PATCH] ci: use container images instead of installing Rust at runtime Switch to pre-built container images to avoid installing Rust on every CI run: - build-linux-x86_64: rust:latest (add x86_64-unknown-linux-musl target) - build-linux-aarch64: messense/rust-musl-cross:aarch64-musl (cross-compiler pre-installed, no Docker-in-Docker needed) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitea/workflows/release.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7d94b7c..c7e0e51 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -8,16 +8,13 @@ on: jobs: build-linux-x86_64: runs-on: ubuntu-latest + container: rust:latest steps: - uses: actions/checkout@v4 - - name: Install Rust stable - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable - echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - name: Add musl target run: rustup target add x86_64-unknown-linux-musl - name: Install musl tools - run: sudo apt-get update && sudo apt-get install -y musl-tools + run: apt-get update && apt-get install -y musl-tools - name: Build run: cargo build --release --target x86_64-unknown-linux-musl - name: Create archive @@ -35,16 +32,11 @@ jobs: build-linux-aarch64: runs-on: ubuntu-latest + container: messense/rust-musl-cross:aarch64-musl steps: - uses: actions/checkout@v4 - - name: Install Rust stable - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable - echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - - name: Install cross - run: cargo install cross --locked - name: Build - run: cross build --release --target aarch64-unknown-linux-musl + run: cargo build --release --target aarch64-unknown-linux-musl - name: Create archive run: | VERSION=${GITHUB_REF_NAME#v}