Skip to content

Commit

Permalink
Merge pull request #75 from aws-samples/develop
Browse files Browse the repository at this point in the history
workflow: separate by board
  • Loading branch information
codingspirit authored Sep 22, 2022
2 parents c415bb1 + 29513bf commit 06a29f6
Show file tree
Hide file tree
Showing 7 changed files with 213 additions and 188 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/develop.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: file

on:
push:
branches: [ develop, main ]
pull_request:
branches: [ develop, main ]
workflow_dispatch:
branches: [ develop, main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BOARD: FILE

jobs:
x64-file:
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON

- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4

- name: Test
run: ctest -C ${{ env.BUILD_TYPE }}
69 changes: 69 additions & 0 deletions .github/workflows/fullhan-fh8626v100.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: fullhan-fh8626v100

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BOARD: FH8626V100

jobs:
ecr-prepare:
runs-on: ubuntu-latest

steps:
- name: Configure AWS credentials
id: configure-aws-credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: codingspirit/amazon-ecr-login@master

- name: Set ECR credentials
id: set-ecr-credentials
run: |
gh auth login --with-token <<< ${{ secrets.PA_TOKEN }}
gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }}
gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.username }} --repo ${{ github.repository }}
gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.password }} --repo ${{ github.repository }}
fullhan:
environment: ECR
needs: ecr-prepare
runs-on: ubuntu-latest
strategy:
matrix:
container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/fullhan:6.5.0" ]
container:
image: ${{ matrix.container }}
credentials:
username: ${{ secrets.ECR_USERNAME }}
password: ${{ secrets.ECR_PASSWORD }}

steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Prepare board SDK
run: |
cp -r /FH8626V100/* ${GITHUB_WORKSPACE}/3rdparty/FH8626V100/
- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON

- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4

- name: Test
run: ctest -C ${{ env.BUILD_TYPE }}
69 changes: 69 additions & 0 deletions .github/workflows/ingenic-t31.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: ingenic-t31

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BOARD: T31

jobs:
ecr-prepare:
runs-on: ubuntu-latest

steps:
- name: Configure AWS credentials
id: configure-aws-credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: codingspirit/amazon-ecr-login@master

- name: Set ECR credentials
id: set-ecr-credentials
run: |
gh auth login --with-token <<< ${{ secrets.PA_TOKEN }}
gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }}
gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.username }} --repo ${{ github.repository }}
gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.password }} --repo ${{ github.repository }}
ingenic:
environment: ECR
needs: ecr-prepare
runs-on: ubuntu-latest
strategy:
matrix:
container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/ingenic:4.7.2", "482862934379.dkr.ecr.us-east-1.amazonaws.com/ingenic:5.4.0" ]
container:
image: ${{ matrix.container }}
credentials:
username: ${{ secrets.ECR_USERNAME }}
password: ${{ secrets.ECR_PASSWORD }}

steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Prepare board SDK
run: |
cp -r /ingenic-sdk/* ${GITHUB_WORKSPACE}/3rdparty/T31/
- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON

- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4

- name: Test
run: ctest -C ${{ env.BUILD_TYPE }}
132 changes: 0 additions & 132 deletions .github/workflows/main.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/v4l2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: v4l2

on:
push:
branches: [ develop, main ]
pull_request:
branches: [ develop, main ]
workflow_dispatch:
branches: [ develop, main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BOARD: V4L2

jobs:
x64-v4l2:
runs-on: ubuntu-latest

steps:
- name: Install libv4l2
run: sudo apt install libv4l-dev -y
- name: Git checkout
uses: actions/checkout@v2

- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON

- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4

- name: Test
run: ctest -C ${{ env.BUILD_TYPE }}
Loading

0 comments on commit 06a29f6

Please sign in to comment.