forked from isl-org/Open3D
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (97 loc) · 3.6 KB
/
ubuntu.yml
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: Ubuntu
on:
workflow_dispatch:
inputs:
developer_build:
description: 'Set to OFF for Release wheels'
required: false
default: 'ON'
push:
branches:
- master
pull_request:
types: [opened, reopened, synchronize] # Rebuild on new pushes to PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
NPROC: 2
GCE_CLI_GHA_VERSION: "302.0.0"
jobs:
ubuntu:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
SHARED: [ON, OFF]
MLOPS: [ON, OFF]
exclude:
- SHARED: OFF
MLOPS: ON
env:
SHARED: ${{ matrix.SHARED }}
BUILD_CUDA_MODULE: OFF
BUILD_TENSORFLOW_OPS: ${{ matrix.MLOPS }}
BUILD_PYTORCH_OPS: ${{ matrix.MLOPS }}
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Maximize build space
run: |
source util/ci_utils.sh
maximize_ubuntu_github_actions_build_space
- name: Setup cache
uses: actions/cache@v2
with:
# Ref: https://github.com/apache/incubator-mxnet/pull/18459/files
path: ~/.ccache
# We include the commit sha in the cache key, as new cache entries are
# only created if there is no existing entry for the key yet.
key: ${{ runner.os }}-ccache-${{ github.sha }}
# Restore any ccache cache entry, if none for
# ${{ runner.os }}-ccache-${{ github.sha }} exists.
# Common prefix will be used so that ccache can be used across commits.
restore-keys: |
${{ runner.os }}-ccache
- name: Set up Python version
uses: actions/setup-python@v2
with:
python-version: 3.6
# Pre-installed 18.04 packages: https://git.io/JfHmW
- name: Install dependencies
run: |
./util/install_deps_ubuntu.sh assume-yes
wget https://github.com/isl-org/open3d_downloads/releases/download/ccache/ccache
chmod +x ccache
sudo mv ccache /usr/local/bin
ccache -M 2G # See .github/workflows/readme.md for ccache strategy.
- name: Config and build
run: |
PATH=/usr/lib/ccache:$PATH
ccache -s
./util/run_ci.sh
ccache -s
DEVEL_PKG_NAME="$(basename package/open3d-devel-*.tar.xz)"
echo "DEVEL_PKG_NAME=$DEVEL_PKG_NAME" >> $GITHUB_ENV
- name: Upload package
if: ${{ env.SHARED == 'ON' }}
uses: actions/upload-artifact@v2
with:
name: open3d-devel-linux-x86_64
path: build/package/${{ env.DEVEL_PKG_NAME }}
if-no-files-found: error
- name: GCloud CLI setup
if: ${{ github.ref == 'refs/heads/master' && env.SHARED == 'ON' }}
# https://github.com/GoogleCloudPlatform/github-actions/issues/100#issuecomment-650798308
uses: google-github-actions/[email protected]
with:
version: ${{ env.GCE_CLI_GHA_VERSION }}
service_account_key: ${{ secrets.GCE_SA_KEY_GPU_CI }}
project_id: ${{ secrets.GCE_DOCS_PROJECT }}
export_default_credentials: true
- name: Upload package to GCS bucket
if: ${{ github.ref == 'refs/heads/master' && env.SHARED == 'ON' }}
run: |
gsutil cp build/package/${{ env.DEVEL_PKG_NAME }} gs://open3d-releases-master/devel/
echo "Download devel package at: https://storage.googleapis.com/open3d-releases-master/devel/${{ env.DEVEL_PKG_NAME }}"