-
Notifications
You must be signed in to change notification settings - Fork 69
112 lines (90 loc) · 3.28 KB
/
packaging.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
104
105
106
107
108
109
110
111
112
name: Packaging
on:
workflow_dispatch:
push:
branches:
- main
- cran/*
- packaging3
- s3
schedule:
- cron: "0 2 * * *"
jobs:
binaries:
permissions:
id-token: write
contents: read
runs-on: ${{ matrix.config.runner }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
config:
- {r_version: 'release', os: macOS, version: cpu-intel, runner: macOS-13}
- {r_version: '', os: macOS, version: cpu-m1, runner: [self-hosted, m1]}
- {r_version: 'release', os: ubuntu, version: cpu, runner: [self-hosted, linux]}
- {r_version: 'release', os: ubuntu, version: cu118, runner: [self-hosted, linux]}
- {r_version: 'release', os: windows, version: cpu, runner: windows-2019}
- {r_version: 'release', os: windows, version: cu118, runner: windows-2019}
include:
- config: {version: cu118}
cuda: 11.8
cuda_patch: 0
- config: {os: ubuntu}
container: ubuntu:20.04
type: 'source'
r_install_tar: "tar"
- config: {os: windows}
type: 'win.binary'
r_install_tar: ""
- config: {os: macOS}
type: 'mac.binary'
r_install_tar: ""
env:
CUDA: ${{ matrix.cuda }}
CMAKE_FLAGS: "-DBUNDLE_DEPENDENCIES=ON"
BUILD_LANTERN: 1
DEBIAN_FRONTEND: noninteractive
R_INSTALL_TAR: ${{ matrix.r_install_tar }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-r
with:
r_version: ${{ matrix.config.r_version}}
makevars: true
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: "3.25.1"
- name: Install CUDA
if: ${{matrix.cuda != ''}}
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: "${{matrix.cuda}}.${{matrix.cuda_patch}}"
- name: Install CuDNN
if: ${{ matrix.cuda != '' }}
uses: ./.github/actions/install-cudnn
with:
cuda_version: ${{ matrix.cuda }}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: false
extra-packages: any::rcmdcheck
needs: check
- name: Build binary package
id: build
run: |
dest_path <- contrib.url("../binaries", type="binary")
dir.create(dest_path, recursive = TRUE)
binary_path <- pkgbuild::build(binary = TRUE, dest_path=dest_path)
tools::write_PACKAGES(dest_path, type = "${{ matrix.type }}", addFiles = TRUE)
cat("pkg_version=", desc::desc_get("Version"), "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep="")
shell: Rscript {0}
- id: 'upload-s3'
uses: ./.github/actions/upload-dir-to-s3
with:
path: "../binaries"
destination: 's3://torch-binaries/packages/${{ matrix.config.version }}/${{ steps.build.outputs.pkg_version }}/'
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws_region: ${{ secrets.AWS_REGION }}