Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
628b9e2
feat: 优化系统源配置和rosdep一键安装工具网络选项
tangsangsimida Aug 4, 2025
650d5e3
Merge branch 'fishros:master' into master
tangsangsimida Aug 7, 2025
d1a9315
feat(tools): 支持选择中科大 ROS 镜像源
tangsangsimida Aug 29, 2025
ade9adb
refactor(tools): 优化 ROS 源添加流程
tangsangsimida Aug 29, 2025
49657eb
refactor(tools): 优化 ROS 安装工具的退出处理
tangsangsimida Aug 29, 2025
e220cc8
fix(tools): 修复rosdepc函数中print_warn的错误调用
tangsangsimida Sep 17, 2025
a982a56
refactor(tools): 精简 tool_config_rosdep.py 文件
tangsangsimida Sep 17, 2025
c6e7812
refactor(tools): 精简 tool_config_rosdep.py 中的导入信息
tangsangsimida Sep 17, 2025
b8a6c5d
refactor(install): 优化代码结构和错误处理
tangsangsimida Sep 17, 2025
1ee4dc2
refactor(base.py, tool_config_rosdep.py): 更新字符串格式化方法
tangsangsimida Sep 18, 2025
f473822
fix(tool):移除部分不支持ros1的系统编号
tangsangsimida Sep 18, 2025
7774e36
Merge branch 'fishros:master' into master
tangsangsimida Sep 20, 2025
d30d8d9
feat(test): 添加自动化测试工作流和测试 (#1)
tangsangsimida Oct 10, 2025
f62e0d2
ci(test-install): 更新测试工作流中的Ubuntu版本矩阵
awan-deng Oct 10, 2025
d15f6a7
feat(tests): 移除旧的安装脚本测试相关文件
tangsangsimida Oct 17, 2025
e350fb2
fix(tools): 修复文件创建权限冲突问题并清理临时文件
tangsangsimida Oct 18, 2025
5c79f88
add GitHub ci docker test (#2)
tangsangsimida Oct 18, 2025
556f080
refactor(tests): 统一将f-string格式化替换为str.format方法
tangsangsimida Oct 18, 2025
cdee1c3
Merge branch 'fishros:master' into master
tangsangsimida Oct 22, 2025
e5be3d1
Merge branch 'fishros:master' into dev
tangsangsimida Oct 22, 2025
17d9124
Merge branch 'dev'
tangsangsimida Oct 23, 2025
26621ec
Merge branch 'fishros:master' into master
tangsangsimida Oct 31, 2025
2119cc7
fix(tools): 优化了GitHub工作流测试流程
tangsangsimida Oct 31, 2025
db7d0e5
fix(tests): 更新fish安装测试配置文件中的ROS版本描述
tangsangsimida Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
267 changes: 261 additions & 6 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,212 @@ on:
branches: [ dev, master, github_ci_docker_test ]

jobs:
test-install:
generate-test-matrix-by-os:
runs-on: ubuntu-latest
outputs:
bionic_matrix: ${{ steps.set-bionic-matrix.outputs.matrix }}
focal_matrix: ${{ steps.set-focal-matrix.outputs.matrix }}
jammy_matrix: ${{ steps.set-jammy-matrix.outputs.matrix }}
noble_matrix: ${{ steps.set-noble-matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyyaml
- name: Generate bionic matrix
id: set-bionic-matrix
run: |
python -c "
import yaml
import json
with open('tests/fish_install_test.yaml', 'r') as f:
test_cases = yaml.safe_load(f)

# 过滤出bionic系统的测试用例
bionic_tests = [case for case in test_cases if case.get('target_os_version') == 'bionic']
matrix = {'include': []}
for i, case in enumerate(bionic_tests):
matrix['include'].append({
'test_name': case['name'],
'test_index': test_cases.index(case)
})

print('matrix=' + json.dumps(matrix))
" >> $GITHUB_OUTPUT
- name: Generate focal matrix
id: set-focal-matrix
run: |
python -c "
import yaml
import json
with open('tests/fish_install_test.yaml', 'r') as f:
test_cases = yaml.safe_load(f)

# 过滤出focal系统的测试用例
focal_tests = [case for case in test_cases if case.get('target_os_version') == 'focal']
matrix = {'include': []}
for i, case in enumerate(focal_tests):
matrix['include'].append({
'test_name': case['name'],
'test_index': test_cases.index(case)
})

print('matrix=' + json.dumps(matrix))
" >> $GITHUB_OUTPUT
- name: Generate jammy matrix
id: set-jammy-matrix
run: |
python -c "
import yaml
import json
with open('tests/fish_install_test.yaml', 'r') as f:
test_cases = yaml.safe_load(f)

# 过滤出jammy系统的测试用例
jammy_tests = [case for case in test_cases if case.get('target_os_version') == 'jammy']
matrix = {'include': []}
for i, case in enumerate(jammy_tests):
matrix['include'].append({
'test_name': case['name'],
'test_index': test_cases.index(case)
})

print('matrix=' + json.dumps(matrix))
" >> $GITHUB_OUTPUT
- name: Generate noble matrix
id: set-noble-matrix
run: |
python -c "
import yaml
import json
with open('tests/fish_install_test.yaml', 'r') as f:
test_cases = yaml.safe_load(f)

# 过滤出noble系统的测试用例
noble_tests = [case for case in test_cases if case.get('target_os_version') == 'noble']
matrix = {'include': []}
for i, case in enumerate(noble_tests):
matrix['include'].append({
'test_name': case['name'],
'test_index': test_cases.index(case)
})

print('matrix=' + json.dumps(matrix))
" >> $GITHUB_OUTPUT

test-install-bionic:
needs: generate-test-matrix-by-os
if: ${{ needs.generate-test-matrix-by-os.outputs.bionic_matrix != '{}' }}
strategy:
matrix: ${{ fromJSON(needs.generate-test-matrix-by-os.outputs.bionic_matrix) }}
# max-parallel: 2
fail-fast: false # 即使某些测试失败,也继续运行其他测试
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run tests in Docker container
run: |
TEST_CASE="bionic"
echo "Using Ubuntu version: $TEST_CASE"

docker run --rm \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
ubuntu:$TEST_CASE \
bash -c "
set -u &&
export DEBIAN_FRONTEND=noninteractive &&
# Set timezone to avoid tzdata interactive prompt
ln -sf /usr/share/zoneinfo/UTC /etc/localtime &&
apt update &&
apt install -y locales &&
locale-gen en_US.UTF-8 &&
export LANG=en_US.UTF-8 &&
export LC_ALL=en_US.UTF-8 &&
apt update && apt install -y sudo python3 python3-pip python3-venv python3-yaml python3-distro wget &&
python3 -m venv /tmp/test_env &&
source /tmp/test_env/bin/activate &&
pip install --upgrade pip &&
pip install pyyaml distro &&
cd tests &&
PYTHONIOENCODING=utf-8 python3 -u test_runner.py --target-os-version $TEST_CASE --test-index ${{ matrix.test_index }}
"
- name: Upload test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports-${{ matrix.test_name }}
path: |
tests/test_report.json
tests/test_report.html
if-no-files-found: ignore

test-install-focal:
needs: generate-test-matrix-by-os
if: ${{ needs.generate-test-matrix-by-os.outputs.focal_matrix != '{}' }}
strategy:
matrix: ${{ fromJSON(needs.generate-test-matrix-by-os.outputs.focal_matrix) }}
max-parallel: 2
fail-fast: false # 即使某些测试失败,也继续运行其他测试
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run tests in Docker container
run: |
TEST_CASE="focal"
echo "Using Ubuntu version: $TEST_CASE"

docker run --rm \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
ubuntu:$TEST_CASE \
bash -c "
set -u &&
export DEBIAN_FRONTEND=noninteractive &&
# Set timezone to avoid tzdata interactive prompt
ln -sf /usr/share/zoneinfo/UTC /etc/localtime &&
apt update &&
apt install -y locales &&
locale-gen en_US.UTF-8 &&
export LANG=en_US.UTF-8 &&
export LC_ALL=en_US.UTF-8 &&
apt update && apt install -y sudo python3 python3-pip python3-venv python3-yaml python3-distro wget &&
python3 -m venv /tmp/test_env &&
source /tmp/test_env/bin/activate &&
pip install --upgrade pip &&
pip install pyyaml distro &&
cd tests &&
PYTHONIOENCODING=utf-8 python3 -u test_runner.py --target-os-version $TEST_CASE --test-index ${{ matrix.test_index }}
"
- name: Upload test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports-${{ matrix.test_name }}
path: |
tests/test_report.json
tests/test_report.html
if-no-files-found: ignore

test-install-jammy:
needs: generate-test-matrix-by-os
if: ${{ needs.generate-test-matrix-by-os.outputs.jammy_matrix != '{}' }}
strategy:
matrix:
ubuntu_version: [18.04, 20.04, 22.04, 24.04]
matrix: ${{ fromJSON(needs.generate-test-matrix-by-os.outputs.jammy_matrix) }}
max-parallel: 2
fail-fast: false # 即使某些测试失败,也继续运行其他测试
runs-on: ubuntu-latest

steps:
Expand All @@ -19,10 +221,13 @@ jobs:

- name: Run tests in Docker container
run: |
TEST_CASE="jammy"
echo "Using Ubuntu version: $TEST_CASE"

docker run --rm \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
ubuntu:${{ matrix.ubuntu_version }} \
ubuntu:$TEST_CASE \
bash -c "
set -u &&
export DEBIAN_FRONTEND=noninteractive &&
Expand All @@ -39,14 +244,64 @@ jobs:
pip install --upgrade pip &&
pip install pyyaml distro &&
cd tests &&
PYTHONIOENCODING=utf-8 python3 -u test_runner.py
PYTHONIOENCODING=utf-8 python3 -u test_runner.py --target-os-version $TEST_CASE --test-index ${{ matrix.test_index }}
"
- name: Upload test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports-ubuntu-${{ matrix.ubuntu_version }}
name: test-reports-${{ matrix.test_name }}
path: |
tests/test_report.json
tests/test_report.html
if-no-files-found: ignore

test-install-noble:
needs: generate-test-matrix-by-os
if: ${{ needs.generate-test-matrix-by-os.outputs.noble_matrix != '{}' }}
strategy:
matrix: ${{ fromJSON(needs.generate-test-matrix-by-os.outputs.noble_matrix) }}
max-parallel: 2
fail-fast: false # 即使某些测试失败,也继续运行其他测试
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run tests in Docker container
run: |
TEST_CASE="noble"
echo "Using Ubuntu version: $TEST_CASE"

docker run --rm \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
ubuntu:$TEST_CASE \
bash -c "
set -u &&
export DEBIAN_FRONTEND=noninteractive &&
# Set timezone to avoid tzdata interactive prompt
ln -sf /usr/share/zoneinfo/UTC /etc/localtime &&
apt update &&
apt install -y locales &&
locale-gen en_US.UTF-8 &&
export LANG=en_US.UTF-8 &&
export LC_ALL=en_US.UTF-8 &&
apt update && apt install -y sudo python3 python3-pip python3-venv python3-yaml python3-distro wget &&
python3 -m venv /tmp/test_env &&
source /tmp/test_env/bin/activate &&
pip install --upgrade pip &&
pip install pyyaml distro &&
cd tests &&
PYTHONIOENCODING=utf-8 python3 -u test_runner.py --target-os-version $TEST_CASE --test-index ${{ matrix.test_index }}
"
- name: Upload test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports-${{ matrix.test_name }}
path: |
tests/test_report.json
tests/test_report.html
if-no-files-found: ignore
27 changes: 16 additions & 11 deletions tests/fish_install_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@
# target_os_version: "目标系统版本代号" (可选,如果不指定则适用于所有系统)
# chooses: [{choose: <选项ID>, desc: <选项描述>}]


# 为不同的 Ubuntu 版本定义具体的测试配置
# Ubuntu 18.04 (bionic) - Melodic
##################################################################################################################################################################
# Ubuntu 18.04 (bionic)
- name: "Install_ROS_bionic_source1"
target_os_version: "bionic"
chooses:
- { choose: 1, desc: "一键安装(推荐):ROS(支持ROS/ROS2,树莓派Jetson)" }
- { choose: 2, desc: "不更换系统源再继续安装" }
- { choose: 1, desc: "清华源" }
- { choose: 1, desc: "支持的第一个ros版本" }
- { choose: 1, desc: "中科大源" }
- { choose: 5, desc: "支持的第5个ros版本" } # 中科大,清华,华为,中山大学源不支持Ubuntu18.04安装ros2-bouncy 其余ros2没测试
- { choose: 2, desc: "基础版(小)" }

- name: "Install_ROS_bionic_source2"
target_os_version: "bionic"
chooses:
- { choose: 1, desc: "一键安装(推荐):ROS(支持ROS/ROS2,树莓派Jetson)" }
- { choose: 2, desc: "不更换系统源再继续安装" }
- { choose: 2, desc: "中科大源" }
- { choose: 1, desc: "支持的第一个ros版本" }
- { choose: 2, desc: "清华源" }
- { choose: 5, desc: "支持的第5个ros版本" }
- { choose: 2, desc: "基础版(小)" }

- name: "Install_ROS_bionic_source3"
Expand All @@ -30,7 +32,7 @@
- { choose: 1, desc: "一键安装(推荐):ROS(支持ROS/ROS2,树莓派Jetson)" }
- { choose: 2, desc: "不更换系统源再继续安装" }
- { choose: 3, desc: "华为源" }
- { choose: 1, desc: "支持的第一个ros版本" }
- { choose: 5, desc: "支持的第5个ros版本" }
- { choose: 2, desc: "基础版(小)" }

- name: "Install_ROS_bionic_source4"
Expand All @@ -39,7 +41,7 @@
- { choose: 1, desc: "一键安装(推荐):ROS(支持ROS/ROS2,树莓派Jetson)" }
- { choose: 2, desc: "不更换系统源再继续安装" }
- { choose: 4, desc: "中山大学源" }
- { choose: 1, desc: "支持的第一个ros版本" }
- { choose: 5, desc: "支持的第5个ros版本" }
- { choose: 2, desc: "基础版(小)" }

- name: "Install_ROS_bionic_source5"
Expand All @@ -48,10 +50,11 @@
- { choose: 1, desc: "一键安装(推荐):ROS(支持ROS/ROS2,树莓派Jetson)" }
- { choose: 2, desc: "不更换系统源再继续安装" }
- { choose: 5, desc: "ROS官方源" }
- { choose: 1, desc: "支持的第一个ros版本" }
- { choose: 5, desc: "支持的第5个ros版本" }
- { choose: 2, desc: "基础版(小)" }

# Ubuntu 20.04 (focal) - Noetic 或 Foxy
##################################################################################################################################################################
# Ubuntu 20.04 (focal)
- name: "Install_ROS_focal_noetic"
target_os_version: "focal"
chooses:
Expand All @@ -78,7 +81,8 @@
# - { choose: 1, desc: "支持的第一个ros版本" }
# - { choose: 2, desc: "基础版(小)" }

# Ubuntu 22.04 (jammy) - Humble
##################################################################################################################################################################
# Ubuntu 22.04 (jammy)
- name: "Install_ROS_jammy"
target_os_version: "jammy"
chooses:
Expand All @@ -88,7 +92,8 @@
- { choose: 1, desc: "支持的第一个ros版本" }
- { choose: 2, desc: "基础版(小)" }

# Ubuntu 24.04 (noble) - Jazzy
##################################################################################################################################################################
# Ubuntu 24.04 (noble)
- name: "Install_ROS_noble"
target_os_version: "noble"
chooses:
Expand Down
Loading