diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2020-11-19 23:01:00 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2020-11-20 01:02:58 +0100 |
commit | 635d58521c05c7fecb4d67b9ca69c94b38fb9d9b (patch) | |
tree | f756c2dceea36fb9ea7093573e25328adfb28dcc | |
parent | 1ddb09583aee53d34f3e4d48fc48ec98619957bb (diff) |
GitHub CI: Add Ubuntu 20.04 build
-rw-r--r-- | .github/workflows/build.yml | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a52a18e64..bf19532667 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,19 +15,22 @@ env: jobs: build-ubuntu-gcc: - name: Ubuntu 18.04 (gcc) - runs-on: ubuntu-18.04 + name: ${{ matrix.os }} / gcc + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04, ubuntu-20.04] steps: - name: Check out repository uses: actions/checkout@v2 - - name: Install build dependencies + + - name: Install common build dependencies run: | sudo apt-get update && sudo apt-get install -y --no-install-recommends \ ccache \ libavformat-dev \ libchromaprint-dev \ libebur128-dev \ - libfaad-dev \ libfftw3-dev \ libflac-dev \ libid3tag0-dev \ @@ -35,7 +38,6 @@ jobs: libmad0-dev \ libmodplug-dev \ libmp3lame-dev \ - libmp4v2-dev \ libopus-dev \ libopusfile-dev \ libportmidi-dev \ @@ -58,14 +60,30 @@ jobs: qt5-default \ qt5keychain-dev \ qtscript5-dev \ + + - name: Install Ubuntu 18.04 build dependencies + if: matrix.os == 'ubuntu-18.04' + run: | + sudo apt-get install -y --no-install-recommends \ + libfaad-dev \ + libmp4v2-dev + - name: Install Ubuntu 20.04 build dependencies + if: matrix.os == 'ubuntu-20.04' + run: | + sudo apt-get install -y --no-install-recommends \ + libavcodec-dev \ + libavutil-dev + - name: Set up cmake uses: jwlawson/actions-setup-cmake@v1.4 with: # This should always match the mininum required version in # our CMakeLists.txt cmake-version: '3.13.x' + - name: Create build directory run: mkdir cmake_build + - name: Set up ccache cache uses: actions/cache@v2 with: @@ -74,23 +92,36 @@ jobs: restore-keys: | ${{ runner.os }}-ccache-${{ github.head_ref }} ${{ runner.os }}-ccache + + - name: Preconfigure Ubuntu 18.04 + if: matrix.os == 'ubuntu-18.04' + run: echo "CMAKE_FLAGS_UBUNTU_EXTRA=-DFAAD=ON" >> $GITHUB_ENV + + - name: Preconfigure Ubuntu 20.04 + if: matrix.os == 'ubuntu-20.04' + run: echo "CMAKE_FLAGS_UBUNTU_EXTRA=-DFFMPEG=ON" >> $GITHUB_ENV + - name: Configure - run: cmake $CMAKE_FLAGS_COMMON $CMAKE_FLAGS_UBUNTU -S . -B cmake_build + run: cmake $CMAKE_FLAGS_COMMON $CMAKE_FLAGS_UBUNTU $CMAKE_FLAGS_UBUNTU_EXTRA -S . -B cmake_build env: - # TODO for Ubuntu Focal: Replace "-DFAAD=ON" with "-DFFMPEG=ON" - CMAKE_FLAGS_UBUNTU: -DFAAD=ON -DKEYFINDER=ON -DLOCALECOMPARE=ON -DMAD=ON -DMODPLUG=ON -DWAVPACK=ON + CMAKE_FLAGS_UBUNTU: -DKEYFINDER=ON -DLOCALECOMPARE=ON -DMAD=ON -DMODPLUG=ON -DWAVPACK=ON + - name: Set up problem matcher uses: ammaraskar/gcc-problem-matcher@master + - name: Build run: cmake --build . -j $(nproc) working-directory: cmake_build + - name: Test run: ctest --timeout 45 working-directory: cmake_build - - name: Package + + - name: Create Debian package run: cpack -G DEB working-directory: cmake_build - - name: Deploy artifacts + + - name: Deploy Debian package uses: actions/upload-artifact@v2 with: name: Ubuntu DEB |