-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GitHub workflows to use Docker, and Focal (#401)
This pull request introduces two changes: a/ lint.yml is using the latest version of action-ros-lint, and runs it on a Docker image built by ros-tooling/setup-ros-docker. Using a docker image instead of ros-tooling/setup-ros removes the need for running APT, and other commands which requires internet connectivity and may become a source of flakyness in the CI pipeline. Instead, the worker runs a Docker image with the linter pre-installed. b/ test.yml now uses a Focal docker image. This also allows us to skip invoking ros-tooling/setup-ros, which speeds up the CI, and reduces risks of flakyness. Signed-off-by: Thomas Moulard <[email protected]>
- Loading branch information
1 parent
df6e83e
commit 69c5893
Showing
2 changed files
with
38 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
# Run linters automatically on pull requests. | ||
# | ||
# ros-tooling/actino-ros-lint is relying on the latest APT binary packages. | ||
# As of 2020-05-01, Eloquent is the latest release for which APT binary | ||
# packages are available, which is why the Docker image is based on Eloquent. | ||
name: Lint rosbag2 | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
ament_copyright: | ||
name: ament_copyright | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rostooling/setup-ros-docker:ubuntu-bionic-ros-eloquent-ros-base-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
# TODO(setup-ros-docker#7): calling chown is necessary for now | ||
- run: sudo chown -R rosbuild:rosbuild "$HOME" . | ||
- uses: actions/checkout@v2 | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
linter: copyright | ||
package-name: | | ||
|
@@ -25,11 +32,14 @@ jobs: | |
ament_xmllint: | ||
name: ament_xmllint | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rostooling/setup-ros-docker:ubuntu-bionic-ros-eloquent-ros-base-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
# TODO(setup-ros-docker#7): calling chown is necessary for now | ||
- run: sudo chown -R rosbuild:rosbuild "$HOME" . | ||
- uses: actions/checkout@v2 | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
linter: xmllint | ||
package-name: | | ||
|
@@ -46,15 +56,18 @@ jobs: | |
ament_lint_cpp: # Linters applicable to C++ packages | ||
name: ament_${{ matrix.linter }} | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rostooling/setup-ros-docker:ubuntu-bionic-ros-eloquent-ros-base-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
linter: [cppcheck, cpplint, uncrustify] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
# TODO(setup-ros-docker#7): calling chown is necessary for now | ||
- run: sudo chown -R rosbuild:rosbuild "$HOME" . | ||
- uses: actions/checkout@v2 | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
linter: ${{ matrix.linter }} | ||
package-name: | | ||
|
@@ -68,15 +81,18 @@ jobs: | |
ament_lint_python: # Linters applicable to Python packages | ||
name: ament_${{ matrix.linter }} | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rostooling/setup-ros-docker:ubuntu-bionic-ros-eloquent-ros-base-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
linter: [flake8, pep257] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
# TODO(setup-ros-docker#7): calling chown is necessary for now | ||
- run: sudo chown -R rosbuild:rosbuild "$HOME" . | ||
- uses: actions/checkout@v2 | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
linter: ${{ matrix.linter }} | ||
package-name: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,13 @@ on: | |
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rostooling/setup-ros-docker:ubuntu-focal-latest | ||
steps: | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
# TODO(setup-ros-docker#7): calling chown is necessary for now | ||
- run: sudo chown -R rosbuild:rosbuild "$HOME" . | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
package-name: | | ||
ros2bag | ||
|