Skip to content

Implemented Github Actions for Windows and added Windows Compatibility #7

Implemented Github Actions for Windows and added Windows Compatibility

Implemented Github Actions for Windows and added Windows Compatibility #7

Workflow file for this run

name: Rust CI on Windows
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Ctarget-feature=+crt-static
jobs:
build:
runs-on: windows-2022
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Cache Cargo registry and build artifacts
uses: actions/cache@v4
with:
path: |
C:\Users\runneradmin\.cargo\registry
C:\Users\runneradmin\.cargo\git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build examples (Windows)
shell: pwsh
run: |
Get-ChildItem examples\*.rs | ForEach-Object {
$name = $_.BaseName
Write-Host "Building example: $name"
cargo build --example $name --verbose
}