Add path shortening utils and consolidate examples #245
Workflow file for this run
This file contains hidden or 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: build_and_test | |
| on: | |
| # Run action on certain pull request events | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| # Nightly job on default (main) branch | |
| schedule: | |
| - cron: '0 0 * * *' | |
| # Whenever certain branches are pushed | |
| push: | |
| branches: [main] | |
| # On demand from github.com for testing | |
| workflow_dispatch: | |
| # Ensures that only one workflow runs at a time for this branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ubuntu_build_and_test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ubuntu_version: [22.04, 24.04] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| file: .docker/ubuntu/Dockerfile | |
| tags: roboplan_ubuntu:${{ github.head_ref || github.ref_name }} | |
| build-args: | | |
| UBUNTU_VERSION=${{ matrix.ubuntu_version }} | |
| push: false | |
| load: true | |
| - name: Run tests | |
| run: | | |
| docker run \ | |
| roboplan_ubuntu:${{ github.head_ref || github.ref_name }} \ | |
| /bin/bash -c './scripts/run_tests.bash' | |
| # Build ROS docker images and run tests. | |
| ros_build_and_test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ros_distro: [humble, jazzy, kilted, rolling] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| file: .docker/ros/Dockerfile | |
| tags: roboplan_ros:${{ github.head_ref || github.ref_name }} | |
| build-args: | | |
| ROS_DISTRO=${{ matrix.ros_distro }} | |
| push: false | |
| load: true | |
| - name: Run tests | |
| run: | | |
| docker run \ | |
| roboplan_ros:${{ github.head_ref || github.ref_name }} \ | |
| /bin/bash -c './src/roboplan/scripts/run_tests.bash' | |
| pixi_build_and_test: | |
| env: | |
| SCCACHE_DIR: ${{ github.workspace }}/.sccache | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ubuntu_version: [22.04, 24.04] | |
| runs-on: ubuntu-${{ matrix.ubuntu_version }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| # Cache build directories and sccache | |
| - name: Cache build directories and sccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ env.SCCACHE_DIR }} | |
| key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ github.sha }} | |
| ${{ runner.os }}-build | |
| - uses: prefix-dev/setup-pixi@v0.8.3 | |
| with: | |
| cache: true | |
| cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | |
| frozen: true | |
| manifest-path: pixi.toml | |
| - name: Build and test | |
| run: | | |
| pixi run install_all | |
| pixi run build_tests | |
| pixi run test_all |