From fe91a65f03456d0e47481025404f1fc7896e53db Mon Sep 17 00:00:00 2001 From: Dominic Clark Date: Wed, 3 Aug 2022 17:29:11 +0100 Subject: [PATCH] Migrate CI to GitHub Actions (#6476) --- .appveyor.yml | 31 --- .circleci/config.yml | 225 ------------------- .github/workflows/build.yml | 250 +++++++++++++++++++++ .github/workflows/check-strings.yml | 19 -- .github/workflows/checks.yml | 31 +++ .travis.yml | 33 --- .travis/after_script.sh | 7 - .travis/ccache.sha256 | 1 - .travis/debian_pkgs.sha256 | 3 - .travis/install.sh | 11 - .travis/linux..before_install.sh | 8 - .travis/linux..install.sh | 23 -- .travis/linux..script.sh | 15 -- .travis/linux.debian-sid.before_install.sh | 2 - .travis/linux.debian-sid.install.sh | 17 -- .travis/linux.debian-sid.script.sh | 72 ------ .travis/linux.win.download.sh | 16 -- .travis/linux.win32.before_install.sh | 6 - .travis/linux.win32.install.sh | 29 --- .travis/linux.win32.script.sh | 11 - .travis/linux.win64.before_install.sh | 5 - .travis/linux.win64.install.sh | 19 -- .travis/linux.win64.script.sh | 11 - .travis/osx..before_install.sh | 7 - .travis/osx..install.sh | 22 -- .travis/osx..script.sh | 16 -- .travis/script.sh | 48 ---- CMakeLists.txt | 2 + doc/bash-completion/lmms | 1 - 29 files changed, 283 insertions(+), 658 deletions(-) delete mode 100644 .appveyor.yml delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/check-strings.yml create mode 100644 .github/workflows/checks.yml delete mode 100644 .travis.yml delete mode 100755 .travis/after_script.sh delete mode 100644 .travis/ccache.sha256 delete mode 100644 .travis/debian_pkgs.sha256 delete mode 100755 .travis/install.sh delete mode 100755 .travis/linux..before_install.sh delete mode 100755 .travis/linux..install.sh delete mode 100755 .travis/linux..script.sh delete mode 100755 .travis/linux.debian-sid.before_install.sh delete mode 100755 .travis/linux.debian-sid.install.sh delete mode 100755 .travis/linux.debian-sid.script.sh delete mode 100755 .travis/linux.win.download.sh delete mode 100755 .travis/linux.win32.before_install.sh delete mode 100755 .travis/linux.win32.install.sh delete mode 100755 .travis/linux.win32.script.sh delete mode 100755 .travis/linux.win64.before_install.sh delete mode 100755 .travis/linux.win64.install.sh delete mode 100755 .travis/linux.win64.script.sh delete mode 100755 .travis/osx..before_install.sh delete mode 100755 .travis/osx..install.sh delete mode 100755 .travis/osx..script.sh delete mode 100755 .travis/script.sh diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index c8e18bbb1..000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,31 +0,0 @@ -clone_depth: 1 -version: "{build}" -image: Visual Studio 2017 -platform: - - x86 - - x64 -environment: - matrix: - - compiler: msvc -install: - - cd C:\Tools\vcpkg - - git pull --quiet - - .\bootstrap-vcpkg.bat - - cd %APPVEYOR_BUILD_FOLDER% - - vcpkg install --triplet %PLATFORM%-windows --recurse fftw3 libsamplerate libsndfile lilv lv2 sdl2 - - nuget install clcache -Version 4.1.0 -build_script: - - cd %APPVEYOR_BUILD_FOLDER% - - mkdir build - - cd build - - ps: $env:CMAKE_PLATFORM="$(if ($env:PLATFORM -eq 'x64') { 'x64' } else { '' })" - - ps: $env:QT_SUFFIX="$(if ($env:PLATFORM -eq 'x64') { '_64' } else { '' })" - - cmake -DUSE_COMPILE_CACHE=ON -DCACHE_TOOL=%APPVEYOR_BUILD_FOLDER%/clcache.4.1.0/clcache-4.1.0/clcache.exe -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=c:/Qt/5.12/msvc2017%QT_SUFFIX% -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_GENERATOR_PLATFORM="%CMAKE_PLATFORM%" .. - - cmake --build . -- /maxcpucount:4 - - cmake --build . --target tests - - cmake --build . --target package -artifacts: - - path: 'build\lmms-*.exe' - name: Installer -cache: - - c:/tools/vcpkg/installed diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 6e879dbee..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,225 +0,0 @@ -version: 2 - -shared: - restore_cache: &restore_cache - restore_cache: - keys: - - ccache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }} - - ccache-{{ arch }}-{{ .Environment.CIRCLE_JOB }} - - ccache-{{ arch }} - save_cache: &save_cache - save_cache: - key: ccache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .BuildNum }} - paths: - - ~/.ccache - restore_homebrew_cache: &restore_homebrew_cache - restore_cache: - keys: - - homebrew-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }} - - homebrew-{{ arch }}-{{ .Environment.CIRCLE_JOB }} - - homebrew-{{ arch }} - save_homebrew_cache: &save_homebrew_cache - save_cache: - key: homebrew-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .BuildNum }} - paths: - - ~/Library/Caches/Homebrew - - /usr/local/Homebrew - - ccache_stats: &ccache_stats - run: - name: Print ccache statistics - command: | - echo "[ccache config]" - ccache -p - echo "[ccache stats]" - ccache -s - - # Commmon initializing commands - init: &init - run: - name: Initialize - command: | - mkdir -p /tmp/artifacts - # Workaround for failing submodule fetching - git config --global --unset url."ssh://git@github.com".insteadOf || true - if [[ -n "${CIRCLE_PR_NUMBER}" ]] - then - echo "Fetching out merged pull request" - git fetch -u origin refs/pull/${CIRCLE_PR_NUMBER}/merge:pr/merge - git checkout pr/merge - else - echo "Not a pull request" - fi - - # Commmon environment variables - common_environment: &common_environment - QT5: True - CMAKE_OPTS: -DUSE_WERROR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_CCACHE=ON - CCACHE_MAXSIZE: 500M - CCACHE_LOGFILE: /tmp/artifacts/ccache.log - MAKEFLAGS: -j6 - -jobs: - mingw32: - environment: - <<: *common_environment - docker: - - image: lmmsci/linux.mingw32:18.04 - steps: - - checkout - - *init - - *restore_cache - - run: - name: Building - command: | - mkdir build && cd build - ../cmake/build_win32.sh - make lmms - make - - run: - name: Build tests - command: cd build && make tests - - run: - name: Build installer - command: | - cd build - make package - cp ./lmms-*.exe /tmp/artifacts/ - - store_artifacts: - path: /tmp/artifacts/ - destination: / - - *ccache_stats - - *save_cache - mingw64: - environment: - <<: *common_environment - docker: - - image: lmmsci/linux.mingw64:18.04 - steps: - - checkout - - *init - - *restore_cache - - run: - name: Building - command: | - mkdir build && cd build - ../cmake/build_win64.sh - make - - run: - name: Build tests - command: cd build && make tests - - run: - name: Build installer - command: | - cd build - make package - cp ./lmms-*.exe /tmp/artifacts/ - - store_artifacts: - path: /tmp/artifacts/ - destination: / - - *ccache_stats - - *save_cache - linux.gcc: - docker: - - image: lmmsci/linux.gcc:18.04 - environment: - <<: *common_environment - steps: - - checkout - - *init - - *restore_cache - - run: - name: Configure - command: | - source /opt/qt5*/bin/qt5*-env.sh || true - mkdir build && cd build - cmake .. $CMAKE_OPTS -DCMAKE_INSTALL_PREFIX=./install - - run: - name: Build - command: cd build && make - - run: - name: Build tests - command: cd build && make tests - - run: - name: Run tests - command: build/tests/tests - - *ccache_stats - - run: - name: Build AppImage - command: | - cd build - make install - make appimage || (cat appimage.log && false) - cp ./lmms-*.AppImage /tmp/artifacts/ - - store_artifacts: - path: /tmp/artifacts/ - destination: / - - store_artifacts: - path: build/appimage.log - destination: / - - *save_cache - shellcheck: - docker: - - image: koalaman/shellcheck-alpine:v0.4.6 - steps: - - checkout - - run: - name: Shellcheck - command: shellcheck $(find "./cmake/" -type f -name '*.sh' -o -name "*.sh.in") - macos: - environment: - <<: *common_environment - macos: - xcode: "10.3.0" - steps: - - checkout - - *init - - *restore_homebrew_cache - - *restore_cache - - run: - name: Install Homebrew dependencies - command: | - # uninstall Homebrew's python 2 to prevent errors on brew install - brew uninstall python@2 || true - # Working around for https://github.com/Homebrew/brew/pull/9383 - (git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch && git merge FETCH_HEAD --ff-only) || true - (git -C "/usr/local/Homebrew" fetch && git merge FETCH_HEAD --ff-only) || true - brew install ccache fftw cmake pkg-config libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio lilv lv2 stk fluid-synth portaudio fltk qt5 carla - - run: - name: Install nodejs dependencies - command: npm install -g appdmg - - run: - name: Building - command: | - mkdir build && cd build - cmake .. -DCMAKE_INSTALL_PREFIX="../target" -DCMAKE_PREFIX_PATH="$(brew --prefix qt5)" $CMAKE_OPTS -DUSE_WERROR=OFF - make - - run: - name: Build tests - command: cd build && make tests - - run: - name: Run tests - command: build/tests/tests - - run: - name: Build DMG - command: | - cd build - make install - make dmg - cp ./lmms-*.dmg /tmp/artifacts/ - - store_artifacts: - path: /tmp/artifacts/ - destination: / - - *save_cache - - *save_homebrew_cache - - -workflows: - version: 2 - build-and-test: - jobs: - - macos - - mingw32 - - mingw64 - - linux.gcc - - shellcheck diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..3d8db8b78 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,250 @@ +--- +name: build +'on': [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + linux: + name: linux + runs-on: ubuntu-latest + container: lmmsci/linux.gcc:18.04 + env: + CMAKE_OPTS: >- + -DUSE_WERROR=ON + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DUSE_COMPILE_CACHE=ON + CCACHE_MAXSIZE: 500M + MAKEFLAGS: -j2 + steps: + - name: Update and configure Git + run: | + add-apt-repository ppa:git-core/ppa + apt-get update + apt-get --yes install git + git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Check out + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + - name: Cache ccache data + uses: actions/cache@v3 + with: + key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + ccache-${{ github.job }}-${{ github.ref }}- + ccache-${{ github.job }}- + path: ~/.ccache + - name: Configure + run: | + source /opt/qt5*/bin/qt5*-env.sh || true + mkdir build && cd build + cmake .. $CMAKE_OPTS -DCMAKE_INSTALL_PREFIX=./install + - name: Build + run: cmake --build build + - name: Build tests + run: cmake --build build --target tests + - name: Run tests + run: build/tests/tests + - name: Package + run: | + cmake --build build --target install + cmake --build build --target appimage \ + || (cat build/appimage.log && false) + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: linux + path: build/lmms-*.AppImage + - name: Print ccache statistics + run: | + echo "[ccache config]" + ccache -p + echo "[ccache stats]" + ccache -s + macos: + name: macos + runs-on: macos-11 + env: + CMAKE_OPTS: >- + -DUSE_WERROR=ON + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DUSE_COMPILE_CACHE=ON + CCACHE_MAXSIZE: 500M + MAKEFLAGS: -j3 + DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer + steps: + - name: Check out + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + - name: Cache ccache data + uses: actions/cache@v3 + with: + key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + ccache-${{ github.job }}-${{ github.ref }}- + ccache-${{ github.job }}- + path: ~/Library/Caches/ccache + - name: Install dependencies + run: | + brew install ccache fftw pkg-config libogg libvorbis lame libsndfile \ + libsamplerate jack sdl libgig libsoundio lilv lv2 stk \ + fluid-synth portaudio fltk qt@5 carla + npm install --location=global appdmg + - name: Configure + run: | + mkdir build + cmake -S . \ + -B build \ + -DCMAKE_INSTALL_PREFIX="../target" \ + -DCMAKE_PREFIX_PATH="$(brew --prefix qt5)" \ + $CMAKE_OPTS \ + -DUSE_WERROR=OFF + - name: Build + run: cmake --build build + - name: Build tests + run: cmake --build build --target tests + - name: Run tests + run: build/tests/tests + - name: Package + run: | + cmake --build build --target install + cmake --build build --target dmg + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: macos + path: build/lmms-*.dmg + - name: Print ccache statistics + run: | + echo "[ccache config]" + ccache -p + echo "[ccache stats]" + ccache -s + mingw: + strategy: + fail-fast: false + matrix: + arch: ['32', '64'] + name: mingw${{ matrix.arch }} + runs-on: ubuntu-latest + container: lmmsci/linux.mingw${{ matrix.arch }}:18.04 + env: + CMAKE_OPTS: >- + -DUSE_WERROR=ON + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DUSE_COMPILE_CACHE=ON + CCACHE_MAXSIZE: 500M + MAKEFLAGS: -j2 + steps: + - name: Update and configure Git + run: | + add-apt-repository ppa:git-core/ppa + apt-get update + apt-get --yes install git + git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Check out + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + - name: Cache ccache data + uses: actions/cache@v3 + with: + key: "ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}\ + -${{ github.run_id }}" + restore-keys: | + ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}- + ccache-${{ github.job }}-${{ matrix.arch }}- + path: ~/.ccache + - name: Configure + run: | + mkdir build && cd build + ../cmake/build_win${{ matrix.arch }}.sh + - name: Build + run: cmake --build build + - name: Build tests + run: cmake --build build --target tests + - name: Package + run: cmake --build build --target package + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: mingw${{ matrix.arch }} + path: build/lmms-*.exe + - name: Print ccache statistics + run: | + echo "[ccache config]" + ccache -p + echo "[ccache stats]" + ccache -s + msvc: + strategy: + fail-fast: false + matrix: + arch: ['x86', 'x64'] + name: msvc-${{ matrix.arch }} + runs-on: windows-2019 + env: + qt-version: '5.15.2' + steps: + - name: Check out + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + - name: Cache vcpkg dependencies + uses: actions/cache@v3 + with: + key: vcpkg-${{ matrix.arch }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + vcpkg-${{ matrix.arch }}-${{ github.ref }}- + vcpkg-${{ matrix.arch }}- + path: C:\vcpkg\installed + - name: Install 64-bit Qt + if: matrix.arch == 'x64' + # Temporary workaround until upstream install-qt-action is fixed + uses: PhysSong/install-qt-action@v3 + with: + version: ${{ env.qt-version }} + arch: win64_msvc2019_64 + archives: qtbase qtsvg qttools + cache: true + - name: Install 32-bit Qt + uses: PhysSong/install-qt-action@v3 + with: + version: ${{ env.qt-version }} + arch: win32_msvc2019 + archives: qtbase qtsvg qttools + cache: true + set-env: ${{ matrix.arch == 'x86' }} + - name: Install dependencies + run: | + vcpkg install --triplet ${{ matrix.arch }}-windows --recurse ` + fftw3 libsamplerate libsndfile lilv lv2 sdl2 + - name: Set up build environment + uses: ilammy/msvc-dev-cmd@d8610e2b41c6d0f0c3b4c46dad8df0fd826c68e1 + with: + arch: ${{ matrix.arch }} + - name: Configure + run: | + mkdir build + cmake -S . ` + -B build ` + -G Ninja ` + --toolchain C:/vcpkg/scripts/buildsystems/vcpkg.cmake ` + -DCMAKE_BUILD_TYPE=RelWithDebInfo + - name: Build + run: cmake --build build + - name: Build tests + run: cmake --build build --target tests + - name: Package + run: cmake --build build --target package + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: msvc-${{ matrix.arch }} + path: build\lmms-*.exe diff --git a/.github/workflows/check-strings.yml b/.github/workflows/check-strings.yml deleted file mode 100644 index a19b17b27..000000000 --- a/.github/workflows/check-strings.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: check-strings - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Install python-tinycss2 - run: sudo apt-get install -y python3-tinycss2 - - name: Update submodules - run: git submodule update --init --recursive - - name: Verify check-strings script - run: tests/check-strings/verify - - name: Run check-strings - run: tests/check-strings/check-strings diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 000000000..89565ccff --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,31 @@ +--- +name: checks +'on': [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + check-strings: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install python-tinycss2 + run: sudo apt-get install -y python3-tinycss2 + - name: Update submodules + run: git submodule update --init --recursive + - name: Verify check-strings script + run: tests/check-strings/verify + - name: Run check-strings + run: tests/check-strings/check-strings + shellcheck: + runs-on: ubuntu-latest + container: koalaman/shellcheck-alpine:v0.4.6 + steps: + - name: Check out + uses: actions/checkout@v3 + - name: Run shellcheck + run: | + shellcheck \ + $(find "./cmake/" -type f -name '*.sh' -o -name "*.sh.in") \ + doc/bash-completion/lmms \ + buildtools/update_locales diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d2d92d897..000000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -language: cpp -compiler: gcc -dist: xenial -sudo: required -cache: - directories: - - $HOME/apt_mingw_cache - - $HOME/.ccache - - $HOME/pbuilder-bases -matrix: - include: - - env: TYPE=style - - os: linux - - env: TARGET_OS=debian-sid TARGET_DEPLOY=True - git: - depth: false - - env: TARGET_OS=debian-sid TARGET_ARCH=i386 - git: - depth: false - - compiler: clang - env: TARGET_OS=debian-sid - git: - depth: false - - os: osx - osx_image: xcode10.3 -before_install: - # appdmg doesn't work with old Node.js - - if [ "$TRAVIS_OS_NAME" = osx ]; then nvm install 10; fi -install: ${TRAVIS_BUILD_DIR}/.travis/install.sh -script: ${TRAVIS_BUILD_DIR}/.travis/script.sh -after_script: ${TRAVIS_BUILD_DIR}/.travis/after_script.sh -before_deploy: - - if [ "$TARGET_OS" != debian-sid ]; then make package; fi diff --git a/.travis/after_script.sh b/.travis/after_script.sh deleted file mode 100755 index 6d098b636..000000000 --- a/.travis/after_script.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [ "$TYPE" != 'style' ]; then - ccache -s -fi diff --git a/.travis/ccache.sha256 b/.travis/ccache.sha256 deleted file mode 100644 index e63145466..000000000 --- a/.travis/ccache.sha256 +++ /dev/null @@ -1 +0,0 @@ -0de866bc0ee26de392e037104b174474989a830e2249280a136144baa44557aa ccache_3.2.4-1_amd64.deb diff --git a/.travis/debian_pkgs.sha256 b/.travis/debian_pkgs.sha256 deleted file mode 100644 index ed4e11737..000000000 --- a/.travis/debian_pkgs.sha256 +++ /dev/null @@ -1,3 +0,0 @@ -314ef4af137903dfb13e8c3ef1e6ea56cfdb23808d52ec4f5f50e288c73610c5 pbuilder_0.229.1_all.deb -fa82aa8ed3055c6f6330104deedf080b26778295e589426d4c4dd0f2c2a5defa debootstrap_1.0.95_all.deb -2ef4c09f7841b72f93412803ddd142f72658536dbfabe00e449eb548f432f3f8 debian-archive-keyring_2017.7ubuntu1_all.deb diff --git a/.travis/install.sh b/.travis/install.sh deleted file mode 100755 index a807d032c..000000000 --- a/.travis/install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [ "$TYPE" = 'style' ]; then - sudo apt-get -yqq update - sudo apt-get install shellcheck -else - "$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.before_install.sh" - "$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.install.sh" -fi diff --git a/.travis/linux..before_install.sh b/.travis/linux..before_install.sh deleted file mode 100755 index 9bf8aac01..000000000 --- a/.travis/linux..before_install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -e - -sudo add-apt-repository ppa:beineri/opt-qt592-xenial -y - -sudo dpkg --add-architecture i386 -sudo apt-get update -qq || true diff --git a/.travis/linux..install.sh b/.travis/linux..install.sh deleted file mode 100755 index d56645603..000000000 --- a/.travis/linux..install.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -e - -PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libmp3lame-dev - libasound2-dev libjack-jackd2-dev libsdl-dev libsamplerate0-dev libstk0-dev stk - libfluidsynth-dev portaudio19-dev g++-multilib libfltk1.3-dev fluid - libgig-dev libsoundio-dev qt59base qt59translations qt59tools" - -# swh build dependencies -SWH_PACKAGES="perl libxml2-utils libxml-perl liblist-moreutils-perl" - -# VST dependencies -VST_PACKAGES="wine-dev qt59x11extras qtbase5-private-dev libxcb-util0-dev libxcb-keysyms1-dev" - -# LV2 dependencies; libsuil-dev is not required -LV2_PACKAGES="lv2-dev liblilv-dev" - -# Help with unmet dependencies -PACKAGES="$PACKAGES $SWH_PACKAGES $VST_PACKAGES $LV2_PACKAGES libjack-jackd2-0" - -# shellcheck disable=SC2086 -sudo apt-get install -y $PACKAGES diff --git a/.travis/linux..script.sh b/.travis/linux..script.sh deleted file mode 100755 index e75b827ac..000000000 --- a/.travis/linux..script.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -unset QTDIR QT_PLUGIN_PATH LD_LIBRARY_PATH -# shellcheck disable=SC1091 -source /opt/qt59/bin/qt59-env.sh - -set -e - -mkdir build -cd build - -# shellcheck disable=SC2086 -cmake -DUSE_WERROR=ON -DCMAKE_INSTALL_PREFIX=../target $CMAKE_FLAGS .. -make -j4 -make tests -./tests/tests diff --git a/.travis/linux.debian-sid.before_install.sh b/.travis/linux.debian-sid.before_install.sh deleted file mode 100755 index 89ee51523..000000000 --- a/.travis/linux.debian-sid.before_install.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -sudo apt-get update -qq diff --git a/.travis/linux.debian-sid.install.sh b/.travis/linux.debian-sid.install.sh deleted file mode 100755 index ef8368822..000000000 --- a/.travis/linux.debian-sid.install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -set -e - -sudo apt-get install -y \ - dpkg \ - pbuilder - -# work around a pbuilder bug which breaks ccache -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666525 -# and also missing signing keys in Trusty's debian-archive-keyring -cd /tmp -wget http://archive.ubuntu.com/ubuntu/pool/main/p/pbuilder/pbuilder_0.229.1_all.deb -wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.95_all.deb -wget http://archive.ubuntu.com/ubuntu/pool/universe/d/debian-archive-keyring/debian-archive-keyring_2017.7ubuntu1_all.deb -sha256sum -c "$TRAVIS_BUILD_DIR/.travis/debian_pkgs.sha256" -sudo dpkg -i pbuilder_0.229.1_all.deb debootstrap_1.0.95_all.deb debian-archive-keyring_2017.7ubuntu1_all.deb -cd "$OLDPWD" diff --git a/.travis/linux.debian-sid.script.sh b/.travis/linux.debian-sid.script.sh deleted file mode 100755 index 9b8db416c..000000000 --- a/.travis/linux.debian-sid.script.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -set -e - -: "${TARGET_ARCH:=amd64}" - -BASETGZ="$HOME/pbuilder-bases/debian-sid-$TARGET_ARCH.tgz" -MIRROR=http://cdn-fastly.deb.debian.org/debian -KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg - -if [ -z "$TRAVIS_TAG" ] -then - sudo \ - sh -c "echo CCACHEDIR=$HOME/.ccache >> /etc/pbuilderrc" -fi - -if [ "$CC" = clang ] -then - sudo sh -c "echo EXTRAPACKAGES=clang >> /etc/pbuilderrc" -fi - -if [ ! -e "$BASETGZ.stamp" ] -then - mkdir -p "$HOME/pbuilder-bases" - sudo pbuilder --create --basetgz "$BASETGZ" --mirror $MIRROR \ - --distribution sid --architecture $TARGET_ARCH \ - --debootstrapopts --variant=buildd \ - --debootstrapopts --keyring=$KEYRING \ - --debootstrapopts --include=perl - touch "$BASETGZ.stamp" -else - sudo pbuilder --update --basetgz "$BASETGZ" -fi - -sync_version() { - local VERSION - local MMR - local STAGE - local EXTRA - - VERSION=$(git describe --tags --match v[0-9].[0-9].[0-9]*) - VERSION=${VERSION#v} - MMR=${VERSION%%-*} - case $VERSION in - *-*-*-*) - VERSION=${VERSION%-*} - STAGE=${VERSION#*-} - STAGE=${STAGE%-*} - EXTRA=${VERSION##*-} - VERSION=$MMR~$STAGE.$EXTRA - ;; - *-*-*) - VERSION=${VERSION%-*} - EXTRA=${VERSION##*-} - VERSION=$MMR.$EXTRA - ;; - *-*) - STAGE=${VERSION#*-} - VERSION=$MMR~$STAGE - ;; - esac - - sed "1 s/@VERSION@/$VERSION/" -i debian/changelog - echo "Set Debian version to $VERSION" -} - -sync_version - -DIR="$PWD" -cd .. -dpkg-source -b "$DIR" -env -i CC="$CC" CXX="$CXX" sudo pbuilder --build --debbuildopts "--jobs=auto" \ - --basetgz "$BASETGZ" ./*.dsc diff --git a/.travis/linux.win.download.sh b/.travis/linux.win.download.sh deleted file mode 100755 index 2f914f94e..000000000 --- a/.travis/linux.win.download.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -set -e - -CACHE_DIR=$HOME/apt_mingw_cache/$1 -mkdir -p "$CACHE_DIR" - -pushd "$CACHE_DIR" - -# shellcheck disable=SC2086 -apt-get --print-uris --yes install $MINGW_PACKAGES | grep ^\' | cut -d\' -f2 > downloads.list -wget -N --input-file downloads.list - -sudo cp ./*.deb /var/cache/apt/archives/ - -popd diff --git a/.travis/linux.win32.before_install.sh b/.travis/linux.win32.before_install.sh deleted file mode 100755 index e0cfcbafb..000000000 --- a/.travis/linux.win32.before_install.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -set -e - -sudo add-apt-repository ppa:tobydox/mingw-x-trusty -y -sudo apt-get update -qq diff --git a/.travis/linux.win32.install.sh b/.travis/linux.win32.install.sh deleted file mode 100755 index 6e73e7abe..000000000 --- a/.travis/linux.win32.install.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -set -e - -MINGW_PACKAGES="mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x-stk - mingw32-x-glib2 mingw32-x-portaudio mingw32-x-libsndfile mingw32-x-fftw - mingw32-x-flac mingw32-x-fltk mingw32-x-libsamplerate - mingw32-x-pkgconfig mingw32-x-binutils mingw32-x-gcc mingw32-x-runtime - mingw32-x-libgig mingw32-x-libsoundio mingw32-x-lame mingw32-x-qt5base" - -# swh build dependencies -SWH_PACKAGES="perl libxml2-utils libxml-perl liblist-moreutils-perl" - -export MINGW_PACKAGES - -"$TRAVIS_BUILD_DIR/.travis/linux.win.download.sh" win32 - -PACKAGES="nsis cloog-isl libmpc3 qt4-linguist-tools mingw32 $MINGW_PACKAGES $SWH_PACKAGES" - -# shellcheck disable=SC2086 -sudo apt-get install -y $PACKAGES - -# ccache 3.2 is needed because mingw32-x-gcc is version 4.9, which causes cmake -# to use @file command line passing, which in turn ccache 3.1.9 doesn't support -pushd /tmp -wget http://archive.ubuntu.com/ubuntu/pool/main/c/ccache/ccache_3.2.4-1_amd64.deb -sha256sum -c "$TRAVIS_BUILD_DIR/.travis/ccache.sha256" -sudo dpkg -i ccache_3.2.4-1_amd64.deb -popd diff --git a/.travis/linux.win32.script.sh b/.travis/linux.win32.script.sh deleted file mode 100755 index 6e930fd9b..000000000 --- a/.travis/linux.win32.script.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -e - -mkdir build -cd build - -export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON" -../cmake/build_win32.sh - -make -j4 -make tests diff --git a/.travis/linux.win64.before_install.sh b/.travis/linux.win64.before_install.sh deleted file mode 100755 index 083039391..000000000 --- a/.travis/linux.win64.before_install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -e - -"$TRAVIS_BUILD_DIR/.travis/linux.win32.before_install.sh" diff --git a/.travis/linux.win64.install.sh b/.travis/linux.win64.install.sh deleted file mode 100755 index 99ef7187f..000000000 --- a/.travis/linux.win64.install.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# First, install 32-bit deps -"$TRAVIS_BUILD_DIR/.travis/linux.win32.install.sh" - -MINGW_PACKAGES="mingw64-x-sdl mingw64-x-libvorbis mingw64-x-fluidsynth mingw64-x-stk - mingw64-x-glib2 mingw64-x-portaudio mingw64-x-libsndfile - mingw64-x-fftw mingw64-x-flac mingw64-x-fltk mingw64-x-libsamplerate - mingw64-x-pkgconfig mingw64-x-binutils mingw64-x-gcc mingw64-x-runtime - mingw64-x-libgig mingw64-x-libsoundio mingw64-x-lame mingw64-x-qt5base" - -export MINGW_PACKAGES - -"$TRAVIS_BUILD_DIR/.travis/linux.win.download.sh" win64 - -# shellcheck disable=SC2086 -sudo apt-get install -y $MINGW_PACKAGES diff --git a/.travis/linux.win64.script.sh b/.travis/linux.win64.script.sh deleted file mode 100755 index d81fa9b58..000000000 --- a/.travis/linux.win64.script.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -e - -mkdir build -cd build - -export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON" -../cmake/build_win64.sh - -make -j4 -make tests diff --git a/.travis/osx..before_install.sh b/.travis/osx..before_install.sh deleted file mode 100755 index 61f25af66..000000000 --- a/.travis/osx..before_install.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -e - -brew update -# Python 2 may cause conflicts on dependency installation -brew unlink python@2 || true diff --git a/.travis/osx..install.sh b/.travis/osx..install.sh deleted file mode 100755 index 42bf66aca..000000000 --- a/.travis/osx..install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -set -e - -PACKAGES="cmake pkg-config libogg libvorbis lame libsndfile libsamplerate lilv lv2 jack sdl libgig libsoundio stk fluid-synth portaudio node fltk qt carla" - -if "${TRAVIS}"; then - PACKAGES="$PACKAGES ccache" -fi - -# removing already installed packages from the list -for p in $(brew list); do - PACKAGES=${PACKAGES//$p/} -done; - -# shellcheck disable=SC2086 -brew install $PACKAGES - -# fftw tries to install gcc which conflicts with travis -brew install fftw --ignore-dependencies - -npm install -g appdmg diff --git a/.travis/osx..script.sh b/.travis/osx..script.sh deleted file mode 100755 index 373e273f4..000000000 --- a/.travis/osx..script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -set -e - -mkdir build -cd build - -# Workaround; No FindQt5.cmake module exists -CMAKE_PREFIX_PATH="$(brew --prefix qt5)" -export CMAKE_PREFIX_PATH - -# shellcheck disable=SC2086 -cmake -DUSE_WERROR=OFF -DCMAKE_INSTALL_PREFIX=../target $CMAKE_FLAGS .. - -make -j4 -make tests -./tests/tests diff --git a/.travis/script.sh b/.travis/script.sh deleted file mode 100755 index 21d27b080..000000000 --- a/.travis/script.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [ "$TYPE" = 'style' ]; then - - # SC2185 is disabled because of: https://github.com/koalaman/shellcheck/issues/942 - # once it's fixed, it should be enabled again - # shellcheck disable=SC2185 - # shellcheck disable=SC2046 - shellcheck $(find -O3 . -maxdepth 3 -type f -name '*.sh' -o -name "*.sh.in") - shellcheck doc/bash-completion/lmms - -else - - export CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUNDLE_QT_TRANSLATIONS=ON" - - if [ -z "$TRAVIS_TAG" ]; then - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_CCACHE=ON" - fi - - "$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.script.sh" - - # Package and upload non-tagged builds - if [ -n "$TRAVIS_TAG" ]; then - # Skip, handled by travis deploy instead - exit 0 - elif [[ $TARGET_OS == win* ]]; then - cd build - make -j4 package - PACKAGE="$(ls lmms-*win*.exe)" - elif [[ $TRAVIS_OS_NAME == osx ]]; then - cd build - make -j4 install > /dev/null - make dmg - PACKAGE="$(ls lmms-*.dmg)" - elif [[ $TARGET_OS != debian-sid ]]; then - cd build - make -j4 install > /dev/null - make appimage - PACKAGE="$(ls lmms-*.AppImage)" - fi - - echo "Uploading $PACKAGE to transfer.sh..." - # Limit the connection time to 3 minutes and total upload time to 5 minutes - # Otherwise the build may hang - curl --connect-timeout 180 --max-time 300 --upload-file "$PACKAGE" "https://transfer.sh/$PACKAGE" || true -fi diff --git a/CMakeLists.txt b/CMakeLists.txt index a3fcf4050..4a230a937 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,6 +208,8 @@ IF(WANT_LV2) PKG_CHECK_MODULES(LILV lilv-0) ENDIF() IF(NOT LV2_FOUND AND NOT LILV_FOUND) + UNSET(LV2_FOUND CACHE) + UNSET(LILV_FOUND CACHE) FIND_PACKAGE(LV2 CONFIG) FIND_PACKAGE(LILV CONFIG) IF(LILV_FOUND) diff --git a/doc/bash-completion/lmms b/doc/bash-completion/lmms index 210f184ee..d6a3b7295 100644 --- a/doc/bash-completion/lmms +++ b/doc/bash-completion/lmms @@ -1,6 +1,5 @@ #!/usr/bin/env bash # lmms(1) completion -*- shell-script -*- -# use shellcheck: "shellcheck -e bash " _lmms_array_contains () {