ros-one.repos: Merge v4hn's and jspricke's package lists #247
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
name: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [ main ] | |
paths-ignore: [ '*.repos', 'rosdep.yaml', 'README.md' ] | |
env: | |
DEBS_PATH: ${{ vars.DEBS_PATH || '~/debs' }} | |
TERM: xterm # needed for colored output of unittests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
sanity: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install shellcheck | |
run: sudo apt-get install shellcheck | |
- uses: pre-commit/[email protected] | |
id: precommit | |
- name: Upload pre-commit changes | |
if: failure() && steps.precommit.outcome == 'failure' | |
uses: rhaschke/upload-git-patch-action@main | |
with: | |
name: pre-commit | |
unittests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- run: ./test/bats/bin/bats --formatter pretty test/*.bats | |
- name: Check that *.js scripts are all identical to main.js | |
run: | | |
err=0 | |
for f in $(find . -iname "*.js"); do | |
if ! diff -q $f main.js; then | |
echo "::warning:: $f differs from main.js" | |
err=1 | |
fi | |
done | |
exit $err | |
ci: | |
runs-on: ubuntu-latest | |
needs: unittests | |
name: "ci: ${{ matrix.DEB_DISTRO }}, ${{ matrix.ROS_SOURCES }}\ | |
${{ matrix.VERBOSE && format(', verbose={0}', matrix.VERBOSE) || '' }}\ | |
${{ matrix.CONTINUE_ON_ERROR && ', cont-on-err' || '' }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
DEB_DISTRO: [ jammy, bookworm ] | |
include: | |
- { ROS_SOURCES: good.repos, VERBOSE: false } # set defaults | |
# override/add settings for specific distros | |
- { DEB_DISTRO: jammy, UPLOAD_DEBS: true, VERBOSE: true } | |
- { DEB_DISTRO: bookworm, VERBOSE: bloom } | |
- { DEB_DISTRO: focal, ROS_SOURCES: broken.repos, EXPECT_EXIT_CODE: 2, CONTINUE_ON_ERROR: false } | |
- { DEB_DISTRO: focal, ROS_SOURCES: broken.repos, EXPECT_EXIT_CODE: 1, CONTINUE_ON_ERROR: true } | |
env: | |
DEB_DISTRO: ${{ matrix.DEB_DISTRO }} | |
ROS_DISTRO: ${{ matrix.ROS_DISTRO }} | |
DEBUG_BASH: ${{ secrets.ACTIONS_STEP_DEBUG && 'true' || 'false' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run main action | |
uses: ./ | |
env: | |
ROS_SOURCES: .github/workflows/${{ matrix.ROS_SOURCES }} | |
INSTALL_TO_CHROOT: true | |
VERBOSE: ${{ matrix.VERBOSE }} | |
CONTINUE_ON_ERROR: ${{ matrix.CONTINUE_ON_ERROR || false }} | |
EXPECT_EXIT_CODE: ${{ matrix.EXPECT_EXIT_CODE || 0 }} | |
- name: Upload debs | |
if: matrix.UPLOAD_DEBS | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debs | |
path: ${{ env.DEBS_PATH }} | |
deploy: | |
needs: ci | |
uses: ubi-agni/ros-builder-action/.github/workflows/deploy.yaml@main | |
with: | |
DEPLOY_URL: self#ci | |
CONTENT_MODE: replace | |
PUSH_MODE: squash | |
MESSAGE: deployment test |