Skip to content

Commit

Permalink
CI: use lpenz/ghworkflow-rust@devel as the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lpenz committed Jul 2, 2022
1 parent 14adc52 commit 4c3f727
Showing 1 changed file with 9 additions and 119 deletions.
128 changes: 9 additions & 119 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,122 +7,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: docker://lpenz/omnilint:0.4
# Rust actions from:
# https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
cargo-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
test-coverage:
name: cargo test with coveralls
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: coverage
uses: docker://lpenz/ghaction-rust-coverage:0.5.0
- uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ steps.coverage.outputs.report }}
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:
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 clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
cargo-deb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version
uses: docker://lpenz/ghaction-version-gen:0.8.0
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Copy manual
run: find target -name ogle.1 -exec cp -vt . {} +
- run: cargo install cargo-deb
- run: cargo deb --deb-version '${{ steps.version.outputs.version_commit }}'
if: steps.version.outputs.version_commit != ''
- uses: actions/upload-artifact@v2
if: steps.version.outputs.version_commit != ''
with:
if-no-files-found: error
path: |
target/debian/*.deb
target/release/ogle
publish-crate:
needs: [ omnilint, cargo-check, test-coverage, rustfmt, clippy, cargo-deb ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version
uses: docker://lpenz/ghaction-version-gen:0.8.0
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v1
if: steps.version.outputs.version_tagged != ''
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
packagecloud:
needs: [ publish-crate ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version
uses: docker://lpenz/ghaction-version-gen:0.8.0
- uses: actions/download-artifact@v2
if: steps.version.outputs.version_tagged != ''
- uses: docker://lpenz/ghaction-packagecloud:v0.3
if: steps.version.outputs.version_tagged != ''
with:
repository: debian/debian/bullseye
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
- uses: "marvinpinto/action-automatic-releases@v1.2.1"
if: steps.version.outputs.version_tagged != ''
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
artifact/debian/*.deb
artifact/release/ogle
rust:
uses: lpenz/ghworkflow-rust/.github/workflows/rust.yml@devel
with:
coveralls: true
deb: true
packagecloud: true
secrets:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

0 comments on commit 4c3f727

Please sign in to comment.