-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
insightsengineering/idr-tasks#781 --------- Signed-off-by: walkowif <[email protected]> Co-authored-by: cicdguy <[email protected]> Co-authored-by: Pawel Rucki <[email protected]>
- Loading branch information
1 parent
abf5405
commit 3d8f753
Showing
3 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# This workflow is based on R-hub's generic GitHub Actions workflow file. | ||
# Its canonical location is at | ||
# https://github.com/r-hub/actions/blob/main/workflows/rhub.yaml | ||
|
||
name: R-hub 🌐 | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
config: | ||
description: 'A comma separated list of R-hub platforms to use.' | ||
type: string | ||
# These platforms correspond roughly to CRAN package checks. | ||
# More information: https://github.com/insightsengineering/idr-tasks/issues/781 | ||
# All supported R-hub platforms can be viewed by running: rhub::rhub_platforms() | ||
# Container-based platforms (as opposed to VM-based Windows and macOS platforms) | ||
# can be also viewed here: https://r-hub.github.io/containers/containers.html | ||
# gcc14 = r-devel-linux-x86_64-fedora-gcc | ||
default: >- | ||
r-devel-linux-x86_64-debian-clang, | ||
r-devel-linux-x86_64-debian-gcc, | ||
gcc14, | ||
r-devel-windows-x86_64, | ||
r-patched-linux-x86_64, | ||
r-release-linux-x86_64, | ||
r-release-macos-arm64, | ||
r-release-macos-x86_64, | ||
r-release-windows-x86_64, | ||
r-oldrel-macos-arm64, | ||
r-oldrel-macos-x86_64, | ||
r-oldrel-windows-x86_64, | ||
linux, | ||
gcc13, | ||
noSuggests, | ||
donttest | ||
lookup-refs: | ||
description: | | ||
List of package references to be used for the feature branch. | ||
Multiple entries in new lines or separated by commas. | ||
required: false | ||
default: "" | ||
type: string | ||
|
||
concurrency: | ||
group: r-hub-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
containers: ${{ steps.rhub-setup.outputs.containers }} | ||
platforms: ${{ steps.rhub-setup.outputs.platforms }} | ||
|
||
steps: | ||
- uses: r-hub/actions/setup@v1 | ||
with: | ||
config: ${{ inputs.config }} | ||
id: rhub-setup | ||
|
||
linux-containers: | ||
needs: setup | ||
if: ${{ needs.setup.outputs.containers != '[]' }} | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.config.label }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: ${{ fromJson(needs.setup.outputs.containers) }} | ||
container: | ||
image: ${{ matrix.config.container }} | ||
|
||
steps: | ||
- uses: r-hub/actions/checkout@v1 | ||
|
||
- uses: r-hub/actions/platform-info@v1 | ||
with: | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
job-config: ${{ matrix.config.job-config }} | ||
|
||
- name: Prepare DESCRIPTION file | ||
uses: insightsengineering/setup-r-dependencies@main | ||
with: | ||
lookup-refs: ${{ inputs.lookup-refs }} | ||
skip-install: true | ||
|
||
- uses: r-hub/actions/setup-deps@v1 | ||
with: | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
job-config: ${{ matrix.config.job-config }} | ||
needs: DepsDev,DepsBranch | ||
|
||
- uses: r-hub/actions/run-check@v1 | ||
with: | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
job-config: ${{ matrix.config.job-config }} | ||
|
||
other-platforms: | ||
needs: setup | ||
if: ${{ needs.setup.outputs.platforms != '[]' }} | ||
runs-on: ${{ matrix.config.os }} | ||
name: ${{ matrix.config.label }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: ${{ fromJson(needs.setup.outputs.platforms) }} | ||
|
||
steps: | ||
- uses: r-hub/actions/checkout@v1 | ||
|
||
- uses: r-hub/actions/setup-r@v1 | ||
with: | ||
job-config: ${{ matrix.config.job-config }} | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
|
||
- uses: r-hub/actions/platform-info@v1 | ||
with: | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
job-config: ${{ matrix.config.job-config }} | ||
|
||
- name: Setup R dependencies | ||
uses: insightsengineering/setup-r-dependencies@main | ||
with: | ||
lookup-refs: ${{ inputs.lookup-refs }} | ||
skip-install: true | ||
|
||
- uses: r-hub/actions/setup-deps@v1 | ||
with: | ||
job-config: ${{ matrix.config.job-config }} | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
needs: DepsDev,DepsBranch | ||
|
||
- uses: r-hub/actions/run-check@v1 | ||
with: | ||
job-config: ${{ matrix.config.job-config }} | ||
token: ${{ secrets.RHUB_TOKEN }} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters