-
Notifications
You must be signed in to change notification settings - Fork 65
110 lines (87 loc) · 3.09 KB
/
lantern.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
name: Lantern
on:
workflow_call:
jobs:
build:
runs-on: ${{ matrix.config.runner }}
container: ${{ matrix.container }}
name: "os:${{matrix.config.os}} | v:${{matrix.config.version}} (pre-cxx11: ${{matrix.precxx11abi }})"
strategy:
fail-fast: false
matrix:
config:
# when changing supported versions here, please modify supported versions
# in install.R
- {os: macOS, version: cpu-intel, runner: macos-11}
- {os: macOS, version: cpu-m1, runner: [self-hosted, m1]}
- {os: ubuntu, version: cpu, runner: ubuntu-latest}
- {os: ubuntu, version: cu11.7, runner: [self-hosted, gce, disk]}
- {os: windows, version: cpu, runner: windows-2019}
- {os: windows, version: cu11.7, runner: windows-2019}
precxx11abi: [0, 1]
include:
- config: {os: ubuntu}
container: ubuntu:18.04
# specify the CUDA patch for each major/minor version.
# required for cuda installation
- config: {version: cu11.7}
cuda: 11.7
cuda_patch: 1
exclude:
- config: {os: macOS}
precxx11abi: 1
- config: {os: windows}
precxx11abi: 1
env:
CUDA: ${{ matrix.cuda }}
PRECXX11ABI: ${{ matrix.precxx11abi }}
steps:
- name: Install system dependencies
if: matrix.container != ''
run: |
apt-get update
apt-get install -y curl sudo libxml2-dev wget chrpath rsync git
curl -fsSL https://get.docker.com -o get-docker.sh
DRY_RUN=1 sh ./get-docker.sh
- uses: actions/checkout@v3
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: "3.25.1"
- name: Install CUDA
if: ${{matrix.cuda != ''}}
uses: Jimver/cuda-toolkit@v0.2.10
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 }}
- name: Run cmake
run: |
cd src/lantern/
mkdir build
cd build
cmake ..
- name: Build libs
id: build
run: |
cd src/lantern/build
cmake --build . --config Release --parallel 4 --target package
fname=$(ls . | grep "lantern.*\.zip")
echo "fname=$fname" >> $GITHUB_OUTPUT
shell: bash
- id: artifact
if: ${{ github.workflow == 'Test' }}
uses: actions/upload-artifact@v3
with:
name: lantern
path: 'src/lantern/build/${{ steps.build.outputs.fname }}'
- id: 'gcs'
if: ${{ github.workflow != 'Test' || github.event_name != 'pull_request'}}
uses: ./.github/actions/upload-gcs
with:
fname: ${{ steps.build.outputs.fname }}
gcp_credential: ${{ secrets.GCP_APPLICATION_CREDENTIALS }}