Skip to content

Update main.rs

Update main.rs #16

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
env:
CARGO_TERM_COLOR: always
MACOSX_DEPLOYMENT_TARGET: 10.13
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-10.14]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
id: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Install Linux-specific dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libz-dev libgtk-3-dev
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: |
r1/${{ github.workflow }}/${{ runner.os }}/rust/${{ steps.install_rust.outputs.rustc_hash }}/${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
r1/${{ github.workflow }}/${{ runner.os }}/rust/${{ steps.install_rust.outputs.rustc_hash }}/
- name: cargo check
run: cargo check --verbose --workspace --all-targets
- name: cargo build
run: cargo build --verbose
- name: cargo test
run: cargo test --verbose --workspace
- name: cargo fmt
run: cargo fmt --verbose --all -- --check
- name: cargo clippy
run: cargo clippy --verbose --workspace