-
Notifications
You must be signed in to change notification settings - Fork 0
193 lines (169 loc) · 8.86 KB
/
release_binaries.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: Release Binaries
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
#ros: [galactic]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
#- name: Set up ROS2
#uses: ros-tooling/setup-ros@v0.2
#with:
#required-ros-distributions: ${{ matrix.ros }}
- name: Set C++ Compiler
run: |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
- name: Install Dependencies
#run: |
#if [[ "${{ github.event.head_commit.message }}" != *"[NO CI]"* ]]; then
#sudo apt update
#sudo apt install software-properties-common
#sudo add-apt-repository ppa:deadsnakes/ppa
#sudo apt update
#sudo apt-get install qtbase5-dev
#sudo apt-get install qtdeclarative5-dev
#sudo apt install qtmultimedia5-dev
#sudo apt-get install libglm-dev
#sudo apt-get install uuid-dev
#sudo apt install python3.9-dev
#sudo apt install ros-galactic-rmw-fastrtps-cpp
#python3 -m pip install \
#empy \
#catkin_pkg \
#numpy \
#lark
#fi
run: |
if [[ "${{ github.event.head_commit.message }}" != *"[NO CI]"* ]]; then
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt-get install qtbase5-dev
sudo apt-get install qtdeclarative5-dev
sudo apt install qtmultimedia5-dev
sudo apt-get install libglm-dev
sudo apt-get install uuid-dev
sudo apt install python3.9-dev
python3 -m pip install \
empy \
catkin_pkg \
numpy \
lark
fi
- name: Install Boost with components System, Python and Filesystem
run: |
echo "$(which python3)"
mkdir temp &&
cd temp &&
wget https://sourceforge.net/projects/boost/files/boost/1.69.0/boost_1_69_0.tar.gz/download &&
tar xzf download &&
cd boost_1_69_0 &&
sudo ./bootstrap.sh --with-python=$(which python3) &&
sudo ./b2 --with-system --with-python --with-filesystem -j 8 -d0 install &&
cd ..
cd ..
- name: Install tbb
run: |
if [[ "${{ github.event.head_commit.message }}" != *"[NO CI]"* ]]; then
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 0E98404D386FA1D9 605C66F00D6C9793
sudo apt update
echo "deb http://ftp.de.debian.org/debian bullseye main" | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt install libtbb2=2020.3-1
sudo apt install libtbb-dev=2020.3-1
fi
- name: Compile SI
env:
CC: gcc
if: success()
#run: |
#if [[ "${{ github.event.head_commit.message }}" != *"[NO CI]"* ]]; then
#(cd /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/sirose/msg/ros2_si_interface; rm -rf build)
#(cd /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/sirose/msg/ros2_si_interface;source /opt/ros/galactic/setup.bash; colcon build --packages-select ros2_si_interface)
#sed -i 's,find_package(Boost 1.69.0 COMPONENTS system python3.9 filesystem REQUIRED),find_package(Boost 1.69.0 EXACT REQUIRED COMPONENTS system python3.9 filesystem REQUIRED),g' /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/CMakeLists.txt
#sed -i 's,find_package(Boost 1.69.0 COMPONENTS system python3.9 REQUIRED),find_package(Boost 1.69.0 EXACT REQUIRED COMPONENTS system python3.9 filesystem REQUIRED),'g /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/tests/CMakeLists.txt
#sed -i -E 's,set\(ENV\{AMENT_PREFIX_PATH\}[\{A-Z_\} $/a-z0-9:.-]*\),list(APPEND AMENT_PREFIX_PATH ${PROJECT_SOURCE_DIR}/SI/src/sirose/msg/ros2_si_interface/install/ros2_si_interface),'g /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/sirose/CMakeLists.txt
#sed -i -E 's,set\(ENV\{CMAKE_PREFIX_PATH\}[\{A-Z_\} $/a-z0-9:.-]*\),list(APPEND CMAKE_PREFIX_PATH ${PROJECT_SOURCE_DIR}/SI/src/sirose/msg/ros2_si_interface/install/ros2_si_interface),'g /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/sirose/CMakeLists.txt
#sed -i -E 's,set\(ENV\{PYTHONPATH\}[\{A-Z_\} $/a-z0-9:.-]*\),,'g /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/sirose/CMakeLists.txt
#sed -i -E 's,set\(ENV\{COLCON_PREFIX_PATH\}[\{A-Z_\} $/a-z0-9:.-]*\),,'g /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/sirose/CMakeLists.txt
#source /opt/ros/galactic/setup.bash
#cmake -DDEFINE_TEST=ON .
#cmake --build /home/runner/work/Sketchable-Interaction/Sketchable-Interaction --target all -j 8
#fi
run: |
if [[ "${{ github.event.head_commit.message }}" != *"[NO CI]"* ]]; then
sed -i 's,find_package(Boost 1.69.0 COMPONENTS system python3.9 filesystem REQUIRED),find_package(Boost 1.69.0 EXACT REQUIRED COMPONENTS system python3.9 filesystem REQUIRED),g' /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/CMakeLists.txt
sed -i 's,find_package(Boost 1.69.0 COMPONENTS system python3.9 REQUIRED),find_package(Boost 1.69.0 EXACT REQUIRED COMPONENTS system python3.9 filesystem REQUIRED),'g /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/tests/CMakeLists.txt
cmake -DDEFINE_TEST=ON .
cmake --build /home/runner/work/Sketchable-Interaction/Sketchable-Interaction --target all -j 8
fi
- name: Versioning
id: version
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
current=$(cat .version)
echo "::set-env name=CURRENT_VERSION::$current"
- name: Create SI Archive
run: |
mkdir artifact &&
mkdir si${{ env.CURRENT_VERSION }} &&
mkdir si${{ env.CURRENT_VERSION }}/bin
mkdir si${{ env.CURRENT_VERSION }}/lib
cp -r /usr/local/lib/libboost_filesystem.so.1.69.0 si${{ env.CURRENT_VERSION }}/lib &&
cp -r /usr/local/lib/libboost_python39.so.1.69.0 si${{ env.CURRENT_VERSION }}/lib &&
cp -r /usr/local/lib/libboost_system.so.1.69.0 si${{ env.CURRENT_VERSION }}/lib &&
cp -r si_test_application si${{ env.CURRENT_VERSION }}/bin &&
cp -r libSIGeneralRuntime.so si${{ env.CURRENT_VERSION }}/bin &&
cp -r libSIRenderEngine.so si${{ env.CURRENT_VERSION }}/bin &&
cp -r libPySI.so si${{ env.CURRENT_VERSION }}/bin &&
#cp -r libSIROS2Environment.so si${{ env.CURRENT_VERSION }}/bin &&
#cp -r /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/src/sirose/msg/ros2_si_interface si${{ env.CURRENT_VERSION }}/bin &&
cp -r sipluggen si${{ env.CURRENT_VERSION }} &&
cp -r egen si${{ env.CURRENT_VERSION }} &&
cp -r sitools si${{ env.CURRENT_VERSION }} &&
cp -r /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/bin/si si${{ env.CURRENT_VERSION }} &&
chmod +x si${{ env.CURRENT_VERSION }}/si &&
cp -r /home/runner/work/Sketchable-Interaction/Sketchable-Interaction/SI/StartSIGRun.py si${{ env.CURRENT_VERSION }} &&
cp -r SI-Doc si${{ env.CURRENT_VERSION }}
zip -r artifact/si${{ env.CURRENT_VERSION }}.zip si${{ env.CURRENT_VERSION }}
- name: Create Artifact
uses: actions/upload-artifact@v1
with:
name: si-binary-archives
path: artifact
- name: Delete Previous Release
uses: ame-yu/action-delete-latest-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: $ {{ github.repository }}
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.CURRENT_VERSION }}
release_name: SIv${{ env.CURRENT_VERSION }}
draft: false
prerelease: false
- name: Upload release asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifact/si${{ env.CURRENT_VERSION }}.zip
asset_name: si${{ env.CURRENT_VERSION }}.zip
asset_content_type: application/zip