[canary] Update VERSION and examples/DEPS #286
Workflow file for this run
This file contains hidden or 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: formatter | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths-ignore: | |
| - "doc/**" | |
| - "**.md" | |
| - "LICENSE" | |
| - "NOTICE" | |
| 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@v5 | |
| - name: Cache Dependencies | |
| uses: actions/cache@v4 | |
| 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@v4 | |
| with: | |
| path: _build/${{ matrix.platform.name }}/release/clang-include-cleaner.json | |
| key: ${{ matrix.platform.name }}-${{ hashFiles('VERSION', 'DEPS') }} | |
| restore-keys: | | |
| ${{ matrix.platform.name }}- | |
| - 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-20 | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod a+x llvm.sh | |
| sudo ./llvm.sh 20 | |
| - 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/${{ matrix.platform.name }}/run.py \ | |
| --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-24.04 | |
| needs: | |
| - run-ubuntu | |
| if: always() | |
| steps: | |
| - uses: rtCamp/action-slack-notify@v2 | |
| if: | | |
| needs.run-ubuntu.result == 'failure' | |
| env: | |
| SLACK_CHANNEL: sora-cpp-sdk | |
| SLACK_COLOR: danger | |
| SLACK_TITLE: フォーマット失敗 | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
| SLACK_MESSAGE: | | |
| ``` | |
| ${{ needs.run-ubuntu.outputs.diff }} | |
| ``` |