Update build_aarch64.yml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build ROS2 package on aarch64 for RPi | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow on push events to the main branch. | |
jobs: | |
aarch64_job: | |
runs-on: ubuntu-22.04 | |
name: Build on ubuntu-22.04 aarch64 | |
steps: | |
- uses: uraimo/run-on-arch-action@v2 | |
name: Run commands | |
id: runcmd | |
with: | |
arch: aarch64 | |
distro: ubuntu22.04 | |
githubToken: ${{ secrets.MY_GITHUB_TOKEN }} | |
setup: | | |
mkdir -p "${PWD}/artifacts" | |
dockerRunArgs: | | |
--volume "${PWD}/artifacts:/artifacts" | |
shell: /bin/sh | |
install: | | |
apt-get update | |
apt-get install -y curl gnupg lsb-release git | |
# Set an output parameter `uname` for use in subsequent steps | |
run: | | |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | |
echo "deb [signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | |
apt update | |
apt install -y python3-colcon-common-extensions python3-rosdep python3-vcstool | |
mkdir -p ros_ws/src | |
cd ros_ws/src | |
git clone https://${{ secrets.MY_GITHUB_TOKEN }}@github.com/RaduLucianR/ros2-latency-analysis.git | |
cd | |
rosdep init | |
rosdep update | |
rosdep install --from-paths ros_ws/src --ignore-src -r -y --rosdistro humble | |
source /opt/ros/humble/setup.bash | |
cd ros_ws | |
colcon build --symlink-install | |
cd | |
cp -r ros_ws "/artifacts/ros_ws" | |
echo "Produced artifact at /artifacts/ros_ws" | |
- name: Archive the build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ros2-workspace-artifact | |
path: ${PWD}/artifacts/ros_ws | |