File tree Expand file tree Collapse file tree 2 files changed +35
-10
lines changed
Expand file tree Collapse file tree 2 files changed +35
-10
lines changed Original file line number Diff line number Diff line change 77 runs-on : ubuntu-latest
88 strategy :
99 matrix :
10- python-version_ubuntu-latest : ["3.10", 3.11]
10+ python-version : ["3.10", " 3.11", "3.12" ]
1111
1212 steps :
13131414
15- - name : Set up Python ${{ matrix.python-version_ubuntu-latest }}
15+ - name : Set up Python ${{ matrix.python-version }}
16161717 with :
18- python-version : ${{ matrix.python-version_ubuntu-latest }}
18+ python-version : ${{ matrix.python-version }}
1919
2020 - name : Install dependencies
2121 run : python -m pip install --upgrade pip setuptools wheel
5454 run : pip install pre-commit
5555
5656 - name : pre-commit cache
57- uses : actions/cache@v3.3.2
57+ uses : actions/cache@v4
5858 with :
5959 path : ~/.cache/pre-commit
6060 key : " ${{ hashFiles('.pre-commit-config.yaml') }}"
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -euo pipefail
23
34if [ ! -d venv ]; then
45 for p in " py -3.8" " py -3" " python3.8" " python3" " python" ; do
@@ -10,11 +11,35 @@ if [ ! -d venv ]; then
1011 ${pycmd:? Could not determine python executable} -m venv venv
1112fi
1213
13- if [ " $GIT_ACTION " = true ]; then
14- venv/* /pip install -e .
15- venv/* /pip install --find-links wheels -e .
16- else
17- venv/* /pip install -e src/ros2model
14+ shopt -s nullglob
15+ pip_candidates=(venv/bin/pip venv/* /pip)
16+ pip_cmd=" "
17+ for candidate in " ${pip_candidates[@]} " ; do
18+ if [ -x " $candidate " ]; then
19+ pip_cmd=" $candidate "
20+ break
21+ fi
22+ done
23+ shopt -u nullglob
24+
25+ if [ -z " $pip_cmd " ]; then
26+ echo " Could not locate pip inside the virtual environment." >&2
27+ exit 1
28+ fi
1829
19- venv/* /pip install --find-links wheels -e src/ros2model
30+ extra_args=()
31+ if [ -d wheels ] && compgen -G " wheels/*" > /dev/null; then
32+ extra_args=(--find-links wheels)
33+ fi
34+
35+ if [ " ${GIT_ACTION:- false} " = true ]; then
36+ " $pip_cmd " install -e .
37+ if [ " ${# extra_args[@]} " -gt 0 ]; then
38+ " $pip_cmd " install " ${extra_args[@]} " -e .
39+ fi
40+ else
41+ " $pip_cmd " install -e src/ros2model
42+ if [ " ${# extra_args[@]} " -gt 0 ]; then
43+ " $pip_cmd " install " ${extra_args[@]} " -e src/ros2model
44+ fi
2045fi
You can’t perform that action at this time.
0 commit comments