mirror of https://github.com/raftario/filite.git
Actions
This commit is contained in:
parent
f234c12fc8
commit
aa77707c21
|
@ -0,0 +1,42 @@
|
|||
name: Build
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Build project
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release
|
||||
- name: Strip binary (*nix)
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: strip target/release/licensor
|
||||
- name: Archive binary (Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: Linux
|
||||
path: target/release/licensor
|
||||
- name: Archive binary (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: Windows
|
||||
path: target/release/licensor.exe
|
||||
- name: Archive binary (macOS)
|
||||
if: matrix.os == 'macOS-latest'
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: macOS
|
||||
path: target/release/licensor
|
|
@ -0,0 +1,29 @@
|
|||
name: Checks
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- run: rustup component add rustfmt
|
||||
- run: rustup component add clippy
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
- name: Check for clippy warnings
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: -- -D warnings
|
||||
- name: Check formatting
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: -- --check
|
Loading…
Reference in New Issue