-
Notifications
You must be signed in to change notification settings - Fork 2
146 lines (110 loc) · 4.56 KB
/
continuous-integration-workflow.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
on: [push]
env:
OSG_INSTALL_PATH: /tmp/OpenSceneGraph-install
SIMBODY_INSTALL_PATH: /tmp/simbody-install
OPENSIM3_INSTALL_PATH: /tmp/opensim3-install
CMAKE_VERBOSE_MAKEFILE: "False"
jobs:
osx:
# if: ${{ false }}
name: Build on MacOS 13
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Get Brew
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- name: Get Dependencies
run: cd $GITHUB_WORKSPACE && ./tools/mac_1_get-dependencies
- name: Check cache for openscenegraph
id: cache_osg
uses: actions/cache@v3
with:
path: ${{ env.OSG_INSTALL_PATH }}
key: ${{ runner.os }}-osg-${{ hashFiles('OpenSceneGraph/src') }}
- name: Build openscenegraph
if: steps.cache_osg.outputs.cache-hit != 'true'
run: cd $GITHUB_WORKSPACE && ./tools/unix_2a_build-osg
- name: Check cache for simbody
id: cache_simbody
uses: actions/cache@v3
with:
path: ${{ env.SIMBODY_INSTALL_PATH }}
key: ${{ runner.os }}-simbody-${{ hashFiles('simbody/Simbody') }}
- name: Build simbody (if not cached)
if: steps.cache_simbody.outputs.cache-hit != 'true'
run: cd $GITHUB_WORKSPACE && ./tools/unix_2b_build-simbody
- name: Cache opensim3
id: cache_opensim3
uses: actions/cache@v3
with:
path: ${{ env.OPENSIM3_INSTALL_PATH }}
key: ${{ runner.os }}-opensim3-${{ hashFiles('opensim3-scone/OpenSim') }}
- name: Build opensim3 (if not cached)
if: steps.cache_opensim3.outputs.cache-hit != 'true'
run: cd $GITHUB_WORKSPACE && ./tools/unix_2c_build-opensim3
- name: Build SCONE
run: cd $GITHUB_WORKSPACE && ./tools/unix_2d_build-scone
- name: Rearrange SCONE into portable install dir
run: cd $GITHUB_WORKSPACE && ./tools/mac_3_create-install-dirtree
# - name: Create .dmg file from the tree
# run: cd $GITHUB_WORKSPACE && ./tools/mac_4_create-dmg
# - name: Upload DMG file as an artifact
# uses: actions/upload-artifact@v4
# with:
# name: sconestudio.dmg
# path: build/*.dmg
linux:
name: Build on Ubuntu 20.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get Dependencies
run: cd $GITHUB_WORKSPACE && ./tools/linux_1_get-dependencies
# note: this step is specifically because ubuntu-18.04 does not
# provide a C++17 compiler. It can be skipped in newer distros
# - name: Install gcc-8 and g++8
# run: |
# sudo apt-get install gcc-8 g++-8
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
# openscenegraph: only build it if its source files have changed
- name: Cache openscenegraph
id: cache_osg
uses: actions/cache@v3
with:
path: ${{ env.OSG_INSTALL_PATH }}
key: ${{ runner.os }}-osg-${{ hashFiles('OpenSceneGraph/src') }}
- name: Build openscenegraph (if not cached)
if: steps.cache_osg.outputs.cache-hit != 'true'
run: cd $GITHUB_WORKSPACE && ./tools/unix_2a_build-osg
# simbody: only build it if its source files have changed
- name: Cache simbody
id: cache_simbody
uses: actions/cache@v3
with:
path: ${{ env.SIMBODY_INSTALL_PATH }}
key: ${{ runner.os }}-simbody-${{ hashFiles('simbody/Simbody') }}
- name: Build simbody (if not cached)
if: steps.cache_simbody.outputs.cache-hit != 'true'
run: cd $GITHUB_WORKSPACE && ./tools/unix_2b_build-simbody
# opensim3: only build it if its source files have changed
- name: Cache opensim3
id: cache_opensim3
uses: actions/cache@v3
with:
path: ${{ env.OPENSIM3_INSTALL_PATH }}
key: ${{ runner.os }}-opensim3-${{ hashFiles('opensim3-scone/OpenSim') }}
- name: Build opensim3 (if not cached)
if: steps.cache_opensim3.outputs.cache-hit != 'true'
run: cd $GITHUB_WORKSPACE && ./tools/unix_2c_build-opensim3
- name: Build SCONE
run: cd $GITHUB_WORKSPACE && ./tools/unix_2d_build-scone
- name: Rearrange binaries into single dir
run: cd $GITHUB_WORKSPACE && ./tools/linux_3_create-install-dirtree
- name: Package dir into deb package
run: cd $GITHUB_WORKSPACE && ./tools/linux_4_package
- name: Upload deb package artifact
uses: actions/upload-artifact@v4
with:
name: deb-installer.zip
path: build/*.deb