Skip to content

support stable rust, bump versions of dependencies #24

support stable rust, bump versions of dependencies

support stable rust, bump versions of dependencies #24

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build project
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-2022
- windows-2019
toolchain:
- stable
- nightly
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: Setup ${{ matrix.toolchain }} toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- name: Patch MSVC linker
run: |
cargo install anonlink
anonlink
- name: Cargo build
run: cargo build --release
- name: Cargo clippy
run: cargo clippy --release -- -D warnings
- name: Cargo fmt
run: cargo fmt -- --check
- name: Test execution
run: |
$target = Get-Location
$job = Start-Job -ScriptBlock {
param ($target)
& "${target}\target\release\min-sized-rust-windows.exe"
} -ArgumentList $target
$state = Wait-Job $job -Timeout 10
$out = Receive-Job $job
if ($out -ne "Hello World!") {
Throw "Output did not equal ``Hello World!``, got ``$out``."
}
- name: Get size
run: (Get-Item ".\target\release\min-sized-rust-windows.exe").Length