Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Refactor GitHub workflows #236

Merged
merged 3 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
18 changes: 18 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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:
uses: lurk-lab/ci-workflows/.github/workflows/unused-deps.yml@main

rust-version-check:
uses: lurk-lab/ci-workflows/.github/workflows/rust-version-check.yml@main
39 changes: 7 additions & 32 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,18 @@ 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

jobs:
build:
runs-on: buildjet-8vcpu-ubuntu-2204
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 @@ -44,29 +39,9 @@ jobs:
cargo nextest run --profile ci --workspace --cargo-profile dev-ci --features "asm" -E 'test(test_pp_digest)'

check-lurk-compiles:
if: github.event_name == 'pull_request'
runs-on: buildjet-8vcpu-ubuntu-2204
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
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
uses: lurk-lab/ci-workflows/.github/workflows/check-lurk-compiles.yml@main
with:
runner: "buildjet-8vcpu-ubuntu-2204"

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