Skip to content

Commit

Permalink
ci: remove actions/rustup in favor of Boshen/rustup (#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen authored May 27, 2024
1 parent ef8d3cf commit 0355c9d
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 180 deletions.
98 changes: 0 additions & 98 deletions .github/actions/rustup/action.yml

This file was deleted.

21 changes: 7 additions & 14 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,11 @@ jobs:
- name: Checkout Branch
uses: taiki-e/checkout-action@v1

- name: Install Rust Toolchain
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
shared-key: benchmark-${{ matrix.component }}
cache-key: benchmark-${{ matrix.component }}
save-cache: ${{ github.ref_name == 'main' }}

- name: Install codspeed
uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed
tools: cargo-codspeed

- name: Install Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -137,10 +132,9 @@ jobs:
- name: Checkout Branch
uses: taiki-e/checkout-action@v1

- name: Install Rust Toolchain
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
shared-key: benchmark-linter
cache-key: benchmark-linter
save-cache: ${{ github.ref_name == 'main' }}

- uses: mozilla-actions/[email protected]
Expand Down Expand Up @@ -239,10 +233,9 @@ jobs:
# - name: Checkout Branch
# uses: taiki-e/checkout-action@v1

# - name: Install Rust Toolchain
# uses: ./.github/actions/rustup
# - uses: Boshen/setup-rust@main
# with:
# shared-key: 'benchmark_napi'
# shared-key: benchmark_napi
# save-cache: ${{ github.ref_name == 'main' }}

# - name: Install codspeed
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/cargo-llvm-lines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
- name: Checkout
uses: taiki-e/checkout-action@v1

- name: Install Rust Toolchain
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main

- name: Install cargo-llvm-lines
uses: taiki-e/install-action@v2
Expand Down
65 changes: 19 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ jobs:
SCCACHE_LOCAL_RW_MODE:
steps:
- uses: taiki-e/checkout-action@v1
- uses: ./.github/actions/rustup
- 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/[email protected]
if: ${{ vars.USE_SCCACHE == 'true' }}
Expand All @@ -71,38 +72,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- name: Install Rust Toolchain
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
shared-key: 'wasm'
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: 20

- name: Check output types
run: |
npx -y -p typescript tsc --lib es2020,dom crates/oxc_wasm/pkg/oxc_wasm.d.ts
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@master
with:
files: .
Expand All @@ -120,14 +113,11 @@ jobs:
src:
- 'Cargo.lock'
- name: Install cargo-deny
if: steps.filter.outputs.src == 'true'
uses: taiki-e/install-action@cargo-deny

- uses: ./.github/actions/rustup
- 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
Expand All @@ -145,7 +135,7 @@ jobs:
- '**/*.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
- uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
restore-cache: false
if: steps.filter.outputs.src == 'true'
Expand All @@ -161,42 +151,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- name: Install Rust
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
fmt: true
components: rustfmt
restore-cache: false

- run: cargo fmt --all -- --check

lint:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- name: Install Rust
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
clippy: true

- name: Run Clippy
run: cargo lint -- -D warnings
components: clippy
- run: cargo lint -- -D warnings

doc:
name: Doc
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1

- name: Install Rust
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
docs: true

- name: Run doc
run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items
components: rust-docs
- run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items

conformance:
name: Conformance
Expand All @@ -220,12 +199,12 @@ jobs:
src:
- '!crates/oxc_linter/**'
- name: Install Rust Toolchain
- uses: Boshen/setup-rust@main
if: steps.filter.outputs.src == 'true'
uses: ./.github/actions/rustup
with:
shared-key: 'conformance'
cache-key: conformance
save-cache: ${{ github.ref_name == 'main' }}
tools: just

- uses: mozilla-actions/[email protected]

Expand All @@ -244,12 +223,6 @@ jobs:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Install just
if: steps.filter.outputs.src == 'true'
uses: taiki-e/install-action@v2
with:
tool: just

- name: Check Conformance
if: steps.filter.outputs.src == 'true'
run: |
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,12 @@ jobs:
- name: Clone submodules
uses: ./.github/actions/clone-submodules

- name: Install Rust Toolchain
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
shared-key: 'codecov'
cache-key: codecov
save-cache: ${{ github.ref_name == 'main' }}

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov

- name: Install llvm-tools-preview for llvm-cov
run: rustup component add llvm-tools-preview
tools: cargo-llvm-cov
components: llvm-tools-preview

- name: Run
env:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ jobs:
- name: Checkout
uses: taiki-e/checkout-action@v1

- name: Install Rust
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
shared-key: miri
cache-key: miri
save-cache: ${{ github.ref_name == 'main' }}

- name: Install Miri
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ jobs:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Install Rust Toolchain
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
shared-key: 'wasm'
cache-key: 'wasm'

- name: Build
working-directory: wasm/parser
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ jobs:
- name: Checkout
uses: taiki-e/checkout-action@v1

- name: Install Rust Toolchain
uses: ./.github/actions/rustup
- uses: Boshen/setup-rust@main
with:
shared-key: 'wasm'
cache-key: 'wasm'

- name: Install pnpm
working-directory: website
Expand Down

0 comments on commit 0355c9d

Please sign in to comment.