-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expand file tree
/
Copy pathJenkinsfile
More file actions
72 lines (72 loc) · 2.76 KB
/
Copy pathJenkinsfile
File metadata and controls
72 lines (72 loc) · 2.76 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
pipeline
{
stages
{
stage('Ubuntu')
{
agent { label "ubuntu_22_04" }
stages {
stage('Configure')
{
steps {
sh "cmake -G Ninja -S . -B Build --toolchain=$PWD/CMake/LinuxToolchain.cmake -DLAUNCH_ARGS=-prefernvidia -DCMAKE_BUILD_TYPE=Release -DENABLE_ROS2=ON -DBUILD_CARLA_UNREAL=ON -DCARLA_UNREAL_ENGINE_PATH=$CARLA_UNREAL_ENGINE_PATH"
}
}
stage('Build Python API')
{
steps {
sh "cmake --build Build --target package"
}
}
stage('Build CARLA')
{
steps {
sh "cmake --build Build --target carla-unreal"
}
}
stage('Package')
{
steps {
sh "cmake --build Build --target package"
}
}
// TODO: move these stages to carla-studio as its own Jenkinsfile
stage('Prepare CarlaStudio')
{
steps {
sh """
# Clone carla-studio if not already present
if [ ! -d "carla-studio" ]; then
echo "Cloning carla-studio repository..."
git clone https://github.com/carla-simulator/carla-studio.git carla-studio
else
echo "carla-studio already present, updating..."
cd carla-studio
git fetch origin
git checkout master
cd ..
fi
"""
}
}
stage('Build CarlaStudio')
{
steps {
sh """
if [ -d "carla-studio" ] && [ -f "carla-studio/Makefile" ]; then
echo "Building CarlaStudio..."
cd carla-studio
make CARLA_DIR="${WORKSPACE}" CARLA_BUILD_DIR="${WORKSPACE}/Build"
cd ..
echo "CarlaStudio build completed successfully"
else
echo "ERROR: carla-studio checkout failed or Makefile not found"
exit 1
fi
"""
}
}
}
}
}
}