diff --git a/appveyor.yml b/appveyor.yml index 0ac27af9dd97..2be92474b695 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -31,7 +31,8 @@ matrix: skip_commits: files: - doc/ - - LICENCE + - .travis.yml + - LICENSE - README - README.md - CHANGELOG @@ -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 ########## @@ -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=&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 diff --git a/cmake/ctest-to-junit.xsl b/cmake/ctest-to-junit.xsl new file mode 100644 index 000000000000..8bd53978b6ac --- /dev/null +++ b/cmake/ctest-to-junit.xsl @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +