#39: Add --name to example using sc #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
- push | |
- pull_request | |
name: Main | |
env: | |
RUST_BACKTRACE: '1' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- rust-target: x86_64-pc-windows-msvc | |
artifact-name: win64 | |
- rust-target: i686-pc-windows-msvc | |
artifact-name: win32 | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- uses: mtkennerly/dunamai-action@v1 | |
with: | |
env-var: DUNAMAI_VERSION | |
args: --style semver | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable-${{ matrix.rust-target }} | |
- run: cargo build --release | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: shawl-v${{ env.DUNAMAI_VERSION }}-${{ matrix.artifact-name }} | |
path: target/release/shawl.exe | |
test: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo test -- --test-threads 1 | |
lint: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- run: | | |
pip install pre-commit | |
pre-commit run --all-files --show-diff-on-failure |