- continuous integration workflow revamp

* use latest virtual machines
* use less if's in scripts
* remove installation of fluidsynth
* simplify formatting, and remove lots of useless quotes
This commit is contained in:
alexey.lysiuk 2023-02-22 12:02:21 +02:00
parent 7695852856
commit 22ab5b210c

View file

@ -10,80 +10,64 @@ jobs:
fail-fast: false
matrix:
config:
- {
name: "Visual Studio - Release",
os: windows-2019,
build_type: "Release"
}
- {
name: "Visual Studio - Debug",
os: windows-2019,
build_type: "Debug"
}
- {
name: "macOS Clang - Dynamic Deps",
os: macos-10.15,
build_type: "Release"
}
- {
name: "macOS Clang - Static Deps",
os: macos-10.15,
build_type: "Release",
extra_options: "-DDYN_FLUIDSYNTH=OFF -DDYN_MPG123=OFF -DDYN_SNDFILE=OFF"
}
- {
name: "Linux GCC - Dynamic Deps",
os: ubuntu-20.04,
build_type: "Release"
}
- {
name: "Linux GCC - Static Deps",
os: ubuntu-20.04,
build_type: "Release",
extra_options: "-DDYN_FLUIDSYNTH=OFF -DDYN_MPG123=OFF -DDYN_SNDFILE=OFF"
}
- {
name: "Linux Clang - Dynamic Deps",
os: ubuntu-20.04,
build_type: "Release",
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
}
- {
name: "Linux Clang - Static Deps",
os: ubuntu-20.04,
build_type: "Release",
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DDYN_FLUIDSYNTH=OFF -DDYN_MPG123=OFF -DDYN_SNDFILE=OFF"
}
- name: Visual Studio - Release
os: windows-latest
build_type: Release
- name: Visual Studio - Debug
os: windows-latest
build_type: Debug
- name: macOS Clang - Dynamic Deps
os: macos-latest
build_type: Release
deps_cmd: brew install glib pkg-config
- name: macOS Clang - Static Deps
os: macos-latest
build_type: Release
cmake_options: -DDYN_FLUIDSYNTH=OFF -DDYN_MPG123=OFF -DDYN_SNDFILE=OFF
deps_cmd: brew install glib libsndfile mpg123 pkg-config
- name: Linux GCC - Dynamic Deps
os: ubuntu-latest
build_type: Release
- name: Linux GCC - Static Deps
os: ubuntu-latest
build_type: Release
cmake_options: -DDYN_FLUIDSYNTH=OFF -DDYN_MPG123=OFF -DDYN_SNDFILE=OFF
deps_cmd: sudo apt update && sudo apt install libasound2-dev libglib2.0-dev libmpg123-dev libsndfile1-dev
- name: Linux Clang - Dynamic Deps
os: ubuntu-latest
build_type: Release
cmake_options: -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
- name: Linux Clang - Static Deps
os: ubuntu-latest
build_type: Release
cmake_options: -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DDYN_FLUIDSYNTH=OFF -DDYN_MPG123=OFF -DDYN_SNDFILE=OFF
deps_cmd: sudo apt update && sudo apt install libasound2-dev libglib2.0-dev libmpg123-dev libsndfile1-dev
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Install Dependencies
shell: bash
run: |
if [[ "${{ runner.os }}" == 'Linux' ]]; then
sudo apt update
sudo apt install libasound2-dev libfluidsynth-dev libmpg123-dev libsndfile1-dev
elif [[ "${{ runner.os }}" == 'macOS' ]]; then
brew install fluidsynth mpg123 libsndfile
fi
${{ matrix.config.deps_cmd }}
- name: Configure
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_INSTALL_PREFIX=../build_install ${{ matrix.config.extra_options }} ..
cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_INSTALL_PREFIX=./build_install ${{ matrix.config.cmake_options }} .
- name: Build
shell: bash
run: |
cd build
if [[ "${{ runner.os }}" == 'Windows' ]]; then
cmake --build . --target install --config ${{ matrix.config.build_type }} -- -maxcpucount -verbosity:minimal
else
cmake --build . --target install -- --jobs=2 --keep-going
fi
export MAKEFLAGS=--keep-going
cmake --build build --target install --config ${{ matrix.config.build_type }} --parallel 3
- name: Test
shell: bash
@ -92,7 +76,7 @@ jobs:
mkdir build
cd build
declare -x PREFIX=`pwd`/../../../build_install
cmake -DCMAKE_PREFIX_PATH=${PREFIX} ${{ matrix.config.extra_options }} ..
cmake -DCMAKE_PREFIX_PATH=${PREFIX} ${{ matrix.config.cmake_options }} ..
cmake --build . --config ${{ matrix.config.build_type }}
if [[ "${{ runner.os }}" == 'macOS' ]]; then
declare -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PREFIX}