void/.github/workflows/build-cli-windows.yml

55 lines
1.2 KiB
YAML

name: Build CLI (Windows)
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build-cli:
name: Build CLI (Windows)
runs-on: windows-2022
timeout-minutes: 60
defaults:
run:
working-directory: cli
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Cache Cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
cli/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build CLI
run: |
cargo build --release
- name: Run CLI tests
run: |
cargo test
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: void-cli-windows
path: target/release/void.exe