diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d57f833..e96ca6d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -156,26 +156,18 @@ jobs: strategy: fail-fast: false matrix: - platform: - - name: ubuntu-20.04_x86_64 - runs-on: ubuntu-20.04 - os: ubuntu - - name: ubuntu-22.04_x86_64 - runs-on: ubuntu-22.04 - os: ubuntu - - name: ubuntu-24.04_x86_64 - runs-on: ubuntu-24.04 - os: ubuntu - - name: android - runs-on: ubuntu-22.04 - os: android - name: Build sora-cpp-sdk for ${{ matrix.platform.name }} - runs-on: ${{ matrix.platform.runs-on }} + name: + - ubuntu-20.04_x86_64 + - ubuntu-22.04_x86_64 + - ubuntu-22.04_armv8_jetson + - android + name: Build sora-cpp-sdk for ${{ matrix.name }} + runs-on: ${{ matrix.name == 'ubuntu-22.04_x86_64' && 'ubuntu-22.04' || 'ubuntu-20.04' }} 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 }} + TEST_MATRIX_NAME: ${{ matrix.name }} steps: - uses: actions/checkout@v4 - name: Disk cleanup @@ -186,10 +178,7 @@ jobs: sudo du -h -d1 /usr/local/share sudo du -h -d1 /usr/local/lib sudo du -h -d1 /usr/share - RMI=`docker images -q -a` - if [ -n "$RMI" ]; then - docker rmi $RMI - fi + docker rmi `docker images -q -a` # 4.6G sudo rm -rf /usr/local/.ghcup # 1.7G @@ -197,41 +186,19 @@ jobs: # 1.4G sudo rm -rf /usr/share/dotnet df -h - # Ubuntu 24.04 だと libtinfo5 が見つからない問題があるので、その修正 - # ref: https://qiita.com/gengen16k/items/88cf3c18a40a94205fab - - name: Fix CUDA issues for Ubuntu 24.04 - if: matrix.platform.name == 'ubuntu-24.04_x86_64' - run: | - sudo tee /etc/apt/sources.list.d/jammy.list << EOF - deb http://archive.ubuntu.com/ubuntu/ jammy universe - EOF - - sudo tee /etc/apt/preferences.d/pin-jammy <> $GITHUB_OUTPUT echo "boost_name=${BOOST_PACKAGE_NAME}" >> $GITHUB_OUTPUT id: package_name @@ -270,33 +237,33 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ steps.package_name.outputs.name }} - path: _package/${{ matrix.platform.name }}/release/${{ steps.package_name.outputs.name }} + path: _package/${{ matrix.name }}/release/${{ steps.package_name.outputs.name }} - name: Upload Boost Artifact uses: actions/upload-artifact@v4 with: name: ${{ steps.package_name.outputs.boost_name }} - path: _package/${{ matrix.platform.name }}/release/${{ steps.package_name.outputs.boost_name }} + path: _package/${{ matrix.name }}/release/${{ steps.package_name.outputs.boost_name }} - name: Upload Environment uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform.name }}.env - path: _package/${{ matrix.platform.name }}/release/sora.env + name: ${{ matrix.name }}.env + path: _package/${{ matrix.name }}/release/sora.env # Examples のビルド - name: Build Examples run: | cd examples - mkdir examples_${{ matrix.platform.name }} + mkdir examples_${{ matrix.name }} for app in sdl_sample sumomo messaging_recvonly_sample; do - python3 $app/${{ matrix.platform.name }}/run.py --local-sora-cpp-sdk-dir .. - cp _build/${{ matrix.platform.name }}/release/$app/$app examples_${{ matrix.platform.name }} + python3 $app/${{ matrix.name }}/run.py --local-sora-cpp-sdk-dir .. + cp _build/${{ matrix.name }}/release/$app/$app examples_${{ matrix.name }} done - if: matrix.platform.os == 'ubuntu' + if: matrix.name == 'ubuntu-20.04_x86_64' || matrix.name == 'ubuntu-22.04_x86_64' || matrix.name == 'ubuntu-22.04_armv8_jetson' - name: Upload Examples Artifact uses: actions/upload-artifact@v4 with: - name: examples_${{ matrix.platform.name }} - path: examples/examples_${{ matrix.platform.name }} - if: matrix.platform.os == 'ubuntu' + name: examples_${{ matrix.name }} + path: examples/examples_${{ matrix.name }} + if: matrix.name == 'ubuntu-20.04_x86_64' || matrix.name == 'ubuntu-22.04_x86_64' || matrix.name == 'ubuntu-22.04_armv8_jetson' create-release: name: Create Release @@ -310,25 +277,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/download with: - platform: windows_x86_64 - - uses: ./.github/actions/download - with: - platform: macos_arm64 - - uses: ./.github/actions/download - with: - platform: ios - - uses: ./.github/actions/download - with: - platform: ubuntu-20.04_x86_64 - - uses: ./.github/actions/download - with: - platform: ubuntu-22.04_x86_64 - - uses: ./.github/actions/download - with: - platform: ubuntu-24.04_x86_64 - - uses: ./.github/actions/download - with: - platform: android + platform: ubuntu-22.04_armv8_jetson - name: Env to output run: | echo "package_paths<> $GITHUB_OUTPUT