Skip to content

Commit

Permalink
qcow2-rs: ci: add windows ci
Browse files Browse the repository at this point in the history
Now it is ready to setup windows CI since Qcow2IoBuf is used, and
same alloc layout is used for both allocation and deallocation.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
  • Loading branch information
ming1 committed Jan 16, 2024
1 parent 0ca0e8b commit 779b5f4
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
build_linux:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
Expand All @@ -23,3 +23,32 @@ jobs:
- run: cargo build --verbose
- run: cargo test -- --nocapture
- run: cargo test -r

build_win:
name: Rust project - latest
runs-on: windows-latest
strategy:
matrix:
toolchain:
- stable
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Chocolatey
run: |
$qemuZipPath = Join-Path $env:USERPROFILE 'qemu.zip'
Invoke-WebRequest -Uri 'https://cloudbase.it/downloads/qemu-img-win-x64-2_3_0.zip' -OutFile $qemuZipPath
Expand-Archive -Path $qemuZipPath -DestinationPath $env:USERPROFILE
- run: |
$env:PATH = "$env:USERPROFILE;$env:PATH"
qemu-img --help
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose
- name: Rust test(debug)
run: |
$env:PATH = "$env:USERPROFILE;$env:PATH"
cargo test -- --nocapture
- name: Rust test(release)
run: |
$env:PATH = "$env:USERPROFILE;$env:PATH"
cargo test -r

0 comments on commit 779b5f4

Please sign in to comment.