tmux-thumbs/.github/workflows/rust.yml

77 lines
1.5 KiB
YAML
Raw Normal View History

2020-03-08 19:21:31 +00:00
name: Rust
2021-07-21 14:23:39 +00:00
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
2020-03-08 19:21:31 +00:00
jobs:
2021-07-21 14:23:39 +00:00
test:
runs-on: ubuntu-latest
steps:
- name: Install Tarpaulin
uses: actions-rs/install@v0.1
with:
crate: cargo-tarpaulin
version: 0.18.0
use-tool-cache: true
- uses: actions/checkout@v2
- name: Format
run: cargo fmt --all -- --check
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Coverage
run: cargo tarpaulin -o Lcov --output-dir ./coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
2020-05-04 17:47:49 +00:00
build-mac:
2021-07-21 14:33:09 +00:00
needs: test
2020-05-04 17:47:49 +00:00
runs-on: macos-latest
2020-03-08 19:21:31 +00:00
2020-05-04 17:47:49 +00:00
steps:
- uses: actions/checkout@v2
2020-03-08 19:21:31 +00:00
2020-05-04 17:47:49 +00:00
- name: Build
run: cargo build --release
2020-03-08 19:21:31 +00:00
2020-05-04 17:47:49 +00:00
- uses: actions/upload-artifact@v1
with:
name: thumbs-macos.zip
path: ./target/release/thumbs
2020-03-08 19:21:31 +00:00
build-linux:
2021-07-21 14:33:09 +00:00
needs: test
2020-03-08 19:21:31 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update -y
2020-03-08 19:21:31 +00:00
sudo apt-get install -y curl gnupg ca-certificates git gcc-multilib g++-multilib cmake libssl-dev pkg-config python
- name: Build
run: cargo build --release
- uses: actions/upload-artifact@v1
with:
name: thumbs-linux.zip
path: ./target/release/thumbs