-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (89 loc) · 2.72 KB
/
front-github-actions.yml
File metadata and controls
102 lines (89 loc) · 2.72 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
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
name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions:
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- 'lts'
- '1'
os:
- ubuntu-22.04
arch:
- x64
steps:
# Checkout the code
- name: Checkout Repository
uses: actions/checkout@v4
# Set up Julia environment
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
# Cache Julia dependencies
- name: Cache Julia Dependencies
uses: julia-actions/cache@v2
# Set up ROS 2
- name: Set up ROS 2 Humble
run: |
# Add ROS 2 repository
sudo apt update
sudo apt install -y curl gnupg lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
# Install ROS 2
sudo apt update
sudo apt install -y ros-humble-desktop
# Install ROS dependencies
- name: Install ROS Dependencies
run: |
sudo apt install -y \
python3-colcon-common-extensions \
python3-rosdep \
python3-vcstool
# Initialize rosdep
- name: Initialize rosdep
run: |
sudo rosdep init
rosdep update
# Prepare ROS environment
- name: Prepare ROS Environment
run: |
# Create a script to source ROS setup
echo '#!/bin/bash
source /opt/ros/humble/setup.bash' > $GITHUB_WORKSPACE/ros_setup.sh
chmod +x $GITHUB_WORKSPACE/ros_setup.sh
# Run tests with ROS environment
- name: Run Tests
run: |
$GITHUB_WORKSPACE/ros_setup.sh
source /opt/ros/humble/setup.bash
julia --project=. -e 'using Pkg; Pkg.test()'
shell: bash
# Optional: Upload coverage
- name: Upload Coverage
uses: codecov/codecov-action@v3
if: success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false