-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
537743d
commit b726ac0
Showing
6 changed files
with
204 additions
and
93 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build Firmware | ||
description: Build the Rover's firmware | ||
|
||
outputs: | ||
release: | ||
description: release zip file | ||
value: ${{ steps.release.outputs.release }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Cache python venv | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('requirements.txt') }} | ||
|
||
- name: Cache meson subprojects | ||
uses: actions/cache@v4 | ||
with: | ||
path: subprojects | ||
key: meson-${{ runner.os }}-${{ hashFiles('subprojects/*.wrap') }}-${{ hashFiles('subprojects/packagefiles/**') }} | ||
|
||
# Will run pip | ||
- name: Bootstrap build | ||
run: ./scripts/bootstrap.sh | ||
shell: bash | ||
|
||
- name: Activate python venv | ||
run: | | ||
source .venv/bin/activate | ||
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH | ||
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Build source | ||
run: meson compile -C build | ||
shell: bash | ||
|
||
- name: Run tests | ||
run: meson test -v -C build | ||
shell: bash | ||
|
||
- name: Check source | ||
run: meson compile -C build check | ||
shell: bash | ||
|
||
- name: Build documentation | ||
run: meson compile -C build docs | ||
shell: bash | ||
|
||
- run: echo "release=$(ls build/rover-release*.zip)" >> $GITHUB_OUTPUT | ||
id: release | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build ROS gateway | ||
description: Build the Rover's ROS gateway | ||
|
||
inputs: | ||
push: | ||
description: push the docker container to GHCR | ||
required: false | ||
|
||
ros_distro: | ||
description: target ROS distro name | ||
required: false | ||
default: '' | ||
|
||
tags: | ||
description: docker container tags, space separated | ||
default: '' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ env.GITHUB_TOKEN }} | ||
|
||
# Set up builder outside of script to use this action's built-in caching | ||
- uses: docker/setup-buildx-action@v3 | ||
id: builder | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
|
||
- run: | | ||
echo "PUSH=${{ inputs.push }}" >> "$GITHUB_ENV" | ||
shell: bash | ||
if: ${{ inputs.push }} | ||
- name: Build docker image | ||
run: ./scripts/build-ros-gateway.sh | ||
shell: bash | ||
env: | ||
ROS_DISTRO: ${{ inputs.ros_distro }} | ||
PLATFORMS: ${{ steps.builder.outputs.platforms }} | ||
DOCKER_BUILDER: ${{ steps.builder.outputs.name }} | ||
VERSION_TAGS: ${{ inputs.tags }} |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
|
||
jobs: | ||
firmware: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build firmware | ||
uses: ./.github/actions/build-firmware | ||
|
||
ros-gateway: | ||
strategy: | ||
matrix: | ||
ros_distro: [humble, jazzy] | ||
|
||
runs-on: ubuntu-24.04 | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build ROS gateway | ||
uses: ./.github/actions/build-gateway | ||
with: | ||
ros_distro: ${{ matrix.ros_distro }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
firmware: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build firmware | ||
id: build | ||
uses: ./.github/actions/build-firmware | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: ${{ steps.build.outputs.release }} | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true | ||
|
||
ros-gateway: | ||
strategy: | ||
matrix: | ||
ros_distro: [humble, jazzy] | ||
|
||
runs-on: ubuntu-24.04 | ||
|
||
permissions: | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build ROS gateway | ||
uses: ./.github/actions/build-gateway | ||
with: | ||
push: true | ||
ros_distro: ${{ matrix.ros_distro }} | ||
tags: ${{ github.ref_name }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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