generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 38
/
setup-ros-osx.ts
34 lines (30 loc) · 916 Bytes
/
setup-ros-osx.ts
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
import * as utils from "./utils";
import * as brew from "./package_manager/brew";
import * as pip from "./package_manager/pip";
/**
* Install ROS 2 on a OS X worker.
*/
export async function runOsX() {
await brew.installBrewDependencies();
await utils.exec("sudo", [
"bash",
"-c",
'echo "export OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> ~/.bashrc',
]);
await utils.exec("sudo", [
"bash",
"-c",
'echo "export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/usr/local/opt/qt" >> ~/.bashrc',
]);
await utils.exec("sudo", [
"bash",
"-c",
'echo "export PATH=$PATH:/usr/local/opt/qt/bin" >> ~/.bashrc',
]);
await pip.installPython3Dependencies();
// While rosdep and vcs are available as a Debian package on Ubuntu, they need
// to be installed through pip on OS X.
await pip.runPython3PipInstall(["rosdep", "vcstool"]);
// Initializes rosdep
await utils.exec("sudo", ["rosdep", "init"]);
}