diff options
| author | ruki <[email protected]> | 2026-02-14 17:39:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-02-14 17:39:50 +0800 |
| commit | e580c6c06087a4181db1bac5edcb5b0a45da51c9 (patch) | |
| tree | 331d3d38ef4825d9672ae8d3a3272a7a5b4102d9 | |
| parent | 021f8144f2686305795b61a90ef040ee98f139ef (diff) | |
fix ci
| -rw-r--r-- | .github/workflows/alpine.yml | 5 | ||||
| -rw-r--r-- | .github/workflows/archlinux.yml | 13 | ||||
| -rw-r--r-- | .github/workflows/dragonflybsd.yml | 5 | ||||
| -rw-r--r-- | .github/workflows/fedora.yml | 5 | ||||
| -rw-r--r-- | .github/workflows/haiku.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/linux_luajit.yml | 5 | ||||
| -rw-r--r-- | .github/workflows/netbsd.yml | 5 | ||||
| -rw-r--r-- | .github/workflows/openbsd.yml | 5 | ||||
| -rw-r--r-- | .github/workflows/windows_luajit.yml | 4 |
9 files changed, 22 insertions, 29 deletions
diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 5bce09441..ba6d3552c 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -63,8 +63,8 @@ jobs: concurrency: # Prevent concurrent runs of the same workflow - group: Alpine-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Alpine + cancel-in-progress: true steps: - name: Prepare build tools run: | @@ -88,4 +88,3 @@ jobs: run: | xmake lua -v -D tests/run.lua xrepo --version - diff --git a/.github/workflows/archlinux.yml b/.github/workflows/archlinux.yml index 7ee73fe47..03118bbb8 100644 --- a/.github/workflows/archlinux.yml +++ b/.github/workflows/archlinux.yml @@ -19,17 +19,17 @@ jobs: script: | const fs = require('fs'); const outputFile = process.env.GITHUB_OUTPUT; - + // Always run for release events if (context.eventName === 'release') { fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } - + // Execution probability (default 20%, can be overridden via env) const probability = parseFloat(process.env.RUN_PROBABILITY || '0.2'); - + // Generate deterministic "random" number based on commit SHA, run ID, and current time // Adding time ensures better randomness while keeping same commit/run consistent const timeSeed = Math.floor(Date.now() / (1000 * 60 * 60)); // Round to hour for consistency @@ -43,7 +43,7 @@ jobs: // Normalize to 0-1 range const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - + // Use environment file instead of deprecated set-output fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { @@ -63,8 +63,8 @@ jobs: concurrency: # Prevent concurrent runs of the same workflow - group: Archlinux-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Archlinux + cancel-in-progress: true steps: - name: Prepare build tools run: | @@ -90,4 +90,3 @@ jobs: run: | xmake lua -v -D tests/run.lua xrepo --version - diff --git a/.github/workflows/dragonflybsd.yml b/.github/workflows/dragonflybsd.yml index b65a22a88..41be4d83e 100644 --- a/.github/workflows/dragonflybsd.yml +++ b/.github/workflows/dragonflybsd.yml @@ -61,8 +61,8 @@ jobs: concurrency: # Prevent concurrent runs of the same workflow - group: DragonflyBSD-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-DragonflyBSD + cancel-in-progress: true steps: - uses: actions/checkout@v2 with: @@ -84,4 +84,3 @@ jobs: xrepo --version xmake l os.meminfo xmake lua -v -D tests/run.lua - diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 1b0ec0304..5666ce932 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -63,8 +63,8 @@ jobs: concurrency: # Prevent concurrent runs of the same workflow - group: Fedora-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Fedora + cancel-in-progress: true steps: - name: Prepare build tools run: | @@ -90,4 +90,3 @@ jobs: run: | xmake lua -v -D tests/run.lua xrepo --version - diff --git a/.github/workflows/haiku.yml b/.github/workflows/haiku.yml index f277d263f..fd1a95eca 100644 --- a/.github/workflows/haiku.yml +++ b/.github/workflows/haiku.yml @@ -53,8 +53,8 @@ jobs: runs-on: ubuntu-latest concurrency: - group: Haiku-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Haiku + cancel-in-progress: true steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/linux_luajit.yml b/.github/workflows/linux_luajit.yml index 36c519245..ccbb96f59 100644 --- a/.github/workflows/linux_luajit.yml +++ b/.github/workflows/linux_luajit.yml @@ -60,8 +60,8 @@ jobs: runs-on: ubuntu-latest concurrency: # Prevent concurrent runs of the same workflow - group: Linux-Luajit-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Linux-Luajit + cancel-in-progress: true steps: - uses: actions/checkout@v2 with: @@ -90,4 +90,3 @@ jobs: run: | xmake lua -v -D tests/run.lua xrepo --version - diff --git a/.github/workflows/netbsd.yml b/.github/workflows/netbsd.yml index bf704048f..f216f8992 100644 --- a/.github/workflows/netbsd.yml +++ b/.github/workflows/netbsd.yml @@ -61,8 +61,8 @@ jobs: concurrency: # Prevent concurrent runs of the same workflow - group: NetBSD-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-NetBSD + cancel-in-progress: true steps: - uses: actions/checkout@v2 with: @@ -85,4 +85,3 @@ jobs: xrepo --version xmake l os.meminfo xmake lua -v -D tests/run.lua - diff --git a/.github/workflows/openbsd.yml b/.github/workflows/openbsd.yml index 1e3cc912a..8c74bdaf1 100644 --- a/.github/workflows/openbsd.yml +++ b/.github/workflows/openbsd.yml @@ -61,8 +61,8 @@ jobs: concurrency: # Prevent concurrent runs of the same workflow - group: OpenBSD-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-OpenBSD + cancel-in-progress: true steps: - uses: actions/checkout@v2 with: @@ -85,4 +85,3 @@ jobs: xrepo --version xmake l os.meminfo xmake lua -v -D tests/run.lua - diff --git a/.github/workflows/windows_luajit.yml b/.github/workflows/windows_luajit.yml index c86d5e0b5..7a26cabaa 100644 --- a/.github/workflows/windows_luajit.yml +++ b/.github/workflows/windows_luajit.yml @@ -66,8 +66,8 @@ jobs: concurrency: # Prevent concurrent runs of the same workflow - group: Windows-Luajit-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}-${{ matrix.os }}-${{ matrix.arch }} - cancel-in-progress: false + group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.os }}-${{ matrix.arch }}-Windows-Luajit + cancel-in-progress: true steps: - uses: actions/checkout@v2 with: |
