mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
## Summary - run independent setup, cache, artifact, and release preparation steps in parallel - keep producer/consumer chains and shared-cache operations sequential - apply grouping-only changes across CI, maintenance, and release workflows - pin security-action v1.0.9 and restrict GitHub App tokens to required permissions - use dedicated `$/.github/...` references for local actions and workflows ## CI timing Measured from GitHub job timestamps on 2026-10-09. Setup-stage comparisons are used where the test workload differs between runs. | Path | Sequential | Parallel | Difference | | --- | ---: | ---: | ---: | | Autofix job | 75–78 s | 51 s | 24–27 s faster (32–35%) | | NAPI Compiler setup | 52 s | 36 s | 16 s faster (31%) | | Codegen setup | 53 s | 38 s | 15 s faster (28%) | | Lexer setup | 40–42 s | 26–28 s | 14 s faster (33–35%) | The lexer baseline is the sum of the same run child-step durations; the other rows compare parallel runs with sequential workflow runs. The [latest CI workflow](https://github.com/oxc-project/oxc/actions/runs/37891107675) completed in 5m24s. Its unchanged WASM job was the critical path at 5m08s, so this run demonstrates lower affected-job latency and runner time, but no material end-to-end workflow reduction. Timing sources: [parallel autofix](https://github.com/oxc-project/oxc/actions/runs/37891107670), [sequential autofix A](https://github.com/oxc-project/oxc/actions/runs/37891199647), [sequential autofix B](https://github.com/oxc-project/oxc/actions/runs/37891193640), [sequential NAPI Compiler](https://github.com/oxc-project/oxc/actions/runs/37846341918), and [sequential Codegen](https://github.com/oxc-project/oxc/actions/runs/37815684125). ## Validation - parsed every changed workflow as YAML - verified all 31 parallel groups contain valid steps - compared flattened workflows against main to confirm no steps or settings changed - ran `zizmor .github` with zero findings - passed the Security Analysis workflow - ran `git diff --check` Uses the GitHub Actions parallel steps feature: https://github.blog/changelog/2026-06-25-actions-steps-can-now-be-run-in-parallel/ ## AI assistance AI assistance was used to audit, implement, validate, and measure these workflow changes. The contributor remains responsible for reviewing and understanding the changes before merge.
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: Release oxc-codegen
|
|
|
|
permissions: {}
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- packages/codegen/package.json
|
|
- .github/workflows/release_codegen.yml
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
if: github.repository == 'oxc-project/oxc'
|
|
name: Check version
|
|
runs-on: ubuntu-slim
|
|
outputs:
|
|
version: ${{ steps.check.outputs.version }}
|
|
version_changed: ${{ steps.check.outputs.version_changed }}
|
|
steps:
|
|
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
|
|
- uses: $/.github/actions/check-version
|
|
id: check
|
|
with:
|
|
file-name: packages/codegen/package.json
|
|
file-url: https://unpkg.com/oxc-codegen/package.json
|
|
|
|
build:
|
|
needs: check
|
|
if: needs.check.outputs.version_changed == 'true'
|
|
name: Release oxc-codegen
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
id-token: write # for `pnpm publish --provenance`
|
|
steps:
|
|
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
|
|
|
|
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1
|
|
|
|
- name: Build
|
|
run: pnpm --filter oxc-codegen build
|
|
|
|
# Trusted publishing is configured, publish token is not required.
|
|
- name: Trusted Publish
|
|
working-directory: packages/codegen
|
|
run: pnpm publish --provenance --access public --no-git-checks
|