-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Testing some new CI/CD #40
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,37 +5,68 @@ on: | |||||
| branches: [main] | ||||||
| pull_request: | ||||||
| branches: [main] | ||||||
| workflow_dispatch: | ||||||
|
|
||||||
| concurrency: | ||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| jobs: | ||||||
| R-CMD-check: | ||||||
| runs-on: ${{ matrix.os }} | ||||||
| name: R-CMD-check (${{ matrix.os }}, R ${{ matrix.r }}) | ||||||
| env: | ||||||
| PAK_FORCE_SOURCE_INSTALL: true | ||||||
| PAK_IGNORE_PLATFORM: true | ||||||
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||||||
| R_KEEP_PKG_SOURCE: yes | ||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: | ||||||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||||||
| include: | ||||||
| - os: ubuntu-latest | ||||||
| r: release | ||||||
| - os: macos-latest | ||||||
| r: release | ||||||
| - os: windows-latest | ||||||
| r: release | ||||||
| - os: ubuntu-latest | ||||||
| r: devel | ||||||
| - os: ubuntu-latest | ||||||
| r: oldrel-1 | ||||||
|
|
||||||
| steps: | ||||||
| - uses: actions/checkout@v3 | ||||||
| - uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Set up Rust | ||||||
| uses: dtolnay/rust-toolchain@stable | ||||||
|
|
||||||
|
|
||||||
| - name: Cache Rust dependencies | ||||||
| uses: Swatinem/rust-cache@v2 | ||||||
| with: | ||||||
| workspaces: "src/rust -> target" | ||||||
| shared-key: "rust-${{ matrix.os }}" | ||||||
|
|
||||||
| - name: Set up R | ||||||
| uses: r-lib/actions/setup-r@v2 | ||||||
| with: | ||||||
| r-version: ${{ matrix.r }} | ||||||
| use-public-rspm: true | ||||||
|
|
||||||
|
|
||||||
| - name: Install system dependencies (Linux) | ||||||
| if: runner.os == 'Linux' | ||||||
| run: | | ||||||
| sudo apt-get update | ||||||
| sudo apt-get install -y libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev | ||||||
|
|
||||||
| - name: Install dependencies | ||||||
| uses: r-lib/actions/setup-r-dependencies@v2 | ||||||
| with: | ||||||
| extra-packages: any::rcmdcheck, any::roxygen2 | ||||||
| needs: check | ||||||
| continue-on-error: true | ||||||
| id: install-deps | ||||||
|
|
||||||
| - name: Retry Install dependencies | ||||||
| if: steps.install-deps.outcome == 'failure' | ||||||
| uses: r-lib/actions/setup-r-dependencies@v2 | ||||||
|
|
@@ -53,4 +84,5 @@ jobs: | |||||
| uses: r-lib/actions/check-r-package@v2 | ||||||
| with: | ||||||
| error-on: '"error"' | ||||||
|
|
||||||
| upload-snapshots: true | ||||||
| args: 'c("--no-manual", "--as-cran")' | ||||||
|
||||||
| args: 'c("--no-manual", "--as-cran")' | |
| args: --no-manual --as-cran |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,16 +8,17 @@ on: | |||||
| types: [published] | ||||||
| workflow_dispatch: | ||||||
|
|
||||||
| name: pkgdown.yaml | ||||||
| name: pkgdown | ||||||
|
|
||||||
| permissions: read-all | ||||||
|
|
||||||
| concurrency: | ||||||
| group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | ||||||
|
||||||
| group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | |
| group: pkgdown-${{ github.event_name == 'pull_request' && github.run_id || github.ref }} |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,129 @@ | ||||||||||||
| name: Release | ||||||||||||
|
|
||||||||||||
| on: | ||||||||||||
| release: | ||||||||||||
| types: [published] | ||||||||||||
| workflow_dispatch: | ||||||||||||
| inputs: | ||||||||||||
| tag: | ||||||||||||
| description: "Release tag (e.g., v3.0.6)" | ||||||||||||
| required: false | ||||||||||||
| type: string | ||||||||||||
|
Comment on lines
+7
to
+11
|
||||||||||||
| inputs: | |
| tag: | |
| description: "Release tag (e.g., v3.0.6)" | |
| required: false | |
| type: string |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag validation only runs when github.event_name == 'release' but not for manual workflow_dispatch events. If a user manually triggers this workflow, the validation step will be skipped entirely. Consider whether validation should also run for manual dispatches, or if the manual dispatch should be removed if not fully supported.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,86 @@ | ||||||||||||||||||||||||||||||||||
| name: Rust CI | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||
| - "src/rust/**" | ||||||||||||||||||||||||||||||||||
| - "Cargo.toml" | ||||||||||||||||||||||||||||||||||
| - ".github/workflows/rust.yml" | ||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||
| - "src/rust/**" | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+7
to
+13
|
||||||||||||||||||||||||||||||||||
| - "src/rust/**" | |
| - "Cargo.toml" | |
| - ".github/workflows/rust.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "src/rust/**" | |
| - "src/rust/**" | |
| - "src/rust/Cargo.lock" | |
| - "Cargo.toml" | |
| - ".github/workflows/rust.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "src/rust/**" | |
| - "src/rust/Cargo.lock" |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow paths filter includes the root Cargo.toml but not src/rust/Cargo.toml. While changes to the root workspace manifest should trigger the workflow, direct changes to src/rust/Cargo.toml (dependencies, package metadata, etc.) would not trigger this workflow. Consider adding "src/rust/Cargo.toml" to the paths list.
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fmt job does not utilize caching like the clippy, test, and build jobs do. While formatting is typically fast, adding Rust cache here would improve consistency and could provide minor performance benefits, especially if rustfmt needs to compile any dependencies.
| components: rustfmt | |
| components: rustfmt | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "src/rust -> target" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix includes three entries with
r: release(ubuntu, macos, windows) which are redundant. The matrix configuration can be simplified by using a cross-product ofosandrarrays with exclude rules if needed, rather than repeatingr: releasethree times.