mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
Good Bye TravisCI! (#772)
This commit is contained in:
parent
0d76403f9f
commit
dfc7378754
4 changed files with 190 additions and 115 deletions
|
@ -8,19 +8,20 @@ jobs:
|
|||
pool:
|
||||
vmImage: 'macOS-10.14'
|
||||
# recommended by https://github.com/Homebrew/brew/issues/2491#issuecomment-294207661
|
||||
# brew update || brew update
|
||||
# brew upgrade $PACKAGES
|
||||
steps:
|
||||
- script: |
|
||||
brew update || brew update
|
||||
brew upgrade
|
||||
brew install glib gobject-introspection libsndfile pkg-config jack dbus-glib pulseaudio portaudio sdl2
|
||||
PACKAGES="glib gobject-introspection libsndfile pkg-config jack dbus-glib pulseaudio portaudio sdl2"
|
||||
brew install $PACKAGES
|
||||
displayName: 'Prerequisites'
|
||||
- script: |
|
||||
mkdir build && cd build
|
||||
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
|
||||
cmake -Werror=dev -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
|
||||
make
|
||||
make -j`nproc`
|
||||
displayName: 'Compile fluidsynth'
|
||||
- script: |
|
||||
cd build || exit -1
|
||||
make check || exit -1
|
||||
make -j`nproc` check || exit -1
|
||||
displayName: 'Execute Unittests'
|
||||
|
|
94
.github/workflows/linux.yml
vendored
Normal file
94
.github/workflows/linux.yml
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
name: FluidSynth Linux
|
||||
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
CC: [""]
|
||||
CXX: [""]
|
||||
CMAKE_FLAGS: ["-Denable-profiling=1","-Denable-floats=1 -Denable-profiling=1","-Denable-floats=1","-Denable-trap-on-fpe=1","-Denable-fpe-check=1","-Denable-ipv6=0","-Denable-network=0","-Denable-aufile=0","-DBUILD_SHARED_LIBS=0","-Denable-ubsan=1"]
|
||||
include:
|
||||
- CC: "gcc-7"
|
||||
CXX: "g++-7"
|
||||
CMAKE_FLAGS: ""
|
||||
- CC: "gcc-8"
|
||||
CXX: "g++-8"
|
||||
CMAKE_FLAGS: "-Denable-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
||||
- CC: "clang-7"
|
||||
CXX: "clang++-7"
|
||||
CMAKE_FLAGS: ""
|
||||
- CC: "clang-8"
|
||||
CXX: "clang++-8"
|
||||
CMAKE_FLAGS: ""
|
||||
- CC: "clang-9"
|
||||
CXX: "clang++-9"
|
||||
CMAKE_FLAGS: ""
|
||||
- CC: "clang-10"
|
||||
CXX: "clang++-10"
|
||||
CMAKE_FLAGS: ""
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Add apt-get repositories
|
||||
run: |
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
|
||||
- name: Update apt
|
||||
run: sudo apt-get update -y
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake-data cmake libglib2.0-0 libsndfile-dev libasound2-dev libjack-dev portaudio19-dev libsdl2-dev libpulse-dev libdbus-1-dev libsystemd-dev libinstpatch-dev libreadline-dev g++-7 g++-8 clang-7 clang-8 clang-9 clang-10 clang-tidy-10
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: |
|
||||
echo Can execute `nproc` make jobs in parallel
|
||||
cmake --version
|
||||
cmake -E make_directory ${{github.workspace}}/build
|
||||
sudo ln -s /usr/bin/clang-tidy-10 /usr/bin/clang-tidy
|
||||
which clang-tidy || true
|
||||
ls -la `which clang-tidy` || true
|
||||
echo $PATH
|
||||
echo $SONARSC
|
||||
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: |
|
||||
export CC=${{ matrix.CC }}
|
||||
export CXX=${{ matrix.CXX }}
|
||||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Werror=dev ${{ matrix.CMAKE_FLAGS }} -DCMAKE_INSTALL_PREFIX=$HOME/fluidsynth_install -Denable-portaudio=1 -Denable-ladspa=1 -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 $GITHUB_WORKSPACE
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: make -j`nproc`
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
# Execute tests defined by the CMake configuration.
|
||||
run: make -j`nproc` check
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: make install
|
90
.github/workflows/sonarcloud.yml
vendored
Normal file
90
.github/workflows/sonarcloud.yml
vendored
Normal file
|
@ -0,0 +1,90 @@
|
|||
on:
|
||||
# Trigger analysis when pushing in master or pull requests, and when creating
|
||||
# a pull request.
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
|
||||
name: SonarCloud Workflow
|
||||
jobs:
|
||||
sonarcloud:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Add apt-get repositories
|
||||
run: |
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
|
||||
- name: Update apt
|
||||
run: sudo apt-get update -y
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake-data cmake libglib2.0-0 libsndfile-dev libasound2-dev libjack-dev portaudio19-dev libsdl2-dev libpulse-dev libdbus-1-dev libsystemd-dev libinstpatch-dev libreadline-dev
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: |
|
||||
cmake -E make_directory ${{github.workspace}}/build
|
||||
echo $PATH
|
||||
|
||||
- name: Get Sonar Build Wrapper
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: |
|
||||
set -ex
|
||||
wget https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
|
||||
unzip build-wrapper-linux-x86.zip
|
||||
mv build-wrapper-linux-x86/* .
|
||||
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Werror=dev -Denable-portaudio=1 -Denable-ladspa=1 -DNO_GUI=1 $GITHUB_WORKSPACE
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: |
|
||||
./build-wrapper-linux-x86-64 --out-dir bw-output make -j`nproc`
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
# Execute tests defined by the CMake configuration.
|
||||
run: |
|
||||
./build-wrapper-linux-x86-64 --out-dir bw-output make -j`nproc` check
|
||||
|
||||
# sonar-scanner does not like utf8 filenames
|
||||
- name: Prepare for Sonar
|
||||
run: |
|
||||
rm -rf ${{ github.workspace }}/sf2
|
||||
|
||||
# The offical sonarsource/sonarcloud-github-action@v1.5 action does not work properly.
|
||||
# It keeps complaining that the build-wrapper.json cannot be found.
|
||||
# Hence, use a third party action to download and add sonar-scanner to PATH and then run it manually.
|
||||
- name: Setup sonarqube
|
||||
uses: warchant/setup-sonar-scanner@v3
|
||||
|
||||
- name: Run sonarqube
|
||||
env:
|
||||
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: sonar-scanner
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
|
||||
-Dsonar.cfamily.build-wrapper-output=${{ github.workspace }}/build/bw-output
|
||||
-Dsonar.verbose=false
|
||||
-Dsonar.host.url=https://sonarcloud.io/
|
110
.travis.yml
110
.travis.yml
|
@ -1,110 +0,0 @@
|
|||
language: c
|
||||
sudo: false
|
||||
os: linux
|
||||
dist: focal
|
||||
git:
|
||||
depth: false # disable shallow fetch, history is needed by SonarQube
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-focal-7
|
||||
- llvm-toolchain-focal-8
|
||||
- llvm-toolchain-focal-9
|
||||
- llvm-toolchain-focal-10
|
||||
packages:
|
||||
- cmake-data
|
||||
- cmake
|
||||
- libglib2.0-0
|
||||
- libsndfile-dev
|
||||
- libasound2-dev
|
||||
- libjack-dev
|
||||
- portaudio19-dev
|
||||
- libpulse-dev
|
||||
- libdbus-glib-1-dev
|
||||
- ladspa-sdk
|
||||
- libsdl2-dev
|
||||
env:
|
||||
- CMAKE_FLAGS="-Denable-profiling=1"
|
||||
- CMAKE_FLAGS="-Denable-floats=1 -Denable-profiling=1"
|
||||
- CMAKE_FLAGS="-Denable-floats=1"
|
||||
- CMAKE_FLAGS="-Denable-trap-on-fpe=1"
|
||||
- CMAKE_FLAGS="-Denable-fpe-check=1"
|
||||
- CMAKE_FLAGS="-Denable-ipv6=0"
|
||||
- CMAKE_FLAGS="-Denable-network=0"
|
||||
- CMAKE_FLAGS="-Denable-aufile=0"
|
||||
- CMAKE_FLAGS="-DBUILD_SHARED_LIBS=0"
|
||||
- CMAKE_FLAGS="-Denable-ubsan=1"
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- addons:
|
||||
sonarcloud:
|
||||
organization: "fluidsynth"
|
||||
env:
|
||||
- BW="build-wrapper-linux-x86-64 --out-dir bw-output"
|
||||
- SONARSC="sonar-scanner -Dsonar.cfamily.build-wrapper-output=build/bw-output"
|
||||
|
||||
- arch: arm64
|
||||
env:
|
||||
- CC="gcc-7"
|
||||
- CXX="g++-7"
|
||||
- MATRIX_EVAL="sudo apt-get install gcc-7 g++-7"
|
||||
|
||||
- dist: trusty
|
||||
env:
|
||||
- CMAKE_FLAGS=""
|
||||
|
||||
- env:
|
||||
- CC="gcc-8"
|
||||
- CXX="g++-8"
|
||||
- MATRIX_EVAL="sudo apt-get install gcc-8 g++-8"
|
||||
- CMAKE_FLAGS="-Denable-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
||||
|
||||
- env:
|
||||
- CC="clang-7"
|
||||
- CXX="clang++-7"
|
||||
- MATRIX_EVAL="sudo apt-get install clang-7"
|
||||
|
||||
- env:
|
||||
- CC="clang-8"
|
||||
- CXX="clang++-8"
|
||||
- MATRIX_EVAL="sudo rm -f /usr/local/clang-7.0.0/bin/clang-tidy && sudo ln -s /usr/bin/clang-tidy-8 /usr/bin/clang-tidy && sudo apt-get install clang-8 clang-tidy-8"
|
||||
- CMAKE_FLAGS="-Denable-profiling=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
||||
|
||||
- env:
|
||||
- CC="clang-9"
|
||||
- CXX="clang++-9"
|
||||
- MATRIX_EVAL="sudo apt-get install clang-9"
|
||||
|
||||
- env:
|
||||
- CC="clang-10"
|
||||
- CXX="clang++-10"
|
||||
- MATRIX_EVAL="sudo apt-get install clang-10"
|
||||
|
||||
- os: linux-ppc64le
|
||||
env:
|
||||
- CMAKE_FLAGS=""
|
||||
|
||||
before_install:
|
||||
- which clang-tidy || true
|
||||
- ls -la `which clang-tidy` || true
|
||||
- echo $PATH
|
||||
- echo $MATRIX_EVAL
|
||||
- eval "${MATRIX_EVAL}"
|
||||
- echo $SONARSC
|
||||
|
||||
before_script:
|
||||
- mkdir $HOME/fluidsynth_install/
|
||||
- mkdir build && cd build
|
||||
|
||||
script:
|
||||
- cmake -Werror=dev -DCMAKE_INSTALL_PREFIX=$HOME/fluidsynth_install ${CMAKE_FLAGS} -Denable-portaudio=1 -Denable-ladspa=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
|
||||
- echo Can handle `nproc` jobs in parallel
|
||||
- ${BW} make -j`nproc`
|
||||
- ls -la
|
||||
- make -j`nproc` check
|
||||
- make install
|
||||
- cd ..
|
||||
- ${SONARSC}
|
Loading…
Reference in a new issue