From c8c96b88b5119f8135e9976c7daefa91795b1916 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 19 Aug 2026 22:29:24 +0100 Subject: [PATCH] ci: use fsfe/reuse-action for REUSE compliance checks Installing reuse via apt requires running apt-get update first, adding ~2 minutes to every CI run. Switch to the official fsfe/reuse-action which runs in a pre-built container, eliminating this overhead. Introduce SKIP_REUSE variable to skip the reuse task in CI since compliance is now verified in a dedicated parallel job. Signed-off-by: Andrei Gherzan --- .github/workflows/release.yml | 15 +++++++++++---- .github/workflows/validate.yml | 14 ++++++++++---- Taskfile.yml | 3 ++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3cfdbe3..7ff0bee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,16 @@ env: BINARY_CHECKSUM_PATH: target/release/gitlance.sha256 jobs: + reuse: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v7 + + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v5 + release: + needs: reuse runs-on: ubuntu-24.04 permissions: contents: write @@ -30,12 +39,10 @@ jobs: - name: Install Task run: sudo snap install --classic task - - name: Install reuse tool - run: sudo apt-get update && sudo apt-get install -y reuse - + # REUSE compliance is checked in a separate job using fsfe/reuse-action - name: Run validation timeout-minutes: 10 - run: task validate + run: task validate SKIP_REUSE=true - name: Build release binary run: cargo build --release --locked diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 61a8a02..2bf5ca8 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -11,6 +11,14 @@ on: branches: [ main ] jobs: + reuse: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v7 + + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v5 + validate: runs-on: ubuntu-24.04 steps: @@ -25,9 +33,7 @@ jobs: - name: Install Task run: sudo snap install --classic task - - name: Install reuse tool - run: sudo apt-get update && sudo apt-get install -y reuse - + # REUSE compliance is checked in a separate job using fsfe/reuse-action - name: Run validation timeout-minutes: 10 - run: task validate + run: task validate SKIP_REUSE=true diff --git a/Taskfile.yml b/Taskfile.yml index 83ff7bf..0da335a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -130,7 +130,8 @@ tasks: cmds: - task: fmt-check - task: lint - - task: reuse + - cmd: task reuse + if: '[ "{{.SKIP_REUSE}}" != "true" ]' - task: coverage validate-fix: