Skip to content

Add quick start guide for new users #6

Add quick start guide for new users

Add quick start guide for new users #6

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Check formatting
run: cargo fmt -- --check
if: matrix.os == 'ubuntu-latest'
- name: Clippy
run: cargo clippy -- -D warnings
if: matrix.os == 'ubuntu-latest'
build-release:
name: Build Release Binary - ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary_name: wake
- os: windows-latest
target: x86_64-pc-windows-msvc
binary_name: wake.exe
- os: macos-latest
target: x86_64-apple-darwin
binary_name: wake
- os: macos-latest
target: aarch64-apple-darwin
binary_name: wake
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Build Release
run: cargo build --release --target ${{ matrix.target }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: wake-${{ matrix.target }}
path: target/${{ matrix.target }}/release/${{ matrix.binary_name }}