Skip to content

Commit

Permalink
Use constraints to install development HEADs (#3)
Browse files Browse the repository at this point in the history
Rather than using the freeze-then-update strategy to ensure that the
development HEAD of colcon repositories are used for colcon package CI,
use a constraints file.

This should be a bit more efficient.
  • Loading branch information
cottsay authored Aug 28, 2023
1 parent 4ef7211 commit c72ceb3
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
8 changes: 4 additions & 4 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ runs:
echo ::endgroup::
echo ::group::Install dependencies
# Install dependencies, including any 'test' extras
python -m pip install -c $GITHUB_ACTION_PATH/constraints.txt -U -e .[test]
# Install pytest-cov and use HEAD for any colcon packages
python -m pip freeze | { grep ^colcon || :; } | sed 's|\(.*\)==.*|git+https://github.com/colcon/\1.git|g' | xargs python -m pip install -c $GITHUB_ACTION_PATH/constraints.txt -U pytest-cov
# Remove this package from constraints
grep -v "^$(python setup.py --name)@" ${GITHUB_ACTION_PATH}/constraints.txt > constraints.txt
# Install dependencies, including any 'test' extras, as well as pytest-cov
python -m pip install -U -e .[test] pytest-cov -c constraints.txt
echo ::endgroup::
echo ::group::Run tests
Expand Down
45 changes: 45 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
colcon-alias@ git+https://github.com/colcon/colcon-alias.git
colcon-argcomplete@ git+https://github.com/colcon/colcon-argcomplete.git
colcon-bash@ git+https://github.com/colcon/colcon-bash.git
colcon-bazel@ git+https://github.com/colcon/colcon-bazel.git
colcon-bundle@ git+https://github.com/colcon/colcon-bundle.git
colcon-cargo@ git+https://github.com/colcon/colcon-cargo.git
colcon-cd@ git+https://github.com/colcon/colcon-cd.git
colcon-clean@ git+https://github.com/colcon/colcon-clean.git
colcon-cmake@ git+https://github.com/colcon/colcon-cmake.git
colcon-common-extensions@ git+https://github.com/colcon/colcon-common-extensions.git
colcon-core@ git+https://github.com/colcon/colcon-core.git
colcon-coveragepy-result@ git+https://github.com/colcon/colcon-coveragepy-result.git
colcon-defaults@ git+https://github.com/colcon/colcon-defaults.git
colcon-devtools@ git+https://github.com/colcon/colcon-devtools.git
colcon-ed@ git+https://github.com/colcon/colcon-ed.git
colcon-gradle@ git+https://github.com/colcon/colcon-gradle.git
colcon-graphviz-anim@ git+https://github.com/colcon/colcon-graphviz-anim.git
colcon-hardware-acceleration@ git+https://github.com/colcon/colcon-hardware-acceleration.git
colcon-installed-package-information@ git+https://github.com/colcon/colcon-installed-package-information.git
colcon-lcov-result@ git+https://github.com/colcon/colcon-lcov-result.git
colcon-library-path@ git+https://github.com/colcon/colcon-library-path.git
colcon-meson@ git+https://github.com/colcon/colcon-meson.git
colcon-metadata@ git+https://github.com/colcon/colcon-metadata.git
colcon-mixin@ git+https://github.com/colcon/colcon-mixin.git
colcon-notification@ git+https://github.com/colcon/colcon-notification.git
colcon-output@ git+https://github.com/colcon/colcon-output.git
colcon-override-check@ git+https://github.com/colcon/colcon-override-check.git
colcon-package-information@ git+https://github.com/colcon/colcon-package-information.git
colcon-package-selection@ git+https://github.com/colcon/colcon-package-selection.git
colcon-parallel-executor@ git+https://github.com/colcon/colcon-parallel-executor.git
colcon-pkg-config@ git+https://github.com/colcon/colcon-pkg-config.git
colcon-powershell@ git+https://github.com/colcon/colcon-powershell.git
colcon-python-setup-py@ git+https://github.com/colcon/colcon-python-setup-py.git
colcon-recursive-crawl@ git+https://github.com/colcon/colcon-recursive-crawl.git
colcon-rerun@ git+https://github.com/colcon/colcon-rerun.git
colcon-ros-bazel@ git+https://github.com/colcon/colcon-ros-bazel.git
colcon-ros-bundle@ git+https://github.com/colcon/colcon-ros-bundle.git
colcon-ros-cargo@ git+https://github.com/colcon/colcon-ros-cargo.git
colcon-ros-domain-id-coordinator@ git+https://github.com/colcon/colcon-ros-domain-id-coordinator.git
colcon-ros@ git+https://github.com/colcon/colcon-ros.git
colcon-ros-gradle@ git+https://github.com/colcon/colcon-ros-gradle.git
colcon-sanitizer-reports@ git+https://github.com/colcon/colcon-sanitizer-reports.git
colcon-spawn-shell@ git+https://github.com/colcon/colcon-spawn-shell.git
colcon-test-result@ git+https://github.com/colcon/colcon-test-result.git
colcon-zsh@ git+https://github.com/colcon/colcon-zsh.git
flake8<6

0 comments on commit c72ceb3

Please sign in to comment.