-
Notifications
You must be signed in to change notification settings - Fork 69
101 lines (78 loc) · 2.95 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
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")'