Skip to content

0053 ゼロ寸法 abort の説明を実態に合わせて修正する #618

0053 ゼロ寸法 abort の説明を実態に合わせて修正する

0053 ゼロ寸法 abort の説明を実態に合わせて修正する #618

Workflow file for this run

name: formatter
on:
workflow_dispatch:
push:
paths:
- "src/**"
- "include/**"
- "examples/**"
jobs:
run-ubuntu:
strategy:
fail-fast: false
matrix:
platform:
- name: ubuntu-24.04_x86_64
runs-on: ubuntu-24.04
os: ubuntu
arch: x86_64
name: Build sora-cpp-sdk for ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.runs-on }}
outputs:
diff: ${{ steps.diff.outputs.diff }}
env:
TEST_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }}
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
TEST_MATRIX_NAME: ${{ matrix.platform.name }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Cache Dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: _install/${{ matrix.platform.name }}/release
key: ${{ matrix.platform.name }}-${{ hashFiles('VERSION', 'DEPS') }}
restore-keys: |
${{ matrix.platform.name }}-
- name: Cache Dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: _build/${{ matrix.platform.name }}/release/clang-include-cleaner.json
key: ${{ matrix.platform.name }}-${{ hashFiles('VERSION', 'DEPS') }}
restore-keys: |
${{ matrix.platform.name }}-
- name: Get versions from DEPS
id: version
run: |
source DEPS
echo "apt_install_llvm_version=$APT_INSTALL_LLVM_VERSION" >> $GITHUB_OUTPUT
- name: Install deps for ${{ matrix.platform.name }}
if: matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'x86_64'
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
# X11
sudo apt-get install libx11-dev libxext-dev
# OpenGL
sudo apt-get install -y libgl-dev
# clang と clang-format
wget https://apt.llvm.org/llvm.sh
chmod a+x llvm.sh
sudo ./llvm.sh ${{ steps.version.outputs.apt_install_llvm_version }}
sudo apt install clang-format-${{ steps.version.outputs.apt_install_llvm_version }}
- run: python3 run.py build --disable-cuda --test ${{ matrix.platform.name }}
- name: Build Examples
run: |
cd examples
for app in sdl_sample sumomo messaging_recvonly_sample; do
python3 $app/run.py build ${{ matrix.platform.name }} \
--local-sora-cpp-sdk-dir .. \
--local-sora-cpp-sdk-args=--disable-cuda \
--install-dir `pwd`/../_install/${{ matrix.platform.name }}/release
done
if: matrix.platform.os == 'ubuntu' && matrix.platform.name != 'ubuntu-22.04_armv8'
- name: Run IWYU and Clang Format
id: diff
run: |
set +e
python3 run.py iwyu ubuntu-24.04_x86_64
if [ $? -ne 0 ]; then
HAS_ERROR=true
echo "iwyu has error"
fi
python3 run.py format
if [ $? -ne 0 ]; then
HAS_ERROR=true
echo "clang format has error"
fi
echo "diff<<EOF" >> $GITHUB_OUTPUT
git diff >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
git diff --exit-code
if [ $? -ne 0 ]; then
HAS_ERROR=true
echo "git diff has error"
fi
if [ "$HAS_ERROR" = "true" ]; then
echo "Please fix them before commit."
exit 1
fi
notification:
name: Slack Notification
runs-on: ubuntu-slim
permissions:
actions: read
contents: read
needs:
- run-ubuntu
if: always()
steps:
- uses: shiguredo/github-actions/.github/actions/slack-notify@main
if: |
needs.run-ubuntu.result == 'failure'
with:
status: ${{ job.status }}
slack_channel: sora-cpp-sdk
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
slack_message: |
```
${{ needs.run-ubuntu.outputs.diff }}
```
env:
GH_TOKEN: ${{ github.token }}