Switch to Prism #3278
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: Ubuntu | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| # TeamTalk unit test environment variables | |
| INPUTDEVICEID: 1978 | |
| OUTPUTDEVICEID: 1978 | |
| VIDEODEVICEID: None | |
| VERBOSE: 0 | |
| GITHUBSKIP: 1 | |
| jobs: | |
| build: | |
| if: "!startsWith(github.head_ref, 'debug') || startsWith(github.head_ref, 'debug-linux')" | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| include: | |
| - os: ubuntu-22.04 | |
| version: "22" | |
| - os: ubuntu-24.04 | |
| version: "24" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Set up Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Update Ubuntu repository | |
| run: sudo apt-get update | |
| - name: Install valgrind | |
| run: sudo apt-get install valgrind | |
| - name: Print env | |
| run: printenv | sort | |
| - name: Install dependencies | |
| working-directory: ${{github.workspace}}/Build | |
| run: sudo make depend-ubuntu${{ matrix.version }} | |
| - name: Build TeamTalk toolchain, libraries and apps | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| source env.sh | |
| make CMAKE_EXTRA="-G Ninja -DFEATURE_WEBRTC=OFF -DBUILD_TEAMTALK_LIBRARY_UNITTEST_CATCH2=ON -DBUILD_TEAMTALK_LIBRARY_UNITTEST_CATCH2_PERF=OFF -DTOOLCHAIN_INSTALL_PREFIX=${{runner.workspace}}/toolchain-install -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install" -C Build ubuntu${{ matrix.version }} | |
| echo TEAMTALK_INSTALLDIR=${{runner.workspace}}/install>> $GITHUB_ENV | |
| - name: Run Java Server API tests (non-encrypted) | |
| if: matrix.os == 'ubuntu-22.04' | |
| working-directory: ${{github.workspace}}/Library/TeamTalkJNI | |
| run: make runjunitsrv | |
| env: | |
| ENCRYPTED: 0 | |
| WEBRTC: 0 | |
| - name: Run Java Server API tests (encrypted) | |
| if: matrix.os == 'ubuntu-24.04' | |
| working-directory: ${{github.workspace}}/Library/TeamTalkJNI | |
| run: make runjunitsrv | |
| env: | |
| ENCRYPTED: 1 | |
| WEBRTC: 0 | |
| - name: Start TeamTalk Standard Server | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| cp Library/TeamTalkLib/test/tt5srv.xml_template Server/tt5srv.xml | |
| Server/tt5srv -d -c Server/tt5srv.xml | |
| - name: Start TeamTalk Pro Server (encrypted) | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| cp -f Library/TeamTalkLib/test/tt5prosrv.xml_template Server/tt5prosrv.xml | |
| cp Library/TeamTalkLib/test/ttservercert.pem Server/ | |
| cp Library/TeamTalkLib/test/ttserverkey.pem Server/ | |
| cp Library/TeamTalkLib/test/ca.cer Server/ | |
| Server/tt5prosrv -d -wd Server/ | |
| - name: Run PyTest | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| source env.sh | |
| pytest-3 Library/TeamTalkPy/test/teamtalk_test.py | |
| - name: Run Python client | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| source env.sh | |
| make -C Client/ttserverlogpy | |
| - name: Run Catch unit tests | |
| working-directory: ${{github.workspace}}/Library/TeamTalkLib/test | |
| run: valgrind --tool=memcheck --leak-check=full --error-exitcode=1 ./catchtt --durations yes | |
| - name: Stop TeamTalk Pro Server | |
| run: killall tt5prosrv | |
| - name: Run Java unit tests (non-encrypted) | |
| working-directory: ${{github.workspace}}/Library/TeamTalkJNI | |
| run: make runjunit | |
| env: | |
| ENCRYPTED: 0 | |
| WEBRTC: 0 | |
| - name: Stop TeamTalk Standard Server | |
| run: killall tt5srv | |
| - name: Start TeamTalk Pro Server (non-encrypted) | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| cp -f Library/TeamTalkLib/test/tt5srv.xml_template Server/tt5srv.xml | |
| Server/tt5prosrv -d -c Server/tt5srv.xml | |
| - name: Run Java unit tests with shared audio devices (non-encrypted) | |
| if: matrix.os == 'ubuntu-24.04' | |
| working-directory: ${{github.workspace}}/Library/TeamTalkJNI | |
| run: make runjunitpro | |
| env: | |
| ENCRYPTED: 0 | |
| WEBRTC: 0 | |
| INPUTDEVICEID: 4026 | |
| OUTPUTDEVICEID: 4026 | |
| - name: Stop TeamTalk Pro Server (non-encrypted) | |
| run: killall tt5prosrv | |
| - name: Start TeamTalk Pro Server (encrypted) | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| cp -f Library/TeamTalkLib/test/tt5prosrv.xml_template Server/tt5prosrv.xml | |
| cp Library/TeamTalkLib/test/ttservercert.pem Server/ | |
| cp Library/TeamTalkLib/test/ttserverkey.pem Server/ | |
| Server/tt5prosrv -d -wd Server/ | |
| - name: Run Java unit tests (encrypted) | |
| if: matrix.os == 'ubuntu-22.04' | |
| working-directory: ${{github.workspace}}/Library/TeamTalkJNI | |
| run: make runjunitpro | |
| env: | |
| ENCRYPTED: 1 | |
| WEBRTC: 0 | |
| - name: Stop TeamTalk Pro Server (encrypted) | |
| run: killall tt5prosrv | |
| - name: Build jSpamBot using Gradle | |
| working-directory: ${{github.workspace}}/Client/jSpamBot | |
| run: gradle build | |
| - name: Install TeamTalk SDK | |
| working-directory: ${{github.workspace}}/Build/build-release-ubuntu${{ matrix.version }} | |
| run: cmake --build . --target install | |
| - name: Build debug TeamTalk using prebuilt toolchain | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| source env.sh | |
| make CONFIGTYPE=debug CMAKE_EXTRA="-DTOOLCHAIN_INSTALL_PREFIX=${{runner.workspace}}/toolchain-install -DTOOLCHAIN_BUILD_EXTERNALPROJECTS=OFF -DFEATURE_WEBRTC=OFF -DBUILD_TEAMTALK_LIBRARY_UNITTEST_CATCH2=ON -DBUILD_TEAMTALK_LIBRARY_UNITTEST_CATCH2_PERF=OFF -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install" -C Build ubuntu${{ matrix.version }} | |
| echo TEAMTALK_INSTALLDIR=${{runner.workspace}}/install>> $GITHUB_ENV | |
| - name: Upload TeamTalk SDK artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: teamtalksdk-ubuntu${{ matrix.version }} | |
| path: ${{runner.workspace}}/install | |
| - name: Create Ubuntu ${{ matrix.version }} portable archives | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| source env.sh | |
| cd Setup/Portable | |
| make ubuntu${{ matrix.version }} ubuntu${{ matrix.version }}pro | |
| - name: Upload TeamTalk portable artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: teamtalk-ubuntu${{ matrix.version }} | |
| path: ${{github.workspace}}/Setup/Portable/teamtalk-* | |
| - name: Upload TeamTalk Pro artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: teamtalkpro-ubuntu${{ matrix.version }} | |
| path: ${{github.workspace}}/Setup/Portable/teamtalkpro-* |