Skip to content

Test

Test #5860

Workflow file for this run

on:
push:
branches:
- master
- main
- "cran/**"
pull_request:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
name: Test
jobs:
lantern:
uses: ./.github/workflows/lantern.yaml
if: ${{ contains(github.event.pull_request.labels.*.name, 'lantern') || github.event_name != 'pull_request' }}
secrets: inherit
check:
needs: lantern
if: ${{ always() && needs.lantern.result != 'failed' }}
strategy:
fail-fast: false
matrix:
config:
- {os: macOS, r_version: release, version: cpu-intel, runner: macos-13}
# on m1 the R version is whicherver is installed in the runner machine.
- {os: macOS, r_version: '', version: cpu-m1, runner: [self-hosted, m1]}
- {os: ubuntu, r_version: release, version: cpu, runner: ubuntu-20.04}
- {os: ubuntu, r_version: release, version: cpu, runner: ubuntu-20.04, precxx11abi: 1}
- {os: ubuntu, r_version: release, version: cu12.4, runner: [self-hosted, gpu-local]}
- {os: windows, r_version: release, version: cpu, runner: windows-latest}
include:
- config: {os: ubuntu, version: cu12.4}
container: {image: 'nvidia/cuda:12.4.1-cudnn-devel-ubuntu20.04', options: '--gpus all --runtime=nvidia'}
runs-on: ${{ matrix.config.runner }}
container: ${{ matrix.container }}
name: "${{ matrix.config.os }} R: ${{ matrix.config.r_version }} - ${{matrix.config.version}} (pre-cxx11: ${{ matrix.config.precxx11abi }})"
timeout-minutes: 120
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
TORCH_TEST: 1
TORCH_INSTALL: 1
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
PRECXX11ABI: ${{ matrix.config.precxx11abi }}
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
GHA_USE_NODE_20: false
steps:
- name: Download lantern artifacts
if: ${{ needs.lantern.result != 'skipped' }}
uses: actions/download-artifact@v3
with:
name: lantern
path: '${{ runner.temp }}/'
- name: Set base URL for downloading
if: ${{ needs.lantern.result != 'skipped' }}
run: |
echo "LANTERN_BASE_URL=${{ runner.temp }}/" >> $GITHUB_ENV
shell: bash
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-r
with:
r_version: ${{ matrix.config.r_version}}
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
if: ${{ env.BUILD_LANTERN == 1}}
with:
cmake-version: "latest"
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: false
extra-packages: any::rcmdcheck
needs: check
- name: Session info
run: |
Rscript -e "sessionInfo()"
- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
args: 'c("--no-multiarch", "--no-manual", "--as-cran")'