Skip to content

Commit 1ee3e11

Browse files
committed
build params upd now have cache
1 parent d5518b2 commit 1ee3e11

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/build-arm64.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ jobs:
2828
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
2929
sudo apt-get update
3030
31+
- name: Cache apt archives
32+
uses: actions/cache@v4
33+
with:
34+
path: /var/cache/apt/archives
35+
key: apt-arm64-jazzy-${{ hashFiles('.github/workflows/build-arm64.yml') }}
36+
3137
- name: Install ROS2 and build tooling
3238
run: |
3339
sudo apt-get install -y \
@@ -43,17 +49,28 @@ jobs:
4349
pkg-config \
4450
libsdl2-dev
4551
52+
- name: Cache colcon build
53+
uses: actions/cache@v4
54+
with:
55+
path: |
56+
build
57+
install
58+
log
59+
key: colcon-arm64-${{ hashFiles('src/**/CMakeLists.txt', 'src/**/package.xml', 'src/**/*.cpp', 'src/**/*.hpp', 'src/**/*.h', 'src/**/*.py') }}
60+
restore-keys: |
61+
colcon-arm64-
62+
4663
- name: Build ROS2 workspace
4764
run: |
4865
source /opt/ros/jazzy/setup.bash
49-
colcon build
66+
colcon build --parallel-workers $(nproc)
5067
5168
- name: Build dashboard UI
5269
run: |
5370
source /opt/ros/jazzy/setup.bash
5471
source install/setup.bash
5572
cmake -S LART_Car_Dashboard_v1/src/ui -B LART_Car_Dashboard_v1/build/ui-build -DCMAKE_BUILD_TYPE=Release
56-
cmake --build LART_Car_Dashboard_v1/build/ui-build --parallel 2
73+
cmake --build LART_Car_Dashboard_v1/build/ui-build --parallel $(nproc)
5774
5875
- name: Package artifact
5976
run: tar czf lart-dashboard-arm64.tar.gz install LART_Car_Dashboard_v1/build/ui-build

0 commit comments

Comments
 (0)