Skip to content

Commit

Permalink
Updated the GitHub workflows and/or the README file to the latest ver…
Browse files Browse the repository at this point in the history
…sions.
  • Loading branch information
krivit committed Feb 19, 2024
1 parent d18238a commit fdc1bb4
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
# debug: compile package with -DDEBUG and -UNDEBUG
#
# covr: run in covr mode may be used with 'full' but probably not with others.
#
#
# Typical public, private, and release configurations are provided in the variables below.

on: [push, pull_request]

Expand All @@ -37,6 +40,21 @@ name: R-CMD-check
env:
PUBLIC: ''
PRIVATE: ''
PUBLIC_CONFIG: '{"config":[
{"os":"windows-latest", "r":"release", "timeout":360, "flags":"binaries"},
{"os":"macOS-latest", "r":"release", "timeout":360, "flags":"binaries, ubsan"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, ubsan, debug"},
{"os":"ubuntu-latest", "r":"devel", "timeout":360, "flags":"vignettes, remote"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, covr"}]}'
RELEASE_CONFIG: '{"config":[
{"os":"windows-latest", "r":"release", "timeout":360, "flags":"binaries, vignettes, remote, strict"},
{"os":"macOS-latest", "r":"release", "timeout":360, "flags":"binaries, ubsan, vignettes, remote, strict"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, ubsan, debug, strict"},
{"os":"ubuntu-latest", "r":"devel", "timeout":360, "flags":"vignettes, remote, strict"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, covr, strict"}]}'
PRIVATE_CONFIG: '{"config":[
{"os":"ubuntu-latest", "r":"release", "timeout":10, "flags":"none"}
]}'

jobs:
Set-Matrix-Private:
Expand Down Expand Up @@ -76,17 +94,10 @@ jobs:
run: |
if [[ "${{ env.IAM }}" == 'public' ]] # Public: full set.
then
config='{"config":[
{"os":"windows-latest", "r":"release", "timeout":360, "flags":"binaries"},
{"os":"macOS-latest", "r":"release", "timeout":360, "flags":"binaries, ubsan"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, ubsan, debug"},
{"os":"ubuntu-latest", "r":"devel", "timeout":360, "flags":"vignettes, remote"},
{"os":"ubuntu-latest", "r":"release", "timeout":360, "flags":"full, covr"}]}'
config='${{ env.PUBLIC_CONFIG }}'
elif [[ "${{ env.FOUND_PUBLIC }}" != '0' ]] # Private with no public analogue: reduced set.
then
config='{"config":[
{"os":"ubuntu-latest", "r":"release", "timeout":10, "flags":"none"}
]}'
config='${{ env.PRIVATE_CONFIG }}'
else # Private with public analogue: no checking.
config=''
fi
Expand Down Expand Up @@ -123,7 +134,7 @@ jobs:
fi
shell: bash

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down Expand Up @@ -169,7 +180,7 @@ jobs:

- name: Upload build results
if: contains(matrix.config.flags, 'binaries') && !failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-binaries
path: binaries
Expand Down Expand Up @@ -243,7 +254,7 @@ jobs:

- name: Upload check results
if: contains(matrix.config.flags, 'covr') == false && failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: |
Expand Down

0 comments on commit fdc1bb4

Please sign in to comment.