Merge pull request #2 from SeaOtocinclus/export-D90536530 #28
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: Build and Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| name: Build VRS on ${{ matrix.os }} / XPRS=${{ matrix.XPRS_FLAG }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-14, macos-latest, ubuntu-latest] # note: macos builds are arm only | |
| XPRS_FLAG: ["ON", "OFF"] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| sudo apt-get update -y | |
| sudo apt-get install -o Acquire::Retries=5 \ | |
| cmake git ninja-build libgtest-dev libfmt-dev \ | |
| libjpeg-dev libturbojpeg-dev libpng-dev \ | |
| liblz4-dev libzstd-dev libxxhash-dev \ | |
| libboost-dev \ | |
| libopus-dev \ | |
| qtbase5-dev portaudio19-dev \ | |
| libeigen3-dev | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| # Update or install cmake | |
| brew upgrade cmake || brew install cmake | |
| # Install deps, but use pre-installed git, ninja | |
| brew install googletest glog fmt \ | |
| jpeg-turbo libpng \ | |
| lz4 zstd xxhash \ | |
| boost \ | |
| opus \ | |
| qt5 portaudio \ | |
| eigen | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| - name: Build FFMPEG | |
| shell: bash | |
| if: matrix.XPRS_FLAG == 'ON' | |
| run: | | |
| ./build_third_party_libs/build_ffmpeg_linuxunix.sh | |
| - name: Configure | |
| shell: bash | |
| run: | | |
| if [ "$RUNNER_OS" == "macOS" ]; then | |
| export QT_DIR=$(find /usr/local/Cellar/qt\@5 -name "5.*" -depth 1) | |
| fi | |
| mkdir build | |
| cmake -S . -B build -G Ninja -DBUILD_WITH_XPRS:BOOL="${{ matrix.XPRS_FLAG }}" | |
| - name: Build and Test C++ | |
| shell: bash | |
| run: | | |
| cd build | |
| ninja all | |
| ctest -j8 |