Skip to content

Commit 84fb13f

Browse files
Merge pull request #5 from Michi-Tsubaki/tsubaki/ros-pubsub
Closes #4
2 parents 8442f52 + 3f01afb commit 84fb13f

24 files changed

+1519
-305
lines changed
Lines changed: 71 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
name: CI
2+
23
on:
34
push:
45
branches:
56
- main
67
tags: ['*']
78
pull_request:
89
workflow_dispatch:
10+
911
concurrency:
10-
# Skip intermediate builds: always.
11-
# Cancel intermediate builds: only if it is a pull request build.
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
1415
jobs:
1516
test:
1617
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1718
runs-on: ${{ matrix.os }}
1819
timeout-minutes: 60
19-
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
20+
permissions:
2021
actions: write
2122
contents: read
2223
strategy:
@@ -26,15 +27,76 @@ jobs:
2627
- 'lts'
2728
- '1'
2829
os:
29-
- ubuntu-latest
30+
- ubuntu-22.04
3031
arch:
3132
- x64
33+
3234
steps:
33-
- uses: actions/checkout@v4
34-
- uses: julia-actions/setup-julia@v2
35+
# Checkout the code
36+
- name: Checkout Repository
37+
uses: actions/checkout@v4
38+
39+
# Set up Julia environment
40+
- name: Set up Julia
41+
uses: julia-actions/setup-julia@v2
3542
with:
3643
version: ${{ matrix.version }}
3744
arch: ${{ matrix.arch }}
38-
- uses: julia-actions/cache@v2
39-
- uses: julia-actions/julia-buildpkg@v1
40-
- uses: julia-actions/julia-runtest@v1
45+
46+
# Cache Julia dependencies
47+
- name: Cache Julia Dependencies
48+
uses: julia-actions/cache@v2
49+
50+
# Set up ROS 2
51+
- name: Set up ROS 2 Humble
52+
run: |
53+
# Add ROS 2 repository
54+
sudo apt update
55+
sudo apt install -y curl gnupg lsb-release
56+
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
57+
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'
58+
59+
# Install ROS 2
60+
sudo apt update
61+
sudo apt install -y ros-humble-desktop
62+
63+
# Install ROS dependencies
64+
- name: Install ROS Dependencies
65+
run: |
66+
sudo apt install -y \
67+
python3-colcon-common-extensions \
68+
python3-rosdep \
69+
python3-vcstool
70+
71+
# Initialize rosdep
72+
- name: Initialize rosdep
73+
run: |
74+
sudo rosdep init
75+
rosdep update
76+
77+
# Prepare ROS environment
78+
- name: Prepare ROS Environment
79+
run: |
80+
# Create a script to source ROS setup
81+
echo '#!/bin/bash
82+
source /opt/ros/humble/setup.bash' > $GITHUB_WORKSPACE/ros_setup.sh
83+
chmod +x $GITHUB_WORKSPACE/ros_setup.sh
84+
85+
# Run tests with ROS environment
86+
- name: Run Tests
87+
run: |
88+
$GITHUB_WORKSPACE/ros_setup.sh
89+
source /opt/ros/humble/setup.bash
90+
julia --project=. -e 'using Pkg; Pkg.test()'
91+
shell: bash
92+
93+
# Optional: Upload coverage
94+
- name: Upload Coverage
95+
uses: codecov/codecov-action@v3
96+
if: success()
97+
with:
98+
token: ${{ secrets.CODECOV_TOKEN }}
99+
files: ./lcov.info
100+
flags: unittests
101+
name: codecov-umbrella
102+
fail_ci_if_error: false

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.jl.*.cov
2+
*.jl.cov
3+
*.jl.mem
4+
/Manifest.toml

Manifest.toml

Lines changed: 0 additions & 242 deletions
This file was deleted.

Project.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ authors = ["Michi-Tsubaki <michi.tsubaki.tech@gmail.com>"]
44
version = "0.1.0"
55

66
[deps]
7-
7+
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
88

99
[compat]
1010
Aqua = "0.8.9"
11-
ReTestItems = "1.29.0"
12-
Test = "1"
1311
Example = "0.5"
1412
MuJoCo_jll = "2"
13+
ReTestItems = "1.29.0"
1514
StaticArrays = "1"
16-
julia = "1.11.3"
15+
Test = "1"
16+
julia = "1.10.3"
17+
PyCall = "1.96.4"
1718

1819
[extras]
1920
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

0 commit comments

Comments
 (0)