diff options
| author | ruki <[email protected]> | 2025-12-10 23:01:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-10 23:01:01 +0800 |
| commit | 717cb1396d5743b63af026c336ea59b3204f6100 (patch) | |
| tree | a396352ef8598641a80a070eba8ca6a2a948e0ad | |
| parent | 8544bf42ffd28f151504b97c68e2988e443b3f34 (diff) | |
fix cosmocc ci
| -rw-r--r-- | .github/workflows/cosmocc.yml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/.github/workflows/cosmocc.yml b/.github/workflows/cosmocc.yml index cfe9c3303..924a2210c 100644 --- a/.github/workflows/cosmocc.yml +++ b/.github/workflows/cosmocc.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 50%, can be overridden via env) const probability = parseFloat(process.env.RUN_PROBABILITY || '0.5'); - + // 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) { @@ -59,7 +59,7 @@ jobs: if: needs.check.outputs.should-run == 'true' strategy: matrix: - os: [ubuntu-latest, macos-13] + os: [ubuntu-latest, macos-15-intel] arch: [x86_64] runs-on: ${{ matrix.os }} |
