amdgpud/.github/workflows/rust.yml

42 lines
1.2 KiB
YAML
Raw Normal View History

2021-07-03 16:02:08 +02:00
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
2021-07-03 23:15:51 +02:00
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
2021-07-03 16:02:08 +02:00
steps:
- uses: actions/checkout@v2
2021-07-03 23:15:51 +02:00
- name: Add target
run: rustup target install x86_64-unknown-linux-musl
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run fmt check
run: cargo fmt -- --check
2021-07-03 16:02:08 +02:00
- name: Run tests
run: cargo test --verbose
2021-07-29 11:40:30 +02:00
- name: Install binary compressor
2021-07-30 10:21:31 +02:00
run: sudo apt-get update && sudo apt-get install upx-ucl
2021-07-03 23:15:51 +02:00
- name: Build
2021-07-29 11:40:30 +02:00
run: cargo build --release --verbose --target=x86_64-unknown-linux-musl && strip ./target/x86_64-unknown-linux-musl/release/amdfand && upx --best --lzma target/x86_64-unknown-linux-musl/release/amdfand
2021-07-03 16:05:42 +02:00
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.4
with:
# Artifact name
2021-07-03 23:15:51 +02:00
name: amdfand-${{ matrix.os }}
2021-07-03 16:05:42 +02:00
# A file, directory or wildcard pattern that describes what to upload
2021-07-03 23:15:51 +02:00
path: ./target/x86_64-unknown-linux-musl/release/amdfand
2021-07-03 16:05:42 +02:00
# The desired behavior if no files are found using the provided path.