Improve script api documentation for AudioInjector #2846
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
| # Copyright 2013-2019 High Fidelity, Inc. | |
| # Copyright 2020-2022 Vircadia contributors. | |
| # Copyright 2021-2025 Overte e.V. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Pull Request CI Build | |
| # Keep in mind that GitHub Actions does not allow reading secrets during PR builds. | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| env: | |
| # Many environment variables are already set in our Docker images or in other Actions. | |
| BUILD_TYPE: Release | |
| GIT_COMMIT: ${{ github.event.pull_request.head.sha }} | |
| # Android | |
| VERSION_CODE: ${{ github.event.number }} | |
| UPLOAD_BUCKET: overte-public | |
| UPLOAD_REGION: fra1 | |
| UPLOAD_ENDPOINT: "https://fra1.digitaloceanspaces.com" | |
| CMAKE_BUILD_EXTRA: --preset conan-release | |
| jobs: | |
| build_pr: | |
| name: "${{matrix.os}}, ${{matrix.arch}}" | |
| strategy: | |
| matrix: | |
| include: | |
| - os: Windows 2022 | |
| # We use a third-party runner hosted by depot.dev to avoid timing out in case Qt has to be built from source. | |
| runner: depot-windows-2022-16 # Which GitHub Actions Runner to use. When using `image` this just needs to run the build container. | |
| arch: x86_64 | |
| build_type: full | |
| qt_source: source # Which Qt Conan package to use. `system`, `source`, or `aqt`. | |
| rendering_backend: OpenGL # Which OVERTE_RENDERING_BACKEND to build. | |
| #- os: macOS-10.15 | |
| # build_type: full | |
| # qt_source: aqt | |
| - os: Ubuntu 22.04 OpenGL | |
| image: docker.io/overte/overte-full-build:2026-01-01-ubuntu-22.04-amd64 # Container image used for building. Built from /tools/ci-script/linux-ci/Dockerfile_x | |
| runner: ubuntu-latest | |
| arch: amd64 | |
| build_type: full | |
| qt_source: system | |
| rendering_backend: OpenGL | |
| - os: Ubuntu 22.04 Vulkan | |
| image: docker.io/overte/overte-full-build:2025-10-24-ubuntu-22.04-amd64 # Container image used for building. Built from /tools/ci-script/linux-ci/Dockerfile_x | |
| runner: ubuntu-latest | |
| arch: amd64 | |
| build_type: full | |
| qt_source: system | |
| rendering_backend: Vulkan | |
| # Android builds are currently failing | |
| #- os: ubuntu-18.04 | |
| # build_type: android | |
| # apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 python3-github python3-distro | |
| # Do not change the names of self-hosted runners without knowing what you are doing, as they correspond to labels that have to be set on the runner. | |
| - os: Ubuntu 22.04 OpenGL ES | |
| image: docker.io/overte/overte-full-build:2026-01-01-ubuntu-22.04-aarch64 | |
| runner: ubuntu-24.04-arm | |
| arch: aarch64 | |
| build_type: full | |
| qt_source: system | |
| rendering_backend: GLES | |
| - os: Ubuntu 22.04 Vulkan | |
| image: docker.io/overte/overte-full-build:2026-01-01-ubuntu-22.04-aarch64 | |
| runner: ubuntu-24.04-arm | |
| arch: aarch64 | |
| build_type: full | |
| qt_source: system | |
| rendering_backend: Vulkan | |
| fail-fast: false | |
| runs-on: ${{matrix.runner}} | |
| container: ${{matrix.image}} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: false | |
| fetch-depth: 1 | |
| - name: Prepare Windows environment | |
| if: startsWith(matrix.os, 'Windows') | |
| uses: ./.github/actions/setup-windows | |
| - name: Read image environment variables | |
| # Bring some environment variables out of the Runner (Docker) image's environment into the Job environment. | |
| if: ${{matrix.image}} != "" | |
| shell: bash | |
| run: | | |
| echo "CONAN_HOME=$CONAN_HOME" >> $GITHUB_ENV | |
| echo "CONAN_PROFILE=$CONAN_PROFILE" >> $GITHUB_ENV | |
| echo "APP_TARGET_NAME=$APP_TARGET_NAME" >> $GITHUB_ENV | |
| - name: Configure Build Environment 1 | |
| shell: bash | |
| id: buildenv1 | |
| run: | | |
| # Setting short commit SHA for use as RELEASE_NAME in generated installers. | |
| echo "GIT_COMMIT_SHORT=`echo $GIT_COMMIT | cut -c1-7`" >> $GITHUB_ENV | |
| echo "JOB_NAME=${{matrix.os}}, ${{matrix.build_type}}" >> $GITHUB_ENV | |
| # Linux build variables | |
| if [[ "${{ matrix.os }}" = "Ubuntu"* ]]; then | |
| echo "CONAN_CPPSTD=gnu20" >> $GITHUB_ENV | |
| echo "INSTALLER_EXT=AppImage" >> $GITHUB_ENV | |
| if [[ "${{ matrix.arch }}" = "aarch64" ]]; then | |
| if [ "${{ matrix.build_type }}" = "full" ]; then | |
| echo "CMAKE_EXTRA=-DOVERTE_BUILD_TOOLS=FALSE" >> $GITHUB_ENV | |
| else | |
| echo "CMAKE_EXTRA=-DOVERTE_BUILD_SERVER=FALSE -DOVERTE_BUILD_TOOLS=FALSE" >> $GITHUB_ENV | |
| fi | |
| fi | |
| if [[ "${{ matrix.arch }}" = "amd64" ]]; then | |
| if [ "${{ matrix.build_type }}" != "full" ]; then | |
| echo "CMAKE_EXTRA=-DOVERTE_BUILD_SERVER=FALSE -DOVERTE_BUILD_TOOLS=FALSE" >> $GITHUB_ENV | |
| fi | |
| fi | |
| fi | |
| # Mac build variables | |
| if [ "${{ matrix.os }}" = "macOS-10.15" ]; then | |
| echo "INSTALLER_EXT=dmg" >> $GITHUB_ENV | |
| if [ "${{ matrix.build_type }}" = "full" ]; then | |
| echo "CMAKE_EXTRA=-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV | |
| else | |
| echo "CMAKE_EXTRA=-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCLIENT_ONLY=1 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV | |
| fi | |
| fi | |
| # Windows build variables | |
| if [[ "${{ matrix.os }}" = "Windows"* ]]; then | |
| echo "CONAN_CPPSTD=20" >> $GITHUB_ENV | |
| echo "INSTALLER_EXT=exe" >> $GITHUB_ENV | |
| if [ "${{ matrix.build_type }}" = "full" ]; then | |
| echo "CMAKE_EXTRA=-A x64 -DJSDOC_ENABLED:BOOL=TRUE" >> $GITHUB_ENV | |
| else | |
| echo "CMAKE_EXTRA=-A x64 -DJSDOC_ENABLED:BOOL=TRUE -DCLIENT_ONLY=1" >> $GITHUB_ENV | |
| fi | |
| fi | |
| # Android + Quest build variables | |
| if [[ "${{ matrix.build_type }}" == "android" ]]; then | |
| HIFI_ANDROID_PRECOMPILED="${{runner.workspace}}/dependencies" | |
| echo "HIFI_ANDROID_PRECOMPILED=$HIFI_ANDROID_PRECOMPILED" >> $GITHUB_ENV | |
| mkdir $HIFI_ANDROID_PRECOMPILED | |
| echo "INSTALLER_EXT=apk" >> $GITHUB_ENV | |
| fi | |
| # Configuration is broken into two steps because you can't set an env var and also reference it in the same step | |
| - name: Configure Build Environment 2 | |
| shell: bash | |
| run: | | |
| echo "CMAKE_EXTRA=${CMAKE_EXTRA} -DOVERTE_RENDERING_BACKEND=${{ matrix.rendering_backend }}" >> $GITHUB_ENV | |
| echo "${{ steps.buildenv1.outputs.symbols_archive }}" | |
| if [ "${{ matrix.build_type }}" = "full" ]; then | |
| if [[ "${{ matrix.os }}" = "Ubuntu"* ]]; then | |
| echo "ARTIFACT_NAME=Overte-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}-$(uname -m)-${{ matrix.rendering_backend }}.$INSTALLER_EXT" >> $GITHUB_ENV | |
| else | |
| echo "ARTIFACT_NAME=Overte-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}.$INSTALLER_EXT" >> $GITHUB_ENV | |
| fi | |
| else | |
| echo "ARTIFACT_NAME=Overte-Interface-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}.$INSTALLER_EXT" >> $GITHUB_ENV | |
| fi | |
| - name: Cache conan | |
| id: conan-cache | |
| uses: actions/cache@v5 | |
| with: | |
| key: conan-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles('conanfile.py') }} | |
| path: | | |
| ${{ env.CONAN_HOME }}/sources | |
| ${{ env.CONAN_HOME }}/p | |
| - name: Install Conan dependencies | |
| uses: ./.github/actions/conan-install | |
| with: | |
| qt_source: ${{matrix.qt_source}} | |
| build_type: ${{env.BUILD_TYPE}} | |
| cppstd: ${{env.CONAN_CPPSTD}} | |
| conan_profile: ${{env.CONAN_PROFILE}} | |
| - name: Upload dependency source backups | |
| shell: bash | |
| env: | |
| # Token for uploading dependency source backups. | |
| CONAN_BUILD_DEPENDENCIES_BACKUP_UPLOAD_TOKEN: ${{ secrets.CONAN_BUILD_DEPENDENCIES_BACKUP_UPLOAD_TOKEN }} | |
| run: conan cache backup-upload || echo "Credentials cannot be accessed on remote Pull Request builds. Continuing…" | |
| - name: Cleanup Conan dependencies | |
| if: always() && steps.conan-cache.cache-hit != 'true' | |
| run: conan cache clean "*" -sbd | |
| shell: bash | |
| - name: Save Conan cache | |
| if: always() && steps.conan-cache.cache-hit != 'true' | |
| uses: actions/cache/save@v5 | |
| with: | |
| key: conan-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles('conanfile.py') }} | |
| path: | | |
| ${{ env.CONAN_HOME }}/sources | |
| ${{ env.CONAN_HOME }}/p | |
| - name: Configure CMake | |
| shell: bash | |
| run: | | |
| if [[ "${{ matrix.os }}" =~ "Windows" ]]; then | |
| # This syntax requires CMake 3.23 | |
| cmake --preset conan-default -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA | |
| else | |
| # This syntax requires CMake 3.23 | |
| cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA | |
| fi | |
| - name: Build Application | |
| if: matrix.build_type == 'full' || matrix.build_type == 'client' | |
| shell: bash | |
| run: cmake --build . --target $APP_TARGET_NAME $CMAKE_BUILD_EXTRA | |
| - name: Build Domain Server | |
| if: matrix.build_type == 'full' | |
| shell: bash | |
| run: cmake --build . --target domain-server $CMAKE_BUILD_EXTRA | |
| - name: Build Assignment Client | |
| if: matrix.build_type == 'full' | |
| shell: bash | |
| run: cmake --build . --target assignment-client $CMAKE_BUILD_EXTRA | |
| - name: Build Console | |
| if: matrix.build_type == 'full' && matrix.arch != 'aarch64' || startsWith(matrix.os, 'windows') | |
| shell: bash | |
| run: | | |
| cmake --build . --target packaged-server-console $CMAKE_BUILD_EXTRA | |
| - name: Build Installer | |
| if: matrix.build_type != 'android' | |
| shell: bash | |
| run: | | |
| echo "Retry code from https://unix.stackexchange.com/a/137639" | |
| function fail { | |
| echo $1 >&2 | |
| exit 1 | |
| } | |
| function retry { | |
| local n=1 | |
| local max=5 | |
| local delay=15 | |
| while true; do | |
| "$@" && break || { | |
| if [[ $n -lt $max ]]; then | |
| ((n++)) | |
| echo "Command failed. Attempt $n/$max:" | |
| sleep $delay; | |
| else | |
| fail "The command has failed after $n attempts." | |
| fi | |
| } | |
| done | |
| } | |
| retry cmake --build . --config $BUILD_TYPE --target package $CMAKE_BUILD_EXTRA | |
| # As of 05/17/21 GitHub Virtual Environments changed their "Ubuntu 18.04.5 LTS" image to include two versions of CMake for Android | |
| # https://github.com/actions/virtual-environments/blob/ubuntu18/20210517.1/images/linux/Ubuntu1804-README.md | |
| # Removing 3.18.1 version of CMake as its not compatible with our Android build. | |
| # It will fall back to 3.10.2 which is already installed | |
| - name: Nuke CMake 3.18.1-g262b901 | |
| if: matrix.build_type == 'android' | |
| shell: bash | |
| run: | | |
| /usr/local/lib/android/sdk/tools/bin/sdkmanager --uninstall 'cmake;3.18.1' | |
| - name: Build for Android + Quest | |
| if: matrix.build_type == 'android' | |
| shell: bash | |
| working-directory: ${{runner.workspace}}/overte | |
| run: | | |
| echo "Pre-cache the vcpkg managed dependencies" | |
| $PYTHON_EXEC prebuild.py --build-root ${{runner.workspace}}/build --android interface | |
| cd android | |
| # Pre-cache the gradle dependencies | |
| ./gradlew -m tasks -PHIFI_ANDROID_PRECOMPILED=$HIFI_ANDROID_PRECOMPILED | |
| # Build! | |
| ./build_android.sh | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ARTIFACT_NAME }} | |
| path: ./build/Overte-* | |
| if-no-files-found: error | |
| - name: Output debug information | |
| if: always() | |
| uses: ./.github/actions/debug-info |