From 8da31c316b64df46392dc0122a5d10b936489b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Fri, 5 Jan 2024 10:13:52 -0500 Subject: [PATCH 1/3] Refactor GitHub workflows - 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. --- .github/dependabot.yml | 3 +++ .github/workflows/docs.yml | 15 ++++++++++++++ .github/workflows/nightly.yml | 18 +++++++++++++++++ .github/workflows/rust.yml | 38 ++++++++--------------------------- 4 files changed, 44 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/nightly.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 98e028a25..95dc07ac7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,6 +10,9 @@ updates: rust-dependencies: patterns: - "*" + update-types: + - "minor" + - "patch" open-pull-requests-limit: 5 - package-ecosystem: "github-actions" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..e683ea260 --- /dev/null +++ b/.github/workflows/docs.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 000000000..bcfe39b68 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index af696ef84..e1ad3421c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 @@ -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 @@ -44,29 +41,10 @@ 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: + package-name: "arecibo" + runner: "buildjet-8vcpu-ubuntu-2204" # Wasm build, rustfmt, clippy, doctests, and MSRV code-quality: From 5d392a21235d1ea35e5cffc2f95e9809a0f199f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Mon, 8 Jan 2024 14:54:50 -0500 Subject: [PATCH 2/3] fix: remove obsolete package-name --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e1ad3421c..b943d4616 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,7 +43,6 @@ jobs: check-lurk-compiles: uses: lurk-lab/ci-workflows/.github/workflows/check-lurk-compiles.yml@main with: - package-name: "arecibo" runner: "buildjet-8vcpu-ubuntu-2204" # Wasm build, rustfmt, clippy, doctests, and MSRV From 301a0646c771e42e7ed200c7267b44e4b7409950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Mon, 8 Jan 2024 15:25:03 -0500 Subject: [PATCH 3/3] fix: review nit --- .github/workflows/rust.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b943d4616..a9f0980de 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,8 +16,6 @@ concurrency: jobs: build: runs-on: buildjet-8vcpu-ubuntu-2204 - env: - RUSTFLAGS: -D warnings steps: - uses: actions/checkout@v4 with: