V0.3.1 #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ stable, workflow-improvements ] | |
pull_request: | |
branches: [ stable ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: "-D warnings -W unreachable-pub -W rust-2021-compatibility -A unreachable_pub" | |
RUSTDOCFLAGS: -Dwarnings | |
RUSTUP_MAX_RETRIES: 10 | |
RUST_BACKTRACE: full | |
CI: 1 | |
CARGO_NET_RETRY: 10 | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: apt update | |
run: sudo apt update | |
- name: apt install libsystemd-dev | |
run: sudo apt install -y --no-install-recommends libsystemd-dev | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
- name: Cache Dependencies | |
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 | |
- name: Build | |
run: cargo test --release --no-run --all-targets --features default,risk_discord,risk_groupme,risk_image,risk_reddit,risk_captcha | |
- name: Run tests | |
run: cargo test --release --all-targets --features default,risk_discord,risk_groupme,risk_image,risk_reddit,risk_captcha | |
- name: Install Clippy | |
run: rustup component add clippy --toolchain nightly-x86_64-unknown-linux-gnu | |
- name: Clippy | |
run: cargo +nightly clippy --all-targets --features default,risk_discord,risk_groupme,risk_image,risk_reddit,risk_captcha -- -A unreachable_pub | |
- name: Generate release tag | |
id: tag | |
run: | | |
echo "::set-output name=release_tag::Nightly_$(date +"%Y.%m.%d_%H-%M")" | |
- name: Build Release | |
run: cargo build --release --features default,chaos,risk_reddit | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.tag.outputs.release_tag }} | |
files: | | |
target/release/rrserver | |
target/release/rrringmaster | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fmt | |
run: cargo fmt -- --check |