forked from SCIInstitute/ShapeWorks
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (84 loc) · 3.59 KB
/
Copy pathbuild-linux.yml
File metadata and controls
109 lines (84 loc) · 3.59 KB
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
name: Linux Build
on:
push:
branches:
- master
- release_v*
tags:
- '*'
pull_request:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
SW_PORTAL_LOGIN: ${{ secrets.PORTAL_LOGIN }}
CACHE_HOST: ${{ secrets.SSH_HOST }}
LD_LIBRARY_PATH: /opt/conda/envs/shapeworks/lib
jobs:
build:
runs-on: ubuntu-latest
container: akenmorris/ubuntu-build-box
steps:
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Conda info
run: conda info
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
- name: Get tags
run: git fetch --unshallow origin +refs/tags/*:refs/tags/*
- name: Restore Caches
shell: bash -l {0}
run: .github/workflows/restore_caches.sh
- name: Conda Installs
shell: bash -l {0}
run: .github/workflows/gha_conda.sh
- name: Build Dependencies
shell: bash -l {0}
run: .github/workflows/gha_deps.sh
- name: cmake
shell: bash -l {0}
run: conda activate shapeworks && mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS=-g -DITK_DIR=$HOME/install/lib/cmake/ITK-5.2 -DVTK_DIR=$HOME/install/lib/cmake/vtk-8.2 -DEigen3_DIR=$HOME/install/share/eigen3/cmake -DXLNT_DIR=$HOME/install -DLIBIGL_DIR=$HOME/install -DOpenVDB_DIR=$HOME/install/lib/cmake/OpenVDB -DGEOMETRY_CENTRAL_DIR=$HOME/install/geometry-central -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBuild_Studio=ON -DJKQTCommonSharedLib_DIR=$HOME/install/lib/cmake/JKQTCommonSharedLib -DJKQTMathTextSharedLib_DIR=$HOME/install/lib/cmake/JKQTMathTextSharedLib -DJKQTPlotterSharedLib_DIR=$HOME/install/lib/cmake/JKQTPlotterSharedLib -DACVD_DIR=$HOME/install -DCMAKE_PREFIX_PATH=${CONDA_PREFIX} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/shapeworks-install ..
- name: make
shell: bash -l {0}
run: conda activate shapeworks && cd build && make -j4
- name: make install
shell: bash -l {0}
run: conda activate shapeworks && cd build && make install
- name: Remove Qt SQL Stuff
run: mv /usr/local/plugins/sqldrivers/libqsqlmysql.so /usr/local/plugins/sqldrivers/libqsqlpsql.so /tmp
- name: Build Binary Package
shell: bash -l {0}
env:
PR_NUMBER: ${{ github.event.number }}
run: conda activate shapeworks && PATH=$HOME:$PATH ./Support/package.sh tag ${GITHUB_WORKSPACE}/shapeworks-install $HOME/install
- name: make test
shell: bash -l {0}
run: conda activate shapeworks && source ./devenv.sh ./build/bin && cd build && ctest -VV
- name: Replace Qt SQL Stuff
run: mv /tmp/lib*.so /usr/local/plugins/sqldrivers
- name: Copy artifact
shell: bash -l {0}
run: cd /__w/ShapeWorks/ShapeWorks/artifacts && ${GITHUB_WORKSPACE}/.github/workflows/copy_artifact.sh artifact-${{github.sha}}-linux *
- uses: actions/upload-artifact@v2
with:
name: artifact-${{github.sha}}-linux
path: ${{runner.workspace}}/ShapeWorks/artifacts
- name: Deploy
id: deploy
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "dev-linux"
prerelease: true
title: "Development Build for Linux"
files: |
${{runner.workspace}}/ShapeWorks/artifacts/*.tar.gz
- name: Store ccache
shell: bash -l {0}
run: .github/workflows/store_ccache.sh