Skip to content
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

Github Workflows #82

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 22 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 164 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: Orchestra

on: ["push", "pull_request"]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
service: [
mavproxy,
interop-proxy,
telemetry,
pong,
forward-interop,
imagery,
image-rec-master,
image-rec-auto
grafana
]
steps:
- uses: actions/checkout@v2
- name: Building services
run: |
./ci/script.sh
env:
SERVICE: ${{ matrix.service }}
- name: Clean up
run: |
./ci/after-script.sh

test-interop-proxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-elixir@v1
with:
elixir-version: '1.8'
otp-version: '20'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: interop-proxy
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh

test-telemetry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: telemetry
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh

test-forward-interop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: forward-interop
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh

test-pong:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: pong
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh

test-imagery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: imagery
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh

test-image-rec-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: image-rec-master
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh

test-image-rec-auto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: image-rec-auto
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh
138 changes: 138 additions & 0 deletions .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Orchestra

on: ["push", "pull_request"]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
service: [
mavproxy,
interop-proxy,
telemetry,
pong,
forward-interop,
imagery,
image-rec-master,
grafana
]
steps:
- uses: actions/checkout@v2
- name: Building services
run: |
./ci/script.sh
env:
SERVICE: ${{ matrix.service }}
- name: Clean up
run: |
./ci/after-script.sh
test-interop-proxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-elixir@v1
with:
elixir-version: '1.8'
otp-version: '20'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: interop-proxy
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh
test-telemetry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: telemetry
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh
test-forward-interop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: forward-interop
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh
test-pong:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: pong
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh
test-imagery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: imagery
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh
test-image-rec-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Testing service
run: |
./ci/script.sh
env:
SERVICE_TEST: pong
OPTIONS: "-i"
- name: Clean up
run: |
./ci/after-script.sh
2 changes: 2 additions & 0 deletions ci/script.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/sh -ex

echo $SERVICE_TEST
# Build a service if the env var is set.
if [ -n "$SERVICE" ]; then
make "$SERVICE"
fi

# Run tests if specified.
if [ -n "$SERVICE_TEST" ]; then
# Change options for tty
make "$SERVICE_TEST"-test
fi
4 changes: 3 additions & 1 deletion services/forward-interop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ FORWARD_INTEROP_TEST_IMAGE := uavaustin/forward-interop-test

current_dir := $(shell pwd)

OPTIONS ?= "-it"

.PHONY: all
all: image

Expand All @@ -17,7 +19,7 @@ image:
test:
docker build -t $(FORWARD_INTEROP_TEST_IMAGE) \
-f Dockerfile.test $(DOCKERFLAGS) ..
docker run -it --rm -v $(current_dir)/coverage:/test/coverage \
docker run $(OPTIONS) --rm -v $(current_dir)/coverage:/test/coverage \
$(FORWARD_INTEROP_TEST_IMAGE)

.PHONY: clean
Expand Down
3 changes: 2 additions & 1 deletion services/image-rec-auto/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Flags for docker when building images, meant to be overridden
DOCKERFLAGS :=
JETSON ?= "false"
OPTIONS ?= -it
HAWK_EYE_VERSION := 0.0.2b0

IMAGE_REC_AUTO_IMAGE := uavaustin/image-rec-auto
Expand Down Expand Up @@ -45,7 +46,7 @@ else
--build-arg HAWK_EYE_VERSION=$(HAWK_EYE_VERSION) \
$(DOCKERFLAGS) ..

docker run -it --ipc=host --rm -v $(current_dir)/coverage:/test/coverage \
docker run $(OPTIONS) --ipc=host --rm -v $(current_dir)/coverage:/test/coverage \
$(IMAGE_REC_AUTO_TEST_IMAGE)
endif

Expand Down
Binary file added services/image-rec-auto/coverage/.coverage
Binary file not shown.
2 changes: 1 addition & 1 deletion services/image-rec-master/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-alpine
FROM python:3.8-alpine

WORKDIR /test

Expand Down
4 changes: 3 additions & 1 deletion services/image-rec-master/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ IMAGE_REC_MASTER_TEST_IMAGE := uavaustin/image-rec-master-test

current_dir := $(shell pwd)

OPTIONS ?= -it

.PHONY: all
all: image

Expand All @@ -17,7 +19,7 @@ image:
test:
docker build -t $(IMAGE_REC_MASTER_TEST_IMAGE) \
-f Dockerfile.test $(DOCKERFLAGS) ..
docker run -it --rm -v $(current_dir)/coverage:/test/coverage \
docker run $(OPTIONS) --rm -v $(current_dir)/coverage:/test/coverage \
-v /var/run/docker.sock:/var/run/docker.sock \
$(IMAGE_REC_MASTER_TEST_IMAGE)

Expand Down
2 changes: 1 addition & 1 deletion services/image-rec-master/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
aiohttp
aiohttp==3.6.2
aioredis
protobuf>=3.6.1
Loading