Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rollup/rollup into sync-6…
Browse files Browse the repository at this point in the history
…b2c8418
  • Loading branch information
docschina-bot committed Dec 27, 2024
2 parents 2bd82ba + 6b2c841 commit ff74dd0
Show file tree
Hide file tree
Showing 9 changed files with 587 additions and 509 deletions.
78 changes: 53 additions & 25 deletions .github/workflows/build-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Node Modules
- name: Restore Node dependencies cache
id: cache-node-modules
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Lint
Expand All @@ -62,8 +62,8 @@ jobs:
matrix:
settings:
# WASM
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: ubuntu-latest
target: wasm32-unknown-unknown
name: wasm
is-wasm-build: true
build: >-
Expand All @@ -73,8 +73,8 @@ jobs:
path: |
wasm/
.empty
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: ubuntu-latest
target: wasm32-unknown-unknown
name: wasm-node
is-wasm-build: true
build: >-
Expand Down Expand Up @@ -220,8 +220,8 @@ jobs:
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v4
- name: Restore Cargo cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry/index/
Expand All @@ -239,15 +239,21 @@ jobs:
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Cache Node Modules
- name: Restore Node dependencies cache
id: cache-node-modules
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Save Node dependencies cache
if: steps.cache-node-modules.outputs.cache-hit != 'true' && github.ref == 'refs/heads/master'
uses: actions/cache/save@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
Expand All @@ -259,6 +265,17 @@ jobs:
run: ${{ matrix.settings.build }}
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Save Cargo cache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
rust/target/
key: ${{ matrix.settings.name || matrix.settings.target }}-cargo-${{ matrix.settings.host }}-${{ hashFiles('rust/Cargo.lock') }}
- name: Upload wasm artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -293,8 +310,8 @@ jobs:
steps:
- name: Checkout Commit
uses: actions/checkout@v4
- name: Cache cargo
uses: actions/cache@v4
- name: Restore Cargo cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry/index/
Expand All @@ -315,6 +332,17 @@ jobs:
sudo pkg install -y node npm rust
npm ci --ignore-scripts
npm run build:napi -- --release --target ${{ matrix.settings.target }}
- name: Save Cargo cache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
rust/target/
key: ${{ matrix.settings.target }}-cargo-${{ hashFiles('rust/Cargo.lock') }}
- name: Upload napi artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -363,13 +391,13 @@ jobs:
steps:
- name: Checkout Commit
uses: actions/checkout@v4
- name: Cache Node Modules
- name: Restore Node dependencies cache
id: cache-node-modules
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Build JS
Expand Down Expand Up @@ -431,7 +459,7 @@ jobs:
- host: macos-latest
target: aarch64-apple-darwin
node:
- '18.0.0'
- '18.20.0'
- '22'
include:
- settings:
Expand All @@ -445,7 +473,7 @@ jobs:
- settings:
host: ubuntu-latest
target: x86_64-unknown-linux-gnu
node: '18.0.0'
node: '18.20.0'
command: 'ci:test:all'
additionalName: ' with Additional Tests'
runs-on: ${{ matrix.settings.host }}
Expand All @@ -458,13 +486,13 @@ jobs:
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Cache Node Modules
- name: Restore Node dependencies cache
id: cache-node-modules
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Download napi artifacts
Expand Down Expand Up @@ -513,13 +541,13 @@ jobs:
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Cache Node Modules
- name: Restore Node dependencies cache
id: cache-node-modules
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Download all artifacts
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/performance-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,28 @@ jobs:
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu
- name: Cache cargo
uses: actions/cache@v4
- name: Restore Cargo cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
rust/target/
key: cargo-cache-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: cargo-cache
key: x86_64-unknown-linux-gnu-cargo-ubuntu-latest-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: x86_64-unknown-linux-gnu-cargo-ubuntu-latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Cache Node Modules
node-version: 22
- name: Restore Node dependencies cache
id: cache-node-modules
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Build artefacts 123
Expand Down Expand Up @@ -86,24 +86,24 @@ jobs:
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu
- name: Cache cargo
uses: actions/cache@v4
- name: Restore Cargo cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
rust/target/
key: cargo-cache-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: cargo-cache
key: x86_64-unknown-linux-gnu-cargo-ubuntu-latest-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: x86_64-unknown-linux-gnu-cargo-ubuntu-latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Cache Node Modules
node-version: 22
- name: Restore Node dependencies cache
id: cache-node-modules
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/repl-artefacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ jobs:
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Cache cargo
uses: actions/cache@v4
- name: Restore Cargo cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
rust/target/
key: cargo-cache-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: cargo-cache
key: wasm-cargo-ubuntu-latest-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: wasm-cargo-ubuntu-latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Cache Node Modules
node-version: 22
- name: Restore Node dependencies cache
id: cache-node-modules
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
Expand Down
Loading

0 comments on commit ff74dd0

Please sign in to comment.