-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use canon in CI #57
Changes from all commits
f99a764
6c5ccfd
e99aa77
148357a
8859aac
e7abcaa
c859826
883ebbb
15f75dc
f523e52
417206e
164528f
6a97f09
ead55ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: 'Build Module' | ||
description: 'Builds the viamrtsp module using Docker' | ||
inputs: | ||
target_os: | ||
description: 'Target OS' | ||
required: true | ||
target_arch: | ||
description: 'Target architecture' | ||
required: true | ||
docker_image: | ||
description: 'Docker image to use for building' | ||
required: true | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.23 # match go.mod | ||
|
||
- name: Pull Docker image | ||
run: docker pull ${{ inputs.docker_image }} | ||
shell: bash | ||
|
||
- name: Build and package using Docker | ||
run: | | ||
docker run --rm \ | ||
-e TARGET_OS=${{ inputs.target_os }} \ | ||
-e TARGET_ARCH=${{ inputs.target_arch }} \ | ||
-v "${{ github.workspace }}:/workspace" \ | ||
-w /workspace \ | ||
${{ inputs.docker_image }} \ | ||
sh -c "make module" | ||
shell: bash | ||
|
||
- name: Verify module.tar.gz exists recursively | ||
run: | | ||
if find . -name module.tar.gz | grep -q .; then | ||
echo "module.tar.gz exists" | ||
else | ||
echo "module.tar.gz does not exist" | ||
exit 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so the goal here is just to report if module.tar.gz exists? will this cause the workflow to fail? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I originally had this in for debugging but decided to keep it since it made sanity checking the existence of the |
||
fi | ||
shell: bash |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,9 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will there be issues that you were using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good point we don't need to bump it reverted to v2 |
||
- name: Build module | ||
uses: ./.github/actions/build-module | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Build viamrtsp binary | ||
run: | | ||
TARGET_OS=android TARGET_ARCH=arm64 make | ||
target_os: android | ||
target_arch: arm64 | ||
docker_image: ghcr.io/viamrobotics/antique2:amd64-cache |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
name: Integration test using mediamtx | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
paths-ignore: | ||
- 'README.md' | ||
pull_request: | ||
paths-ignore: | ||
- 'README.md' | ||
|
||
jobs: | ||
build-and-test: | ||
|
@@ -11,10 +17,12 @@ jobs: | |
arch: amd64 | ||
mediamtx_url: https://github.com/bluenviron/mediamtx/releases/download/v1.9.0/mediamtx_v1.9.0_linux_amd64.tar.gz | ||
viam_server_url: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-stable-x86_64.AppImage | ||
docker_image: ghcr.io/viamrobotics/antique2:amd64-cache | ||
- runner: buildjet-8vcpu-ubuntu-2204-arm | ||
arch: arm64 | ||
mediamtx_url: https://github.com/bluenviron/mediamtx/releases/download/v1.9.0/mediamtx_v1.9.0_linux_arm64v8.tar.gz | ||
viam_server_url: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-stable-aarch64.AppImage | ||
docker_image: ghcr.io/viamrobotics/antique2:arm64-cache | ||
config: | ||
- name: "h264" | ||
codec: "libx264" | ||
|
@@ -29,11 +37,13 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
- name: Build module | ||
uses: ./.github/actions/build-module | ||
with: | ||
go-version: 1.21.13 | ||
|
||
target_os: linux | ||
target_arch: ${{ matrix.platform.arch }} | ||
docker_image: ${{ matrix.platform.docker_image }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you don't still need the go version? does docker already use a specific version so you don't need it here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We specify |
||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
|
@@ -51,10 +61,6 @@ jobs: | |
- name: Run fake RTSP camera | ||
run: ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 -vcodec ${{ matrix.config.codec }} ${{ matrix.config.extra_ffmpeg_args }} -pix_fmt yuv420p -f rtsp -rtsp_transport tcp rtsp://0.0.0.0:8554/live.stream & | ||
|
||
- name: Build viamrtsp binary | ||
run: | | ||
TARGET_OS=linux TARGET_ARCH=${{ matrix.platform.arch }} make module | ||
|
||
- name: Install viam-server | ||
run: | | ||
wget ${{ matrix.platform.viam_server_url }} -O viam-server | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,40 +13,32 @@ jobs: | |
runner: ubuntu-latest | ||
target_os: linux | ||
target_arch: amd64 | ||
docker_image: ghcr.io/viamrobotics/antique2:amd64-cache | ||
- platform: linux/arm64 | ||
runner: buildjet-8vcpu-ubuntu-2204-arm | ||
target_os: linux | ||
target_arch: arm64 | ||
docker_image: ghcr.io/viamrobotics/antique2:arm64-cache | ||
- platform: android/arm64 | ||
runner: ubuntu-latest | ||
target_os: android | ||
target_arch: arm64 | ||
docker_image: ghcr.io/viamrobotics/antique2:amd64-cache | ||
|
||
runs-on: ${{ matrix.runner }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
- name: Build module | ||
uses: ./.github/actions/build-module | ||
with: | ||
go-version: 1.21.13 | ||
|
||
- name: Install canon (only for non-Android platforms) | ||
if: ${{ matrix.target_os != 'android' }} | ||
run: | | ||
export PATH="$(go env GOPATH)/bin:$PATH" | ||
go install github.com/viamrobotics/[email protected] | ||
|
||
- name: Build and package | ||
run: | | ||
if [ "${{ matrix.target_os }}" != "android" ]; then | ||
canon --profile viam-rtsp-antique | ||
fi | ||
TARGET_OS=${{ matrix.target_os }} TARGET_ARCH=${{ matrix.target_arch }} make module | ||
target_os: ${{ matrix.target_os }} | ||
target_arch: ${{ matrix.target_arch }} | ||
docker_image: ${{ matrix.docker_image }} | ||
|
||
- name: Upload viamrtsp module to registry | ||
uses: viamrobotics/upload-module@main | ||
uses: viamrobotics/upload-module@v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is what the docs recommend There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good to know, I've been using main |
||
with: | ||
meta-path: meta.json | ||
module-path: module.tar.gz | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so using with: and including a docker image in the other workflows makes that an input here? i'm not familiar with inputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I think of it as params and args
params being what's defined above in
inputs:
and
with:
being the args passed along