Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 94 additions & 63 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ jobs:
fail-fast: false
matrix:
include:
- name: Ubuntu 20.04 (gcc)
- name: Ubuntu 20.04 (gcc) Qt5
os: ubuntu-20.04
workspace: /home/runner/mixxx
artifacts_path: /home/runner/mixxx/build/*.deb
artifacts_name: Ubuntu 20.04 DEB
artifacts_slug: ubuntu-focal
cmake_args: >-
-DWARNINGS_FATAL=ON
-DBULK=ON
Expand All @@ -21,42 +25,41 @@ jobs:
-DMODPLUG=ON
-DWAVPACK=ON
-DINSTALL_USER_UDEV_RULES=OFF
cmake_generator: Unix Makefiles
ctest_args:
compiler_cache: ccache
compiler_cache_path: ~/.ccache
cpack_generator: DEB
buildenv_basepath: /home/runner/buildenv
buildenv_script: tools/debian_buildenv.sh
artifacts_name: Ubuntu 20.04 DEB
artifacts_path: build/*.deb
artifacts_slug: ubuntu-focal
qt_qpa_platform: offscreen
- name: macOS 10.15
- name: macOS 10.15 Qt5
os: macos-10.15
workspace: /Users/runner/mixxx
artifacts_path: /Users/runner/mixxx/build/*.dmg
artifacts_name: macOS DMG
artifacts_slug: macos-macosintel
cmake_args: >-
-DBULK=ON
-DCOREAUDIO=ON
-DHSS1394=ON
-DMACOS_BUNDLE=ON
-DMODPLUG=OFF
-DWAVPACK=OFF
cmake_generator: Ninja
# TODO: Fix this broken test on macOS
ctest_args: --exclude-regex DirectoryDAOTest.relocateDirectory
cpack_generator: DragNDrop
compiler_cache: ccache
compiler_cache_path: /Users/runner/Library/Caches/ccache
buildenv_basepath: /Users/runner/buildenv
buildenv_script: tools/macos_buildenv.sh
artifacts_name: macOS DMG
artifacts_path: build/*.dmg
artifacts_slug: macos-macosintel
qt_qpa_platform: offscreen
- name: Windows 2019 (MSVC)
- name: Windows 2019 (MSVC) Qt5
os: windows-2019
# The D drive runs out of space when building dependencies with vcpkg.
workspace: C:\mixxx
artifacts_path: C:/mixxx/build/*.msi
artifacts_name: Windows Installer
artifacts_slug: windows-win64
# TODO: Re-enable FFmpeg after licensing issues have been clarified
# Attention: If you change the cmake_args for the Windows CI build,
# also adjust the for the local Windows build setup in
# ./tools/windows_buildenv.bat
cmake_args: >-
-DBULK=OFF
-DFFMPEG=OFF
Expand All @@ -66,18 +69,15 @@ jobs:
-DMEDIAFOUNDATION=ON
-DMODPLUG=ON
-DWAVPACK=ON
cmake_generator: Ninja
cc: cl
cxx: cl
# TODO: Fix these broken tests on Windows
ctest_args: --exclude-regex '^AutoDJProcessorTest.*$'
cpack_generator: WIX
exe_suffix: .exe
compiler_cache: sccache
compiler_cache_path: C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache
buildenv_basepath: C:\buildenv
buildenv_script: tools/windows_buildenv.bat
artifacts_name: Windows Installer
artifacts_path: build/*.msi
artifacts_slug: windows-win64
qt_qpa_platform: windows

env:
Expand Down Expand Up @@ -114,8 +114,10 @@ jobs:
run: cargo install --git https://github.com/mozilla/sccache.git --rev "${SCCACHE_COMMIT}"

- name: "Check out repository"
uses: actions/checkout@v2
uses: LebedevRI/checkout@issue197
with:
path: ${{ matrix.workspace }}
submodules: true
# This is necessary for making `git describe` work.
fetch-depth: 0

Expand All @@ -124,37 +126,33 @@ jobs:
# workflow is triggered by a tag push event.
# Possibly related: actions/checkout#290
run: git fetch origin --force --tags

- name: "[macOS] Set up cmake"
Comment thread
daschuer marked this conversation as resolved.
uses: jwlawson/actions-setup-cmake@v1.9
# Ubuntu 20.04 should use the CMake version from the repos, and Visual
# Studio on Windows comes with its own CMake version anyway.
if: runner.os == 'macOS'
with:
# This should always match the minimum required version in
# our CMakeLists.txt
cmake-version: '3.16.x'
working-directory: ${{ matrix.workspace }}

- name: "[Windows] Set up MSVC Developer Command Prompt"
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-vsdevenv@v3

- name: "[macOS] install ccache and make"
- name: "[macOS] install dependencies"
if: runner.os == 'macOS'
# nasm is needed for building ffmpeg
# automake is needed for building libusb
run: |
brew install ccache ninja

- name: "[macOS/Windows] Get build environment name"
if: runner.os != 'Linux'
id: buildenv_name
run: ${{ matrix.buildenv_script }} name

- name: "[macOS/Windows] Set up build environment cache"
if: runner.os != 'Linux'
uses: actions/cache@v2
with:
path: ${{ matrix.buildenv_basepath }}
key: ${{ runner.os }}-buildenv-${{ env.BUILDENV_NAME }}
brew install ccache ninja nasm automake

- name: "[Ubuntu] Install dependencies"
if: runner.os == 'Linux'
run: tools/debian_buildenv.sh
working-directory: ${{ matrix.workspace }}

# GitHub Actions installs a recent version of CMake which is in
# $PATH before system packages from apt. This ensures that Mixxx
# builds with the version of CMake in the minimum supported
# Ubuntu LTS. Old versions of CMake should not be used on Windows
# or macOS because they may not work with vcpkg.
- name: "[Ubuntu] Use CMake version from apt"
if: startsWith(matrix.os, 'ubuntu')
run: sudo rm cmake cpack ctest
working-directory: /usr/local/bin

- name: "[macOS] Import Apple code signing identity"
id: apple_codesign
Expand All @@ -163,7 +161,7 @@ jobs:
# Decrypt the certificate
openssl enc -aes-256-cbc -d -md sha512 \
-k "${MACOS_CODESIGN_OPENSSL_PASSWORD}" \
-in /Users/runner/work/mixxx/mixxx/packaging/certificates/macos_developer_id_codesign_certificate.p12.enc \
-in ${{ matrix.workspace }}/packaging/certificates/macos_developer_id_codesign_certificate.p12.enc \
-out ~/certificate.p12

# Create a temporary keychain for the certificate and import it.
Expand All @@ -180,7 +178,7 @@ jobs:

- name: "[Windows] Set up Windows code signing"
env:
WINDOWS_CODESIGN_CERTIFICATE_PATH: ${{ github.workspace }}\packaging\certificates\windows_sectigo_codesign_certificate.pfx
WINDOWS_CODESIGN_CERTIFICATE_PATH: ${{ matrix.workspace }}\packaging\certificates\windows_sectigo_codesign_certificate.pfx
WINDOWS_CODESIGN_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_CERTIFICATE_PASSWORD }}
WINDOWS_CODESIGN_SECURE_FILE_SALT: ${{ secrets.WINDOWS_CODESIGN_SECURE_FILE_SALT }}
WINDOWS_CODESIGN_SECURE_FILE_SECRET: ${{ secrets.WINDOWS_CODESIGN_SECURE_FILE_SECRET }}
Expand All @@ -192,11 +190,31 @@ jobs:
Add-Content -Path "$Env:GITHUB_ENV" -Value "WINDOWS_CODESIGN_CERTIFICATE_PASSWORD=$Env:WINDOWS_CODESIGN_CERTIFICATE_PASSWORD"
Add-Content -Path "$Env:GITHUB_ENV" -Value "CMAKE_ARGS_EXTRA=-DWINDOWS_CODESIGN=ON"

- name: "Set up build environment"
id: buildenv
run: ${{ matrix.buildenv_script }} setup
env:
BUILDENV_BASEPATH: ${{ matrix.buildenv_basepath }}
- name: "Authenticate to GitHub Packages"
if: runner.os != 'Linux' && github.repository_owner == 'mixxxdj'
shell: bash
run: |
nuget sources add -Name mixxx-github-packages -Source https://nuget.pkg.github.com/mixxxdj/index.json -Username mixxxdj -Password ${{ secrets.GITHUB_TOKEN }} -NonInteractive
nuget setapikey ${{ secrets.GITHUB_TOKEN }} -Source mixxx-github-packages -NonInteractive
echo "VCPKG_BINARY_SOURCES=clear;nuget,mixxx-github-packages,readwrite;" >> "${GITHUB_ENV}"

- name: Get Git commit of vcpkg submodule
if: runner.os != 'Linux'
shell: bash
run: echo VCPKG_COMMIT=$(git ls-tree HEAD vcpkg | awk '{print $3}') >> "${GITHUB_ENV}"
working-directory: ${{ matrix.workspace }}

# Caching the vcpkg_installed directory is faster than downloading
# packages with NuGet each run.
# Cache the vcpkg executable to avoid bootstrapping each time.
- name: "Setup vcpkg cache"
uses: actions/cache@v2
if: runner.os != 'Linux'
with:
path: |
${{ matrix.workspace }}/build/vcpkg_installed
${{ matrix.workspace }}/vcpkg/vcpkg${{ matrix.exe_suffix }}
key: vcpkg-${{ matrix.name }}-${{ env.VCPKG_COMMIT }}

- name: "[Ubuntu/macOS] Set compiler cache size limit"
# A full build without a cache fills the cache with about 300 MB.
Expand All @@ -216,12 +234,10 @@ jobs:
${{ matrix.os }}-${{ matrix.compiler_cache }}-${{ github.head_ref }}
${{ matrix.os }}-${{ matrix.compiler_cache }}

- name: "Create build directory"
run: mkdir build

- name: "Configure"
run: >-
cmake ${{ matrix.cmake_args }} ${{ env.CMAKE_ARGS_EXTRA }}
-G "${{ matrix.cmake_generator }}"
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_PREFIX_PATH="${{ env.CMAKE_PREFIX_PATH }}"
-DDEBUG_ASSERTIONS_FATAL=OFF
Expand All @@ -236,8 +252,9 @@ jobs:
-DVINYLCONTROL=ON
-DCMAKE_VERBOSE_MAKEFILE=OFF
-L
..
working-directory: build
-S .
-B build
working-directory: ${{ matrix.workspace }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
Expand All @@ -252,7 +269,7 @@ jobs:

- name: "Build"
run: cmake --build . --config RelWithDebInfo
working-directory: build
working-directory: ${{ matrix.workspace }}/build
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
Expand All @@ -266,7 +283,7 @@ jobs:

- name: "Test"
run: ctest --timeout 45 ${{ matrix.ctest_args }}
working-directory: build
working-directory: ${{ matrix.workspace }}/build
env:
# Render analyzer waveform tests to an offscreen buffer
QT_QPA_PLATFORM: ${{ matrix.qt_qpa_platform }}
Expand All @@ -277,14 +294,14 @@ jobs:

- name: Benchmark
run: cmake --build . --target mixxx-benchmark --config RelWithDebInfo
working-directory: build
working-directory: ${{ matrix.workspace }}/build
env:
# Render analyzer waveform tests to an offscreen buffer
QT_QPA_PLATFORM: ${{ matrix.qt_qpa_platform }}

- name: "Package"
run: cpack -G ${{ matrix.cpack_generator }} -V
working-directory: build
working-directory: ${{ matrix.workspace }}/build

- name: "[Ubuntu] Import PPA GPG key"
if: startsWith(matrix.os, 'ubuntu') && env.RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY != null
Expand All @@ -305,11 +322,12 @@ jobs:
CPACK_ARGS="-D DEB_SOURCEPKG=ON"
fi
cpack -G External $CPACK_ARGS
working-directory: build
working-directory: ${{ matrix.workspace }}/build

- name: "[macOS] Sign, Notarize, and Staple Package"
if: runner.os == 'macOS' && env.MACOS_CODESIGN_OPENSSL_PASSWORD != null && env.MACOS_CODESIGN_CERTIFICATE_PASSWORD != null && env.APPLE_APP_SPECIFIC_PASSWORD != null
run: packaging/macos/sign_notarize_staple.sh build/*.dmg
working-directory: ${{ matrix.workspace }}
env:
APPLE_ID_USERNAME: rryan@mixxx.org
APPLE_BUNDLE_ID: org.mixxx.mixxx
Expand All @@ -319,7 +337,7 @@ jobs:
- name: "[Windows] Sign Package"
if: runner.os == 'Windows' && env.WINDOWS_CODESIGN_CERTIFICATE_PATH != null && env.WINDOWS_CODESIGN_CERTIFICATE_PASSWORD != null
run: signtool sign /f $Env:WINDOWS_CODESIGN_CERTIFICATE_PATH /p $Env:WINDOWS_CODESIGN_CERTIFICATE_PASSWORD *.msi
working-directory: build
working-directory: ${{ matrix.workspace }}/build

- name: "Prepare for deployment"
# Copy the desired directory structure to the deploy/ directory. This
Expand All @@ -328,6 +346,7 @@ jobs:
id: prepare_deploy
if: github.event_name == 'push'
shell: bash
working-directory: ${{ matrix.workspace }}
run: >
if [[ "${GITHUB_REF}" =~ ^refs/tags/.* ]];
then
Expand Down Expand Up @@ -393,6 +412,7 @@ jobs:
# skip deploying Ubuntu builds to downloads.mixxx.org because these are deployed to the PPA
if: runner.os != 'Linux' && github.event_name == 'push' && env.SSH_AUTH_SOCK != null
shell: bash --login -eo pipefail "{0}"
working-directory: ${{ matrix.workspace }}
run: rsync --verbose --recursive --checksum --times --delay-updates "deploy/" "${SSH_USER}@${SSH_HOST}:${DESTDIR}/"
env:
DESTDIR: public_html/downloads
Expand All @@ -412,6 +432,17 @@ jobs:
name: ${{ matrix.artifacts_name }}
path: ${{ matrix.artifacts_path }}

- name: Upload GitHub Actions artifacts of vcpkg logs
if: always()
Comment thread
Be-ing marked this conversation as resolved.
uses: actions/upload-artifact@v2
with:
name: vcpkg-logs-${{ matrix.name }}
path: |
${{ matrix.workspace }}/vcpkg/buildtrees/**/*.log
${{ matrix.workspace }}/build/vcpkg-bootstrap.log
${{ matrix.workspace }}/build/vcpkg-manifest-install.log
if-no-files-found: ignore

update_manifest:
name: "Update manifest file on download server"
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ compile_commands.json
# Doxygen documentation
/doxygen

# Exclude buildenv directory from our helper scripts
/buildenv

# CMake build configurations, generated by tools/windows_buildenv.bat
/CMakeSettings*.json

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/mixxxdj/vcpkg.git
Loading