Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c02b4aa
appveyor.yml: Switch to CMake on Ubuntu
Holzhaus Sep 17, 2019
c9affd7
appveyor.yml: Remove upload of test_results.xml on Ubuntu
Holzhaus Sep 17, 2019
8f7324d
appveyor.yml: Switch to CMake on Windows
Holzhaus Sep 17, 2019
0d72516
appveyor.yml: Remove upload of test_results.xml on Windows
Holzhaus Sep 17, 2019
4aaf8e7
appveyor.yml: Add .travis.yml and LICENSE to skip_commits/files
Holzhaus Sep 17, 2019
0ba9cc7
appveyor.yml: Remove non-working CLI setting of CMAKE_FIND_LIBRARY_PR…
Holzhaus Sep 17, 2019
6a29342
appveyor.yml: Remove Git from %PATH% to avoid wrong linker
Holzhaus Oct 3, 2019
a51f11e
appveyor.yml: Use Visual Studio 15 2017 Win64 generator
Holzhaus Oct 3, 2019
7fc474a
appveyor.yml: Fix usage of Release config on Windows
Holzhaus Oct 7, 2019
f68b04c
appveyor.yml: Remove mixxx-test build (included in ALL)
Holzhaus Oct 24, 2019
2dcfbeb
appveyor.yml: Set STATIC_DEPS=ON on Windows
Holzhaus Oct 8, 2019
95183f2
appveyor.yml: Generate EXE/MSI installers using NSIS/WIX
Holzhaus Oct 10, 2019
d677d69
appveyor.yml: Invoke ctest directly instead of using "test" target
Holzhaus Oct 10, 2019
57be363
appveyor.yml: Upload test result XML
Holzhaus Oct 11, 2019
21ce7f0
appveyor.yml: Disable test output compression in CTest XML file
Holzhaus Oct 11, 2019
396fbc5
appveyor.yml: Disable GTEST_COLOR (interferes with JUnit XML output)
Holzhaus Oct 11, 2019
5915402
appveyor.yml: Split cmake options into separate lines
Holzhaus Oct 12, 2019
82d7032
appveyor.yml: Add -L flag to cmake to dump options
Holzhaus Oct 12, 2019
4c829b0
appveyor.yml: Split apt install packages into separate lines
Holzhaus Oct 12, 2019
e29ba7c
appveyor.yml: Switch to Ninja build system on Windows
Holzhaus Oct 12, 2019
9397118
appveyor.yml: Add clcache support
Holzhaus Oct 12, 2019
e853017
appveyor.yml: Add ccache support on Ubuntu
Holzhaus Oct 12, 2019
3fe6af7
appveyor.yml: Remove _ENABLED suffix from option names
Holzhaus Oct 24, 2019
b1eaba1
Merge branch 'master' of github.com:mixxxdj/mixxx into cmake-ci
Holzhaus Feb 7, 2020
23a236c
appveyor.yml: Install cmake on Ubuntu via pip
Holzhaus Feb 7, 2020
191b6b6
CMake: Add XSLT for converting from CTest results to JUnit XML
Holzhaus Feb 11, 2020
2334558
CMake: Add support for skipped/errored tests in ctest-to-junit.xsl
Holzhaus Feb 11, 2020
d49e03e
appveyor.yml: Use local patched version of ctest-to-junit.xsl
Holzhaus Feb 11, 2020
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
162 changes: 137 additions & 25 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ matrix:
skip_commits:
files:
- doc/
- LICENCE
- .travis.yml
- LICENSE
- README
- README.md
- CHANGELOG
Expand All @@ -48,20 +49,82 @@ for:

clone_folder: /home/appveyor/projects/mixxx

cache:
- /home/appveyor/.ccache

install:
- sudo apt-get update
- sudo apt-get -y install gdb libavformat-dev libchromaprint-dev libfaad-dev libflac-dev libid3tag0-dev libmad0-dev libmodplug-dev libmp3lame-dev libmp4v2-dev libopus-dev libopusfile-dev libportmidi-dev libprotobuf-dev libqt5opengl5-dev libqt5sql5-sqlite libqt5svg5-dev librubberband-dev libshout3-dev libsndfile1-dev libsqlite3-dev libtag1-dev libupower-glib-dev libusb-1.0-0-dev libwavpack-dev portaudio19-dev protobuf-compiler qt5-default qtscript5-dev libqt5x11extras5-dev scons qt5keychain-dev liblilv-dev libsoundtouch-dev
- sudo apt-get -y install
ccache
gdb
libavformat-dev
libchromaprint-dev
libfaad-dev
libflac-dev
libid3tag0-dev
liblilv-dev
libmad0-dev
libmodplug-dev
libmp3lame-dev
libmp4v2-dev
libopus-dev
libopusfile-dev
libportmidi-dev
libprotobuf-dev
libqt5opengl5-dev
libqt5sql5-sqlite
libqt5svg5-dev
libqt5x11extras5-dev
librubberband-dev
libshout3-dev
libsndfile1-dev
libsoundtouch-dev
libsqlite3-dev
libtag1-dev
libupower-glib-dev
libusb-1.0-0-dev
libwavpack-dev
portaudio19-dev
protobuf-compiler
python-pip
qt5-default
qt5keychain-dev
qtscript5-dev
xsltproc
- sudo pip install cmake

before_build:
# Limit cache size to 100 MB
- ccache -M 100M
- ccache -c
- ccache -s

build_script:
# ffmpeg=1 requires FFmpeg 4.0, but Ubuntu 18.04 still provides only FFmpeg 3.4.x
- scons -j4 test=1 mad=1 faad=1 opus=1 modplug=1 wv=1 hss1394=0 virtualize=0 debug_assertions_fatal=1 verbose=0 localecompare=1
- export CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)"
- mkdir cmake_build
- cd cmake_build
- cmake
-L
-DFAAD=ON
-DHSS1394=OFF
-DLOCALECOMPARE=ON
-DMAD=ON
-DMODPLUG=ON
-DOPUS=ON
-DWAVPACK=ON
..
- cmake --build .
- sudo cmake --build . --target install

test_script:
- xvfb-run -- ./mixxx-test --gtest_output=xml:test_results.xml
- xvfb-run -- ./mixxx-test --benchmark
- export CTEST_OUTPUT_ON_FAILURE=1
- xvfb-run -- ctest -T test --no-compress-output
- xvfb-run -- cmake --build . --target benchmark

after_test:
- curl -F 'file=@test_results.xml' "https://ci.appveyor.com/api/testresults/junit/$APPVEYOR_JOB_ID"
- xsltproc -o ctest-to-junit-results.xml ../cmake/ctest-to-junit.xsl Testing/*/Test.xml
- curl -F 'file=@ctest-to-junit-results.xml' "https://ci.appveyor.com/api/testresults/junit/$APPVEYOR_JOB_ID"


########## END UBUNTU SPECIFIC CONFIGURATION ##########

Expand All @@ -81,41 +144,90 @@ for:

cache:
- C:\mixxx-buildserver
- C:\Users\appveyor\clcache

environment:
ENVIRONMENTS_URL: https://downloads.mixxx.org/builds/buildserver/2.3.x-windows/
ENVIRONMENTS_PATH: C:\mixxx-buildserver
ENVIRONMENT_NAME: 2.3-j00013-PLATFORM-CONFIGURATION-static-36f44bd2-minimal
QT_VERSION: 5.12.0
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community"
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'


install:
- set /P ENVIRONMENT_NAME=<build/windows/golden_environment
- call set ENVIRONMENT_NAME=%%ENVIRONMENT_NAME:PLATFORM=%platform%%%
- call set ENVIRONMENT_NAME=%%ENVIRONMENT_NAME:CONFIGURATION=%configuration%%%
- cd %TEMP%
- echo *** Downloading precompiled build environment if not in build-cache
- cd %APPVEYOR_BUILD_FOLDER%
- build\windows\install_buildenv.bat %ENVIRONMENTS_URL% %ENVIRONMENT_NAME% %ENVIRONMENTS_PATH%
- set ENVIRONMENT_NAME=%%ENVIRONMENT_NAME:PLATFORM=%platform%%%
- set ENVIRONMENT_NAME=%%ENVIRONMENT_NAME:CONFIGURATION=%configuration%%%
- set WINLIB_PATH=%ENVIRONMENTS_PATH%\%ENVIRONMENT_NAME%
- IF EXIST %WINLIB_PATH% (
echo Using cached environment %WINLIB_PATH%...
) else (
mkdir %ENVIRONMENTS_PATH% &&
echo Downloading environment %ENVIRONMENT_NAME%... &&
curl -fsS -L -o%ENVIRONMENTS_PATH%\%ENVIRONMENT_NAME%.zip %ENVIRONMENTS_URL%/%ENVIRONMENT_NAME%.zip &&
echo Unpacking environment %ENVIRONMENT_NAME% to %ENVIRONMENTS_PATH%... &&
7z -o%ENVIRONMENTS_PATH% x %ENVIRONMENTS_PATH%\%ENVIRONMENT_NAME%.zip || exit 1
)
- choco install ninja
- python -m pip install git+https://github.com/frerich/clcache.git

before_build:
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- set QT_PATH=%WINLIB_PATH%\Qt-%QT_VERSION%
- set CMAKE_BUILD_PARALLEL_LEVEL=%NUMBER_OF_CORES%
- call "%MSVC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x64
- cd %APPVEYOR_BUILD_FOLDER%
# Limit cache size to 100 MB
- clcache -M 100000000
- clcache -c
- clcache -s
# Improve clcache performance
- set CLCACHE_SERVER=1
- set CLCACHE_HARDLINK=1
- ps: Start-Process clcache-server

build_script:
- build\appveyor\build_mixxx.bat %platform% %configuration% %ENVIRONMENTS_PATH%\%ENVIRONMENT_NAME%
- mkdir cmake_build
- cd cmake_build
- cmake
-L
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=C:\mixxx
-DCMAKE_PREFIX_PATH=%WINLIB_PATH%;%QT_PATH%
-DMEDIAFOUNDATION=ON
-DOPUS=ON
-DLOCALECOMPARE=ON
-DSTATIC_DEPS=ON
-G "Ninja"
..
- cmake --build .
- cmake --build . --target install
# Generate EXE/MSI installers
- cpack -G "NSIS"
- cpack -G "WIX"

test_script:
- echo *** Testing
# Calling mixxx-test under bash to have standard output
# and use stdbuf to unbuffer standard & error output
- bash -c "stdbuf -oL -eL dist*/mixxx-test.exe --gtest_output=xml:test_results.xml 2>&1"
- timeout 5 > NUL
- bash -c "stdbuf -oL -eL dist*/mixxx-test.exe --benchmark 2>&1"
- timeout 5 > NUL
# Calling mixxx-test under bash to have standard output and use stdbuf to
# unbuffer standard & error output
- set CTEST_OUTPUT_ON_FAILURE=1
- ctest -C "Release" -T test --no-compress-output
- cmake --build . --target benchmark

after_test:
- ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test_results.xml))
# Found at https://help.appveyor.com/discussions/suggestions/5298-support-ctest-xml-test-results
- ps: |
$ctest_xml = Get-ChildItem -Path Testing\*\Test.xml
$ctest_to_junit_xsl = Get-ChildItem -Path ..\cmake\ctest-to-junit.xsl
$XSLInputElement = New-Object System.Xml.Xsl.XslCompiledTransform
$XSLInputElement.Load($ctest_to_junit_xsl)
$XSLInputElement.Transform((Resolve-Path $ctest_xml), (Join-Path (Resolve-Path .) "ctest-to-junit-results.xml"))
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\ctest-to-junit-results.xml))


artifacts:
- path: '*.exe'
- path: '*.msi'
- path: 'cmake_build/*.exe'
- path: 'cmake_build/*.msi'

on_finish:
# Uncomment the following line if you don't want the build VM to be destroyed
Expand Down
54 changes: 54 additions & 0 deletions cmake/ctest-to-junit.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This XSLT stylesheet is taken from the jenkins-ctest-plugin by Version One,
Inc. and Ryan Pavlik <abiryan@ryand.net> and is subject to the terms of the
MIT License.

It was taken from this GitHub repositiory:
https://github.com/rpavlik/jenkins-ctest-plugin

Includes modifications by Jan Holthuis to add support for skipped/errored
tests.
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<testsuites>
<xsl:variable name="buildName" select="//Site/@BuildName"/>
<xsl:variable name="numberOfTests" select="count(//Site/Testing/Test)"/>
<xsl:variable name="numberOfFailures" select="count(//Site/Testing/Test[@Status!='passed'])" />
<testsuite name="CTest"
tests="{$numberOfTests}" time="0"
failures="{$numberOfFailures}" errors="0"
skipped="0">
<xsl:for-each select="//Site/Testing/Test">
<xsl:variable name="testName" select="translate(Name, '-', '_')"/>
<xsl:variable name="duration" select="Results/NamedMeasurement[@name='Execution Time']/Value"/>
<xsl:variable name="status" select="@Status"/>
<xsl:variable name="output" select="Results/Measurement/Value"/>
<xsl:variable name="className" select="translate(Path, '/.', '.')"/>
<testcase classname="projectroot{$className}"
name="{$testName}"
time="{$duration}">
<xsl:if test="@Status='failed'">
<failure>
<xsl:value-of select="$output" />
</failure>
</xsl:if>
<xsl:if test="@Status='errored'">
<error>
<xsl:value-of select="$output" />
</error>
</xsl:if>
<xsl:if test="@Status='notrun'">
<skipped />
</xsl:if>
<system-out>
<xsl:value-of select="$output" />
</system-out>
</testcase>
</xsl:for-each>
</testsuite>
</testsuites>
</xsl:template>
</xsl:stylesheet>