This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Merge pull request #46 from shiguredo/feature/bump-sora-cpp-sdk-to-20… #185
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
name: build-workflow | |
on: | |
push: | |
paths-ignore: | |
- 'doc/**' | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
jobs: | |
build-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- windows_x86_64 | |
name: Build sora-cpp-sdk-samples for ${{ matrix.name }} | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: microsoft/[email protected] | |
- run: python3 sdl_sample/${{ matrix.name }}/run.py | |
- run: python3 sumomo/${{ matrix.name }}/run.py | |
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py | |
- name: Create Artifact | |
run: | | |
mkdir ${{ matrix.name }} | |
cp _build\${{ matrix.name }}\release\sdl_sample\Release\sdl_sample.exe ${{ matrix.name }} | |
cp _build\${{ matrix.name }}\release\sumomo\Release\sumomo.exe ${{ matrix.name }} | |
cp _build\${{ matrix.name }}\release\messaging_recvonly_sample\Release\messaging_recvonly_sample.exe ${{ matrix.name }} | |
cp -Recurse _install\${{ matrix.name }}\release\lyra\share\model_coeffs ${{ matrix.name }}\model_coeffs | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.name }} | |
path: ${{ matrix.name }} | |
build-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- macos_arm64 | |
name: Build sora-cpp-sdk-samples for ${{ matrix.name }} | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: python3 sdl_sample/${{ matrix.name }}/run.py | |
- run: python3 sumomo/${{ matrix.name }}/run.py | |
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py | |
- name: Create Artifact | |
run: | | |
mkdir ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }} | |
cp -r _install/${{ matrix.name }}/release/lyra/share/model_coeffs ${{ matrix.name }}/model_coeffs | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.name }} | |
path: ${{ matrix.name }} | |
build-ubuntu-2004: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- ubuntu-20.04_x86_64 | |
- ubuntu-20.04_armv8_jetson | |
name: Build sora-cpp-sdk-samples for ${{ matrix.name }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install deps for Jetson series | |
if: matrix.name == 'ubuntu-20.04_armv8_jetson' | |
run: | | |
sudo apt-get update | |
sudo apt-get install multistrap binutils-aarch64-linux-gnu | |
# multistrap に insecure なリポジトリからの取得を許可する設定を入れる | |
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap | |
- name: Install deps for Ubuntu x86_64 | |
if: matrix.name == 'ubuntu-20.04_x86_64' | |
run: | | |
sudo apt-get update | |
sudo apt-get install libdrm-dev libva-dev | |
- run: python3 sdl_sample/${{ matrix.name }}/run.py | |
- run: python3 sumomo/${{ matrix.name }}/run.py | |
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py | |
- name: Create Artifact | |
run: | | |
mkdir ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }} | |
cp -r _install/${{ matrix.name }}/release/lyra/share/model_coeffs ${{ matrix.name }}/model_coeffs | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.name }} | |
path: ${{ matrix.name }} | |
build-ubuntu-2204: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- ubuntu-22.04_x86_64 | |
name: Build sora-cpp-sdk-samples for ${{ matrix.name }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install deps for Ubuntu x86_64 | |
if: matrix.name == 'ubuntu-22.04_x86_64' | |
run: | | |
sudo apt-get update | |
sudo apt-get install libdrm-dev libva-dev | |
- run: python3 sdl_sample/${{ matrix.name }}/run.py | |
- run: python3 sumomo/${{ matrix.name }}/run.py | |
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py | |
- name: Create Artifact | |
run: | | |
mkdir ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }} | |
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }} | |
cp -r _install/${{ matrix.name }}/release/lyra/share/model_coeffs ${{ matrix.name }}/model_coeffs | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.name }} | |
path: ${{ matrix.name }} | |
create-release: | |
name: Create Release | |
if: contains(github.ref, 'tags/202') | |
needs: | |
- build-windows | |
- build-macos | |
- build-ubuntu-2004 | |
- build-ubuntu-2204 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
notification: | |
name: Slack Notification | |
runs-on: ubuntu-latest | |
needs: | |
- build-windows | |
- build-macos | |
- build-ubuntu-2004 | |
- build-ubuntu-2204 | |
if: always() | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: rtCamp/action-slack-notify@v2 | |
if: | | |
needs.build-windows.result == 'failure' || | |
needs.build-macos.result == 'failure' || | |
needs.build-ubuntu-2004.result == 'failure' || | |
needs.build-ubuntu-2204.result == 'failure' | |
env: | |
SLACK_CHANNEL: sora-cpp-sdk | |
SLACK_COLOR: danger | |
SLACK_TITLE: Failure build | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |