Skip to content

Commit

Permalink
chore: add windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneDot committed Oct 10, 2023
1 parent abc23fa commit 04c8834
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
Empty file added .github/workflows/bot.yml
Empty file.
4 changes: 2 additions & 2 deletions .github/workflows/build_binaries_on_new_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
os: macos-latest
target: x86_64-apple-darwin
- name: windows
os: windows-2019
os: windows-latest
target: x86_64-pc-windows-msvc

steps:
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Archive the binary for publishing on release assets
shell: bash
run: |
if [ "${{ matrix.os }}" = "windows-2019" ]; then
if [ "${{ matrix.os }}" = "windows-latest" ]; then
7z a -tzip dynein-${{ matrix.name }}.zip ./target/release/dy.exe
else
tar -C ./target/release/ -cvzf dynein-${{ matrix.name }}.tar.gz dy
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: CI

jobs:
build_and_test:
name: Rust project
name: Test and build on Linux
runs-on: ubuntu-latest
env:
RUST_LOG: debug # Output debug log
Expand Down Expand Up @@ -50,3 +50,31 @@ jobs:
with:
command: build
args: --release --all-features
build_and_test_on_windows:
name: Test and build on Windows
runs-on: windows-2022
env:
RUST_LOG: debug # Output debug log
RUST_BACKTRACE: 1 # Dump backtrace on panic
DYNEIN_TEST_NO_DOCKER_SETUP: true
# define AWS credentials in environment for test
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy
# Pinned to the commit hash of v2.2.1
- uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f
with:
shared-key: build-and-test-on-windows
- uses: actions-rs/cargo@v1
with:
# Currently, we only conduct snapshot tests because GitHub Actions does not support containers in Windows.
command: test
args: cli_tests
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features

0 comments on commit 04c8834

Please sign in to comment.