Skip to content

big update

big update #27

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
tags: "*"
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
steps:
- uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Build
run: cargo build --verbose
- name: Check formatting
run: cargo fmt -- --check
- name: Lint with Clippy
run: cargo clippy -- -D warnings
- name: Create Release (Windows)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest'
run: |
echo ${{ matrix.os }}
cargo build --release
mv target/release/cccp.exe target/release/cccp_${{ matrix.os }}.exe
- name: Create Release (Non-Windows)
if: startsWith(github.ref, 'refs/tags/') && matrix.os != 'windows-latest'
run: |
echo ${{ matrix.os }}
cargo build --release
mv target/release/cccp target/release/cccp_${{ matrix.os }}
- name: Upload Release (Windows)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest'
uses: actions/upload-artifact@v2
with:
name: cccp_${{ matrix.os }}
path: target/release/cccp_${{ matrix.os }}.exe
- name: Upload Release (Non-Windows)
if: startsWith(github.ref, 'refs/tags/') && matrix.os != 'windows-latest'
uses: actions/upload-artifact@v2
with:
name: cccp_${{ matrix.os }}
path: target/release/cccp_${{ matrix.os }}