@@ -20,32 +20,24 @@ jobs:
2020 arch : x86_64
2121 name : Build sora-cpp-sdk for ${{ matrix.platform.name }}
2222 runs-on : ${{ matrix.platform.runs-on }}
23+ outputs :
24+ diff : ${{ steps.diff.outputs.diff }}
2325 env :
2426 TEST_SIGNALING_URL : ${{ secrets.TEST_SIGNALING_URL }}
2527 TEST_CHANNEL_ID_PREFIX : ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
2628 TEST_SECRET_KEY : ${{ secrets.TEST_SECRET_KEY }}
2729 TEST_MATRIX_NAME : ${{ matrix.platform.name }}
2830 steps :
2931 - uses : actions/checkout@v4
30- # IWYU を適用するにはまずビルドする必要がある
31- # Ubuntu 24.04 だと libtinfo5 が見つからない問題があるので、その修正
32- # ref: https://qiita.com/gengen16k/items/88cf3c18a40a94205fab
33- - name : Fix CUDA issues for Ubuntu 24.04
34- if : matrix.platform.name == 'ubuntu-24.04_x86_64'
35- run : |
36- sudo tee /etc/apt/sources.list.d/jammy.list << EOF
37- deb http://archive.ubuntu.com/ubuntu/ jammy universe
38- EOF
39-
40- sudo tee /etc/apt/preferences.d/pin-jammy <<EOF
41- Package: *
42- Pin: release n=jammy
43- Pin-Priority: -10
44-
45- Package: libtinfo5
46- Pin: release n=jammy
47- Pin-Priority: 990
48- EOF
32+ - name : Cache Dependencies
33+ uses : actions/cache@v4
34+ with :
35+ path : |
36+ _install/${{ matrix.platform.name }}/release
37+ _build/${{ matrix.platform.name }}/release/clang-include-cleaner.json
38+ key : ${{ matrix.platform.name }}-${{ hashFiles('VERSION') }}
39+ restore-keys : |
40+ ${{ matrix.platform.name }}-
4941 - name : Install deps for ${{ matrix.platform.name }}
5042 if : matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'x86_64'
5143 run : |
@@ -59,29 +51,23 @@ jobs:
5951 # OpenGL
6052 sudo apt-get install -y libgl-dev
6153
62- # CUDA
63- # libssl1.1 が必要
64- wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
65- sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
66- wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
67- sudo dpkg -i cuda-keyring_*all.deb
68- sudo apt-get update
69- DEBIAN_FRONTEND=noninteractive sudo apt-get -y install cuda=$CUDA_VERSION
70-
7154 # clang-20
7255 wget https://apt.llvm.org/llvm.sh
7356 chmod a+x llvm.sh
7457 sudo ./llvm.sh 20
75- - run : python3 run.py build --test ${{ matrix.platform.name }}
58+ - run : python3 run.py build --disable-cuda -- test ${{ matrix.platform.name }}
7659 - name : Build Examples
7760 run : |
7861 cd examples
79- mkdir examples_${{ matrix.platform.name }}
8062 for app in sdl_sample sumomo messaging_recvonly_sample; do
81- python3 $app/${{ matrix.platform.name }}/run.py --local-sora-cpp-sdk-dir ..
63+ python3 $app/${{ matrix.platform.name }}/run.py \
64+ --local-sora-cpp-sdk-dir .. \
65+ --local-sora-cpp-sdk-args=--disable-cuda \
66+ --install-dir `pwd`/../_install/${{ matrix.platform.name }}/release
8267 done
8368 if : matrix.platform.os == 'ubuntu' && matrix.platform.name != 'ubuntu-22.04_armv8'
8469 - name : Run IWYU and Clang Format
70+ id : diff
8571 run : |
8672 set +e
8773
@@ -97,17 +83,17 @@ jobs:
9783 echo "clang format has error"
9884 fi
9985
100- echo "DIFF <<EOF" >> $GITHUB_ENV
101- git diff >> $GITHUB_ENV
102- echo "EOF" >> $GITHUB_ENV
86+ echo "diff <<EOF" >> $GITHUB_OUTPUT
87+ git diff >> $GITHUB_OUTPUT
88+ echo "EOF" >> $GITHUB_OUTPUT
10389
10490 git diff --exit-code
10591 if [ $? -ne 0 ]; then
10692 HAS_ERROR=true
10793 echo "git diff has error"
10894 fi
10995
110- if [ "$HAS_ERROR"= "true" ]; then
96+ if [ "$HAS_ERROR" = "true" ]; then
11197 echo "Please fix them before commit."
11298 exit 1
11399 fi
@@ -129,5 +115,5 @@ jobs:
129115 SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
130116 SLACK_MESSAGE : |
131117 ```
132- ${{ env.DIFF }}
118+ ${{ needs.run-ubuntu.outputs.diff }}
133119 ```
0 commit comments