Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/reusable-build-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ jobs:
- name: Build wasm32-wasip1-threads with linux
if: ${{ inputs.target == 'wasm32-wasip1-threads' && inputs.profile != 'release' }}
run: |
wget https://github.com/CPunisher/wasi-sdk/releases/download/v32.0.0-fix.1/wasi-sdk-32.0+m-x86_64-linux.tar.gz
tar -xvf wasi-sdk-32.0+m-x86_64-linux.tar.gz
export WASI_SDK_PATH="$(pwd)/wasi-sdk-32.0+m-x86_64-linux"

DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads RSPACK_TARGET_BROWSER=1 pnpm build:binding:${{ inputs.profile }}
DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads pnpm build:binding:${{ inputs.profile }}

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/reusable-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ jobs:
NODE_NO_WARNINGS: 1
WASM: 1
RSPACK_LOADER_WORKER_THREADS: 1
NODE_OPTIONS: '--max_old_space_size=8192 --stack-trace-limit=100'
run: pnpm run build:js && pnpm --filter "@rspack/cli" test && pnpm --filter "@rspack/tests" test
run: pnpm run test:ci

- name: Upload Test Reporter
if: always()
Expand Down
4 changes: 0 additions & 4 deletions packages/rspack-cli/rstest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ const wasmConfig: RstestConfig | undefined = process.env.WASM
exclude: [
'**/*/profile.test.ts', // Skip due to lack of system api support
],
pool: {
maxWorkers: 1,
},
maxConcurrency: 1,
}
: undefined;

Expand Down
8 changes: 2 additions & 6 deletions packages/rspack-test-tools/src/test/creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ export interface IBasicCaseCreatorOptions {
[key: string]: unknown;
}

const DEFAULT_MAX_CONCURRENT = process.env.WASM
? 1
: Number(process.env.DEFAULT_MAX_CONCURRENT) || 5;
const DEFAULT_MAX_CONCURRENT = Number(process.env.DEFAULT_MAX_CONCURRENT) || 5;

export class BasicCaseCreator {
protected currentConcurrent = 0;
Expand Down Expand Up @@ -89,9 +87,7 @@ export class BasicCaseCreator {
testConfig,
options,
);
const concurrent = process.env.WASM
? 1
: testConfig.concurrent || options.concurrent;
const concurrent = testConfig.concurrent || options.concurrent;
if (options.describe) {
if (run) {
if (concurrent) {
Expand Down
7 changes: 3 additions & 4 deletions tests/rspack-test/rstest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const wasmConfig = process.env.WASM && defineProject({
"Incremental-*.test.js",
"NativeWatcher*.test.js",
],
maxConcurrency: 1,
});

const testFilter = process.argv.includes("--test") || process.argv.includes("-t")
Expand All @@ -44,9 +43,9 @@ const testFilter = process.argv.includes("--test") || process.argv.includes("-t"
]
: undefined;

const reporters: RstestConfig['reporters'] = testFilter ? ['verbose' as const] : ['default' as const];
const reporters: RstestConfig['reporters'] = testFilter ? ['verbose' as const] : ['default' as const];
if (process.env.CI) {
reporters.push(new StreamedEventReporter( path.join(__dirname, '../../', 'rspack-test-event-report.txt')));
reporters.push(new StreamedEventReporter(path.join(__dirname, '../../', 'rspack-test-event-report.txt')));
}

const sharedConfig = defineProject({
Expand Down Expand Up @@ -139,7 +138,7 @@ export default defineConfig({
}],
reporters,
pool: {
maxWorkers: process.env.WASM ? 1 : "80%",
maxWorkers: "80%",
execArgv: ['--no-warnings', '--expose-gc', '--max-old-space-size=8192', '--experimental-vm-modules'],
},
});
Expand Down
Loading