diff --git a/.github/workflows/check-and-lint.yaml b/.github/workflows/check-and-lint.yaml new file mode 100644 index 0000000..165e6c3 --- /dev/null +++ b/.github/workflows/check-and-lint.yaml @@ -0,0 +1,54 @@ +on: + pull_request: + push: + branches: + - main + +name: Check and Lint + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: clippy + override: true + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features + name: Clippy Output diff --git a/.github/workflows/release-packaging.yaml b/.github/workflows/release-packaging.yaml new file mode 100644 index 0000000..888dad6 --- /dev/null +++ b/.github/workflows/release-packaging.yaml @@ -0,0 +1,27 @@ +on: + push: + branches: + - main + +name: Release Packaging + +jobs: + release: + name: Release Packaging + env: + PROJECT_NAME_UNDERSCORE: pidtree_mon + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Release Build + run: cargo build --release --locked + - name: 'Upload Artifact' + uses: actions/upload-artifact@v2 + with: + name: ${{ env.PROJECT_NAME_UNDERSCORE }} + path: target/release/${{ env.PROJECT_NAME_UNDERSCORE }}