diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0421726277a..038b5e4fa92 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -62,8 +62,20 @@ jobs: # windows-latest was pinned to windows-2019 # because of https://github.com/paritytech/wasmi/runs/5021520759 os: [ubuntu-latest, windows-latest, macos-latest] + include: + # Include a new variable `rustc-args` with `-- --test-threads 1` + # for windows-latest to be used with virtual_memory crate feature + # enabled while testing. + - os: windows-latest + test-args: "--test-threads 1" runs-on: ${{ matrix.os }} steps: + - name: Configure Pagefile for Windows + if: matrix.os == 'windows-2019' + uses: al-cheb/configure-pagefile-action@v1.2 + with: + minimum-size: 6GB + maximum-size: 32GB - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: @@ -95,9 +107,10 @@ jobs: uses: actions-rs/cargo@v1 env: RUSTFLAGS: '--cfg debug_assertions' + TEST_FLAGS: ${{ matrix.test-args }} with: command: test - args: --workspace --release --all-features + args: --workspace --release --all-features -- $TEST_FLAGS fmt: name: Formatting