oxc/.github/workflows/ci.yml
renovate[bot] bef7f2b836
chore(deps): update github-actions (#3857)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [crate-ci/typos](https://togithub.com/crate-ci/typos) | action | patch
| `v1.22.7` -> `v1.22.9` |
|
[mozilla-actions/sccache-action](https://togithub.com/mozilla-actions/sccache-action)
| action | patch | `v0.0.4` -> `v0.0.5` |

---

### Release Notes

<details>
<summary>crate-ci/typos (crate-ci/typos)</summary>

###
[`v1.22.9`](https://togithub.com/crate-ci/typos/releases/tag/v1.22.9)

[Compare
Source](https://togithub.com/crate-ci/typos/compare/v1.22.8...v1.22.9)

#### \[1.22.9] - 2024-06-22

##### Fixes

-   Stop correcting `reoccurrence`

###
[`v1.22.8`](https://togithub.com/crate-ci/typos/compare/v1.22.7...v1.22.8)

[Compare
Source](https://togithub.com/crate-ci/typos/compare/v1.22.7...v1.22.8)

</details>

<details>
<summary>mozilla-actions/sccache-action
(mozilla-actions/sccache-action)</summary>

###
[`v0.0.5`](https://togithub.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.5)

[Compare
Source](https://togithub.com/mozilla-actions/sccache-action/compare/v0.0.4...v0.0.5)

##### What's Changed

- add missing quotes to `configure` example in readme by
[@&#8203;altendky](https://togithub.com/altendky) in
[https://github.com/Mozilla-Actions/sccache-action/pull/103](https://togithub.com/Mozilla-Actions/sccache-action/pull/103)
- chore: fix a typo in a comment by
[@&#8203;Alphare](https://togithub.com/Alphare) in
[https://github.com/Mozilla-Actions/sccache-action/pull/109](https://togithub.com/Mozilla-Actions/sccache-action/pull/109)
- Bump outdated CI workflows and packages by
[@&#8203;orf](https://togithub.com/orf) in
[https://github.com/Mozilla-Actions/sccache-action/pull/114](https://togithub.com/Mozilla-Actions/sccache-action/pull/114)
- Output sccache stats as a notice and a summary table by
[@&#8203;orf](https://togithub.com/orf) in
[https://github.com/Mozilla-Actions/sccache-action/pull/113](https://togithub.com/Mozilla-Actions/sccache-action/pull/113)

##### Dependencies

- Bump [@&#8203;types/node](https://togithub.com/types/node) from
20.12.11 to 20.13.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/115](https://togithub.com/Mozilla-Actions/sccache-action/pull/115)
- Bump
[@&#8203;typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
from 7.8.0 to 7.11.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/117](https://togithub.com/Mozilla-Actions/sccache-action/pull/117)
- Bump braces from 3.0.2 to 3.0.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/120](https://togithub.com/Mozilla-Actions/sccache-action/pull/120)
- Bump ts-jest from 29.1.2 to 29.1.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/118](https://togithub.com/Mozilla-Actions/sccache-action/pull/118)
- Bump prettier from 3.2.5 to 3.3.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/121](https://togithub.com/Mozilla-Actions/sccache-action/pull/121)
- Bump [@&#8203;actions/core](https://togithub.com/actions/core) from
1.10.0 to 1.10.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/95](https://togithub.com/Mozilla-Actions/sccache-action/pull/95)
- Bump eslint-config-prettier from 9.0.0 to 9.1.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/96](https://togithub.com/Mozilla-Actions/sccache-action/pull/96)
- Bump [@&#8203;actions/github](https://togithub.com/actions/github)
from 5.1.1 to 6.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/97](https://togithub.com/Mozilla-Actions/sccache-action/pull/97)
- Bump [@&#8203;types/node](https://togithub.com/types/node) from
20.10.6 to 20.11.24 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/102](https://togithub.com/Mozilla-Actions/sccache-action/pull/102)
- Bump eslint-plugin-jest from 27.6.0 to 27.9.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/101](https://togithub.com/Mozilla-Actions/sccache-action/pull/101)
- Bump undici from 5.28.2 to 5.28.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Mozilla-Actions/sccache-action/pull/99](https://togithub.com/Mozilla-Actions/sccache-action/pull/99)

##### New Contributors

- [@&#8203;altendky](https://togithub.com/altendky) made their first
contribution in
[https://github.com/Mozilla-Actions/sccache-action/pull/103](https://togithub.com/Mozilla-Actions/sccache-action/pull/103)
- [@&#8203;Alphare](https://togithub.com/Alphare) made their first
contribution in
[https://github.com/Mozilla-Actions/sccache-action/pull/109](https://togithub.com/Mozilla-Actions/sccache-action/pull/109)
- [@&#8203;orf](https://togithub.com/orf) made their first contribution
in
[https://github.com/Mozilla-Actions/sccache-action/pull/114](https://togithub.com/Mozilla-Actions/sccache-action/pull/114)

**Full Changelog**:
https://github.com/Mozilla-Actions/sccache-action/compare/v0.0.4...v0.0.5

</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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-23 18:54:00 +00:00

305 lines
8.8 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' }}
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"
jobs:
optimize_ci:
name: Graphite Optimize CI
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_skip.outputs.skip }}
steps:
- uses: withgraphite/graphite-ci-action@main
id: check_skip
with:
graphite_token: ${{ secrets.GRAPHITE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
test:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
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 }}
env:
# https://github.com/mozilla/sccache/blob/main/docs/S3.md
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SCCACHE_BUCKET: ${{ secrets.SCCACHE_BUCKET }}
SCCACHE_ENDPOINT: ${{ secrets.SCCACHE_ENDPOINT }}
SCCACHE_REGION: auto
RUSTC_WRAPPER: ${{ vars.USE_SCCACHE == 'true' && 'sccache' || '' }}
CARGO_INCREMENTAL: 0
SCCACHE_LOCAL_RW_MODE:
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
# cache build outputs to speed up compilation
- uses: mozilla-actions/sccache-action@v0.0.5
if: ${{ vars.USE_SCCACHE == 'true' }}
- run: cargo ck
- run: cargo test --no-run
- run: cargo test
test-windows:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
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:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
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:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
name: Spell Check
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1
- uses: crate-ci/typos@v1.22.9
with:
files: .
deny:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
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:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
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@main
if: steps.filter.outputs.src == 'true'
- run: cargo binstall --no-confirm cargo-shear
if: steps.filter.outputs.src == 'true'
- run: cargo shear
if: steps.filter.outputs.src == 'true'
format:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
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:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
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:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
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:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
name: Conformance
runs-on: ubuntu-latest
env:
# https://github.com/mozilla/sccache/blob/main/docs/S3.md
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SCCACHE_BUCKET: ${{ secrets.SCCACHE_BUCKET }}
SCCACHE_ENDPOINT: ${{ secrets.SCCACHE_ENDPOINT }}
SCCACHE_REGION: auto
RUSTC_WRAPPER: ${{ vars.USE_SCCACHE == 'true' && 'sccache' || '' }}
CARGO_INCREMENTAL: 0
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
- uses: mozilla-actions/sccache-action@v0.0.5
- 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@v1
- 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