ci: accecelerate pipeline (#2078)

* enable concurrency

pr

* do not run build on draft PRs

pr

* enable fail-fast for build workflows
This commit is contained in:
Luna Yao
2026-04-08 02:43:03 +02:00
committed by GitHub
parent 371b4b70a3
commit 26b1794723
9 changed files with 43 additions and 12 deletions
+7 -2
View File
@@ -5,6 +5,11 @@ on:
branches: ["develop", "main", "releases/**"] branches: ["develop", "main", "releases/**"]
pull_request: pull_request:
branches: ["develop", "main"] branches: ["develop", "main"]
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@@ -21,7 +26,7 @@ jobs:
# Map a step output to a job output # Map a step output to a job output
outputs: outputs:
# do not skip push on branch starts with releases/ # do not skip push on branch starts with releases/
should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }}
steps: steps:
- id: skip_check - id: skip_check
uses: fkirc/skip-duplicate-actions@v5 uses: fkirc/skip-duplicate-actions@v5
@@ -51,7 +56,7 @@ jobs:
easytier-web/frontend/dist/* easytier-web/frontend/dist/*
build: build:
strategy: strategy:
fail-fast: false fail-fast: true
matrix: matrix:
include: include:
- TARGET: aarch64-unknown-linux-musl - TARGET: aarch64-unknown-linux-musl
+7 -2
View File
@@ -5,6 +5,11 @@ on:
branches: ["develop", "main", "releases/**"] branches: ["develop", "main", "releases/**"]
pull_request: pull_request:
branches: ["develop", "main"] branches: ["develop", "main"]
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@@ -20,7 +25,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Map a step output to a job output # Map a step output to a job output
outputs: outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }}
steps: steps:
- id: skip_check - id: skip_check
uses: fkirc/skip-duplicate-actions@v5 uses: fkirc/skip-duplicate-actions@v5
@@ -32,7 +37,7 @@ jobs:
paths: '["Cargo.toml", "Cargo.lock", "easytier/**", "easytier-gui/**", ".github/workflows/gui.yml", ".github/workflows/install_rust.sh", ".github/workflows/install_gui_dep.sh", "easytier-web/frontend-lib/**"]' paths: '["Cargo.toml", "Cargo.lock", "easytier/**", "easytier-gui/**", ".github/workflows/gui.yml", ".github/workflows/install_rust.sh", ".github/workflows/install_gui_dep.sh", "easytier-web/frontend-lib/**"]'
build-gui: build-gui:
strategy: strategy:
fail-fast: false fail-fast: true
matrix: matrix:
include: include:
- TARGET: aarch64-unknown-linux-musl - TARGET: aarch64-unknown-linux-musl
+7 -2
View File
@@ -5,6 +5,11 @@ on:
branches: ["develop", "main", "releases/**"] branches: ["develop", "main", "releases/**"]
pull_request: pull_request:
branches: ["develop", "main"] branches: ["develop", "main"]
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@@ -20,7 +25,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Map a step output to a job output # Map a step output to a job output
outputs: outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }}
steps: steps:
- id: skip_check - id: skip_check
uses: fkirc/skip-duplicate-actions@v5 uses: fkirc/skip-duplicate-actions@v5
@@ -32,7 +37,7 @@ jobs:
paths: '["Cargo.toml", "Cargo.lock", "easytier/**", "easytier-gui/**", "tauri-plugin-vpnservice/**", ".github/workflows/mobile.yml", ".github/workflows/install_rust.sh"]' paths: '["Cargo.toml", "Cargo.lock", "easytier/**", "easytier-gui/**", "tauri-plugin-vpnservice/**", ".github/workflows/mobile.yml", ".github/workflows/install_rust.sh"]'
build-mobile: build-mobile:
strategy: strategy:
fail-fast: false fail-fast: true
matrix: matrix:
include: include:
- TARGET: android - TARGET: android
+6
View File
@@ -8,12 +8,18 @@ on:
- "flake.lock" - "flake.lock"
pull_request: pull_request:
branches: ["main", "develop"] branches: ["main", "develop"]
types: [opened, synchronize, reopened, ready_for_review]
paths: paths:
- "**/*.nix" - "**/*.nix"
- "flake.lock" - "flake.lock"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs: jobs:
check-full-shell: check-full-shell:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
+7 -1
View File
@@ -8,8 +8,13 @@ on:
- '!*-pre' - '!*-pre'
pull_request: pull_request:
branches: ["develop", "main"] branches: ["develop", "main"]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch: workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@@ -20,6 +25,7 @@ defaults:
jobs: jobs:
cargo_fmt_check: cargo_fmt_check:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
@@ -35,7 +41,7 @@ jobs:
# Map a step output to a job output # Map a step output to a job output
outputs: outputs:
# do not skip push on branch starts with releases/ # do not skip push on branch starts with releases/
should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }}
steps: steps:
- id: skip_check - id: skip_check
uses: fkirc/skip-duplicate-actions@v5 uses: fkirc/skip-duplicate-actions@v5
+4
View File
@@ -6,6 +6,10 @@ on:
pull_request: pull_request:
branches: [ "develop", "main" ] branches: [ "develop", "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
# RUSTC_WRAPPER: "sccache" # RUSTC_WRAPPER: "sccache"
+1 -1
View File
@@ -19,7 +19,7 @@ on:
- "**/Cargo.toml" - "**/Cargo.toml"
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
+1 -1
View File
@@ -17,7 +17,7 @@ on:
- "**/Cargo.toml" - "**/Cargo.toml"
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
+1 -1
View File
@@ -9,7 +9,7 @@ on:
- main - main
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs: