mirror of
https://github.com/danbulant/oxc
synced 2026-05-21 21:29:01 +00:00
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [cargo-bins/cargo-binstall](https://togithub.com/cargo-bins/cargo-binstall) | action | minor | `v1.7.4` -> `v1.8.0` | | [crate-ci/typos](https://togithub.com/crate-ci/typos) | action | patch | `v1.23.2` -> `v1.23.5` | --- ### Release Notes <details> <summary>cargo-bins/cargo-binstall (cargo-bins/cargo-binstall)</summary> ### [`v1.8.0`](https://togithub.com/cargo-bins/cargo-binstall/releases/tag/v1.8.0) [Compare Source](https://togithub.com/cargo-bins/cargo-binstall/compare/v1.7.4...v1.8.0) *Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`.* ##### In this release: - Fix: Ignore invalid Github Token (token length < 10) ([#​1836](https://togithub.com/cargo-bins/cargo-binstall/issues/1836) [#​1839](https://togithub.com/cargo-bins/cargo-binstall/issues/1839)) - Add environment variable `BINSTALL_DISABLE_STRATEGIES` for `--disable-strategies` ([#​1833](https://togithub.com/cargo-bins/cargo-binstall/issues/1833) [#​1838](https://togithub.com/cargo-bins/cargo-binstall/issues/1838)) - Add new option `--disable-telemetry` to disable quickinstall statistics collection ([#​1822](https://togithub.com/cargo-bins/cargo-binstall/issues/1822) [#​1831](https://togithub.com/cargo-bins/cargo-binstall/issues/1831)) - Feature: Enable maintainers of crate to disable strategies for the crate using `package.binstall` (can be overriden by CLI users) ([#​1721](https://togithub.com/cargo-bins/cargo-binstall/issues/1721) [#​1828](https://togithub.com/cargo-bins/cargo-binstall/issues/1828)) - Fix v1 manifest format for git and local path ([#​1815](https://togithub.com/cargo-bins/cargo-binstall/issues/1815) [#​1821](https://togithub.com/cargo-bins/cargo-binstall/issues/1821)) - Fix: normalize GitHub URLs ending in .git to not ending in .git ([#​1801](https://togithub.com/cargo-bins/cargo-binstall/issues/1801) [#​1803](https://togithub.com/cargo-bins/cargo-binstall/issues/1803) [#​1804](https://togithub.com/cargo-bins/cargo-binstall/issues/1804)) ##### Other changes: - Fixed `install-from-binstall-release.sh` on raspberry pi ([#​1814](https://togithub.com/cargo-bins/cargo-binstall/issues/1814)) - Enable feature `native-tls/vendored` if both feature `native-tls` and `static` is enabled ([#​1694](https://togithub.com/cargo-bins/cargo-binstall/issues/1694) [#​1832](https://togithub.com/cargo-bins/cargo-binstall/issues/1832)) </details> <details> <summary>crate-ci/typos (crate-ci/typos)</summary> ### [`v1.23.5`](https://togithub.com/crate-ci/typos/releases/tag/v1.23.5) [Compare Source](https://togithub.com/crate-ci/typos/compare/v1.23.4...v1.23.5) #### \[1.23.5] - 2024-07-25 ##### Features - *(config)* Store config in `Cargo.toml` ### [`v1.23.4`](https://togithub.com/crate-ci/typos/releases/tag/v1.23.4) [Compare Source](https://togithub.com/crate-ci/typos/compare/v1.23.3...v1.23.4) #### \[1.23.4] - 2024-07-25 ##### Fixes - Don't correct `countr_one` in C++ ### [`v1.23.3`](https://togithub.com/crate-ci/typos/releases/tag/v1.23.3) [Compare Source](https://togithub.com/crate-ci/typos/compare/v1.23.2...v1.23.3) #### \[1.23.3] - 2024-07-22 ##### Fixes - Fix `Dockerfile` </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 10am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
274 lines
7.5 KiB
YAML
274 lines
7.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '**/*.yml'
|
|
- '!.github/workflows/ci.yml'
|
|
- '!.github/actions/clone-submodules/action.yml'
|
|
push:
|
|
branches:
|
|
- main
|
|
- "renovate/**"
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '**/*.yml'
|
|
- '!.github/workflows/ci.yml'
|
|
- '!.github/actions/clone-submodules/action.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: ${{ github.ref_name != 'main' }}
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# - os: windows-latest # See `test-windows` job below
|
|
- os: ubuntu-latest
|
|
- os: macos-14
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
- uses: Boshen/setup-rust@main
|
|
with:
|
|
# warm cache factory for all other CI jobs
|
|
# cache `target` directory to avoid download crates
|
|
save-cache: ${{ github.ref_name == 'main' }}
|
|
cache-key: warm
|
|
- run: cargo ck
|
|
- run: cargo test --no-run
|
|
- run: cargo test
|
|
- run: git diff --exit-code # Must commit everything
|
|
|
|
test-windows:
|
|
name: Test (windows-latest)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
# Unsung heros of the internet, who led me here to speed up window's slowness:
|
|
# https://github.com/actions/cache/issues/752#issuecomment-1847036770
|
|
# https://github.com/astral-sh/uv/blob/502e04200d52de30d3159894833b3db4f0d6644d/.github/workflows/ci.yml#L158
|
|
- uses: samypr100/setup-dev-drive@v3
|
|
with:
|
|
workspace-copy: true
|
|
drive-size: 8GB
|
|
|
|
- name: Install Rust
|
|
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
|
|
env:
|
|
CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
|
|
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
|
|
shell: bash
|
|
run: |
|
|
sed -i -e 's/profile = "default"/profile = "minimal"/g' rust-toolchain.toml
|
|
rustup set profile minimal
|
|
rustup show
|
|
git restore .
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: ${{ env.DEV_DRIVE_WORKSPACE }}
|
|
save-if: ${{ github.ref_name == 'main' }}
|
|
shared-key: windows-latest
|
|
env:
|
|
CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
|
|
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
|
|
|
|
- name: Run
|
|
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
|
|
env:
|
|
CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
|
|
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
|
|
shell: bash
|
|
run: |
|
|
cargo test --no-run
|
|
cargo test
|
|
cargo ck
|
|
|
|
wasm:
|
|
name: Check Wasm
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
- uses: Boshen/setup-rust@main
|
|
with:
|
|
cache-key: wasm
|
|
save-cache: ${{ github.ref_name == 'main' }}
|
|
- name: Check
|
|
run: |
|
|
rustup target add wasm32-unknown-unknown
|
|
cargo check -p oxc_wasm --target wasm32-unknown-unknown
|
|
- name: Build
|
|
run: |
|
|
npx -y wasm-pack build --target web --dev ./crates/oxc_wasm
|
|
npx -y wasm-pack build --target web --dev ./wasm/parser
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: .node-version
|
|
- name: Check output types
|
|
run: npx -y -p typescript tsc --lib es2020,dom crates/oxc_wasm/pkg/oxc_wasm.d.ts
|
|
|
|
typos:
|
|
name: Spell Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
- uses: crate-ci/typos@v1.23.5
|
|
with:
|
|
files: .
|
|
|
|
deny:
|
|
name: Cargo Deny
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
src:
|
|
- 'Cargo.lock'
|
|
|
|
- uses: Boshen/setup-rust@main
|
|
if: steps.filter.outputs.src == 'true'
|
|
with:
|
|
restore-cache: false
|
|
tools: cargo-deny
|
|
|
|
- if: steps.filter.outputs.src == 'true'
|
|
run: cargo deny check
|
|
|
|
unused-deps:
|
|
name: Check Unused Dependencies
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
src:
|
|
- '**/*.rs'
|
|
- '**/Cargo.toml'
|
|
- 'Cargo.lock'
|
|
- uses: Boshen/setup-rust@main
|
|
with:
|
|
restore-cache: false
|
|
if: steps.filter.outputs.src == 'true'
|
|
- uses: cargo-bins/cargo-binstall@v1.8.0
|
|
if: steps.filter.outputs.src == 'true'
|
|
- run: cargo binstall --no-confirm cargo-shear@1
|
|
if: steps.filter.outputs.src == 'true'
|
|
- run: cargo shear
|
|
if: steps.filter.outputs.src == 'true'
|
|
|
|
format:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
- uses: Boshen/setup-rust@main
|
|
with:
|
|
components: rustfmt
|
|
restore-cache: false
|
|
- run: cargo fmt --all -- --check
|
|
|
|
lint:
|
|
name: Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
- uses: Boshen/setup-rust@main
|
|
with:
|
|
cache-key: warm
|
|
components: clippy
|
|
- run: cargo lint -- -D warnings
|
|
|
|
doc:
|
|
name: Doc
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
- uses: Boshen/setup-rust@main
|
|
with:
|
|
cache-key: warm
|
|
components: rust-docs
|
|
- run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items
|
|
|
|
conformance:
|
|
name: Conformance
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
src:
|
|
- '!crates/oxc_linter/**'
|
|
|
|
- uses: Boshen/setup-rust@main
|
|
if: steps.filter.outputs.src == 'true'
|
|
with:
|
|
cache-key: conformance
|
|
save-cache: ${{ github.ref_name == 'main' }}
|
|
tools: just
|
|
|
|
- name: Clone submodules
|
|
if: steps.filter.outputs.src == 'true'
|
|
uses: ./.github/actions/clone-submodules
|
|
|
|
- name: Set up Bun
|
|
if: steps.filter.outputs.src == 'true'
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Install Node.js
|
|
if: steps.filter.outputs.src == 'true'
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: .node-version
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Check Conformance
|
|
if: steps.filter.outputs.src == 'true'
|
|
run: |
|
|
just coverage
|
|
git diff --exit-code
|
|
|
|
ast_changes:
|
|
name: AST Changes
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
src:
|
|
- 'crates/oxc_ast/src/ast/**'
|
|
- 'tasks/ast_codegen/src/**'
|
|
|
|
- uses: Boshen/setup-rust@main
|
|
if: steps.filter.outputs.src == 'true'
|
|
with:
|
|
components: rustfmt
|
|
cache-key: codegen
|
|
save-cache: ${{ github.ref_name == 'main' }}
|
|
|
|
- name: Check AST Changes
|
|
if: steps.filter.outputs.src == 'true'
|
|
run: |
|
|
cargo run -p oxc_ast_codegen
|
|
echo 'AST changes must be commited to the repo.'
|
|
git diff --exit-code
|