From affcf63fe5ba9adf284a1f00cd49dbc3e55cf685 Mon Sep 17 00:00:00 2001 From: Jin Jiu Date: Mon, 27 Nov 2023 08:24:47 +0800 Subject: [PATCH] Add windows ci test. --- .github/workflows/windows.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..d2ff461 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,40 @@ +name: Rust + +on: + push: + branches: [ "ci" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + strategy: + matrix: + os: + - windows-2019 + - windows-2022 + - windows-latest + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v3 + - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append + - run: vcpkg install openssl:x64-windows-static-md + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + - name: debug with ssh tunnel + if: ${{ failure() }} + uses: wa5i/ssh-to-actions@main + with: + SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} + NPS_SERVER: ${{ secrets.NPS_SERVER }} + NPS_VKEY: ${{ secrets.NPS_VKEY }}