-
Notifications
You must be signed in to change notification settings - Fork 69
103 lines (80 loc) · 3.33 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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-latest}
# 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}
# the precxx11abi R version is whichever is specified in the selected container.
- {os: centos, r_version: '', version: cpu, runner: ubuntu-20.04, precxx11abi: 1}
- {os: ubuntu, r_version: release, version: cu11.7, runner: [self-hosted, gpu-local]}
- {os: ubuntu, r_version: release, version: cu11.8, runner: [self-hosted, gpu-local]}
- {os: windows, r_version: release, version: cpu, runner: windows-latest}
- {os: windows, r_version: 3.6, version: cpu, runner: windows-latest}
include:
- config: {os: centos, precxx11abi: 1}
container: rstudio/r-base:4.2-centos7
- config: {os: ubuntu, version: cu11.7}
container: {image: 'nvidia/cuda:11.7.1-cudnn8-devel-ubuntu18.04', options: '--gpus all --runtime=nvidia'}
- config: {os: ubuntu, version: cu11.8}
container: {image: 'nvidia/cuda:11.8.0-cudnn8-devel-ubuntu18.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 }}
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
- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
args: 'c("--no-multiarch", "--no-manual", "--as-cran")'