-
Notifications
You must be signed in to change notification settings - Fork 4
executable file
·63 lines (59 loc) · 1.98 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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