From 4c68f8643c29b5b3509483ea30e9e45289de02e1 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Wed, 23 Nov 2022 21:13:14 -0800 Subject: [PATCH 1/4] Never use flake8 >= 6 (#11) This is a stop-gap until we can update the individual test modules in ALL of the colcon repositories to either specifically exclude or otherwise support flake8 6. --- action.yaml | 4 ++-- constraints.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 constraints.txt diff --git a/action.yaml b/action.yaml index 70bd90a..fa7bf40 100644 --- a/action.yaml +++ b/action.yaml @@ -19,9 +19,9 @@ runs: echo ::group::Install dependencies # Install dependencies, including any 'test' extras - python -m pip install -U -e .[test] + 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 -U pytest-cov + 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 echo ::endgroup:: echo ::group::Run tests diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 0000000..396e13f --- /dev/null +++ b/constraints.txt @@ -0,0 +1 @@ +flake8<6 From 4ef72115954df3fa13892c0453bb7d4137601030 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Wed, 14 Dec 2022 14:42:13 -0800 Subject: [PATCH 2/4] Select which platforms check stdeb using matrix (#10) --- action.yaml | 2 +- strategy.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index fa7bf40..755edf6 100644 --- a/action.yaml +++ b/action.yaml @@ -35,7 +35,7 @@ runs: git clone https://github.com/dirk-thomas/publish-python.git $PUBLISH_PYTHON python -m pip install -U PyYAML wheel python $PUBLISH_PYTHON/bin/publish-python wheel:pypi - if [ -f /etc/debian_version ]; then + if [ ! -z "${{matrix.stdeb-check}}" ]; then sudo apt install -y debhelper dh-python fakeroot python3-all python3-stdeb python3-yaml DEB_BUILD_OPTIONS=nocheck /usr/bin/python3 $PUBLISH_PYTHON/bin/publish-python stdeb:packagecloud else diff --git a/strategy.json b/strategy.json index a2b5e7c..392ede9 100644 --- a/strategy.json +++ b/strategy.json @@ -6,6 +6,10 @@ { "os": "ubuntu-20.04", "python": "3.6" + }, + { + "os": "ubuntu-latest", + "stdeb-check": "1" } ] } From c72ceb3ea35231928e33e41349ed60906cfa1e02 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Mon, 28 Aug 2023 12:48:35 -0500 Subject: [PATCH 3/4] Use constraints to install development HEADs (#3) 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. --- action.yaml | 8 ++++---- constraints.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index 755edf6..c7c9d93 100644 --- a/action.yaml +++ b/action.yaml @@ -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 diff --git a/constraints.txt b/constraints.txt index 396e13f..5715f53 100644 --- a/constraints.txt +++ b/constraints.txt @@ -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 From 641cfdfee30008e12f752953c03d34c41f122ff8 Mon Sep 17 00:00:00 2001 From: mosfet80 Date: Tue, 29 Aug 2023 00:28:13 +0200 Subject: [PATCH 4/4] Update ci.yaml (#12) switch to actions/checkout@v3 from v2 switch to actions/setup-python@v4 from v2 address another deprecation in GitHub Actions Co-authored-by: Scott K Logan --- .github/workflows/ci.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c1a4207..8971f0b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,9 +12,9 @@ jobs: strategy: ${{steps.load.outputs.strategy}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - id: load - run: echo "::set-output name=strategy::$(echo $(cat strategy.json))" + run: echo "strategy=$(echo $(cat strategy.json))" >> $GITHUB_OUTPUT canary: needs: [setup] @@ -22,16 +22,16 @@ jobs: runs-on: ${{matrix.os}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # Choose colcon-notification for a canary build. It has colcon # dependencies and debian patches, so exercieses a fair amount of the # CI action features. repository: colcon/colcon-notification - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{matrix.python}} - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: colcon_ci - uses: ./colcon_ci/