Skip to content

Commit

Permalink
Refactor GitHub workflows
Browse files Browse the repository at this point in the history
- The pull request introduces predefined GitHub actions for CI env setup from `lurk-lab/ci-workflows` to simplify the existing Rust action workflow,
- A new workflow for generating and deploying crate docs has been added, triggering on push to the `dev` branch and on changes in Rust and Cargo files.
- Updates have been made to the dependabot configuration to enable 'minor' and 'patch' types for rust dependencies.
- Lastly, a new nightly workflow is set up for sanity checks, including jobs to examine unused dependencies and verify rust version.
  • Loading branch information
huitseeker committed Jan 5, 2024
1 parent ba29a22 commit 2cfc373
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ updates:
rust-dependencies:
patterns:
- "*"
update-types:
- "minor"
- "patch"
open-pull-requests-limit: 5

- package-ecosystem: "github-actions"
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Generate and deploy crate docs

on:
push:
branches:
- dev
paths:
- "**.rs"
- "Cargo.toml"
- "Cargo.lock"
workflow_dispatch:

jobs:
docs:
uses: lurk-lab/ci-workflows/.github/workflows/docs.yml@main
22 changes: 22 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Nightly sanity checks
name: nightly

on:
workflow_dispatch: {}
# Once per day at 00:00 UTC
schedule:
- cron: "0 0 * * *"

env:
CARGO_TERM_COLOR: always

jobs:
unused-dependencies:
runs-on: ubuntu-latest
steps:
- uses: lurk-lab/ci-workflows/.github/workflows/unused-deps.yml@main

rust-version-check:
runs-on: ubuntu-latest
steps:
- uses: lurk-lab/ci-workflows/.github/workflows/rust-version-check.yml
30 changes: 6 additions & 24 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ on:
- 'feat/**'
- release-candidate

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUST_BACKTRACE: short

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -26,6 +19,10 @@ jobs:
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
with:
repository: lurk-lab/ci-workflows
- uses: ./.github/actions/ci-env
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
Expand All @@ -49,24 +46,9 @@ jobs:
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: lurk-lab/ci-workflows/.github/workflows/check-lurk-compiles.yml@main
with:
path: ${{ github.workspace }}/arecibo
- uses: actions/checkout@v4
with:
repository: lurk-lab/lurk-rs
path: ${{ github.workspace }}/lurk
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Patch Cargo.toml
working-directory: ${{ github.workspace }}/lurk
run: |
echo "[patch.'https://github.com/lurk-lab/arecibo']" >> Cargo.toml
echo "nova = { path='../arecibo', package='arecibo' }" >> Cargo.toml
- name: Check Lurk-rs types don't break spectacularly
working-directory: ${{ github.workspace }}/lurk
run: cargo check --all --tests --benches --examples
package-name: arecibo

# Wasm build, rustfmt, clippy, doctests, and MSRV
code-quality:
Expand Down

0 comments on commit 2cfc373

Please sign in to comment.