Skip to content

Fix Windows CI

Fix Windows CI #916

Workflow file for this run

name: Build and test (Linux)
on:
pull_request:
push:
schedule:
- cron: '0 3 * * 5' # Every Friday at 3am
env:
LV_BUILD_TYPE: Debug
LV_INSTALL_PREFIX: /home/runner/.local/
jobs:
linux:
name: Build and test (Linux)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- cc: gcc-11
cxx: g++-11
clang_major_version: null
clang_repo_suffix: null
- cc: gcc-12
cxx: g++-12
clang_major_version: null
clang_repo_suffix: null
- cc: clang-15
cxx: clang++-15
clang_major_version: 15
clang_repo_suffix: -15
- cc: clang-16
cxx: clang++-16
clang_major_version: 16
clang_repo_suffix: -16
- cc: clang-17
cxx: clang++-17
clang_major_version: 17
clang_repo_suffix: -17
- cc: clang-18
cxx: clang++-18
clang_major_version: 18
clang_repo_suffix:
steps:
- name: Add Clang/LLVM repositories
if: "${{ contains(matrix.cxx, 'clang') }}"
run: |-
set -x
source /etc/os-release
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}${{ matrix.clang_repo_suffix }} main"
- name: Install build dependencies
run: |-
sudo apt-get update
# Note: This additional step's sole purpuse is to workaround symptom:
# > The following packages have unmet dependencies:
# > libunwind-14-dev : Breaks: libunwind-dev but 1.3.2-2build2
# > is to be installed
sudo apt-get install --yes --no-install-recommends libunwind-dev
sudo apt-get install --yes --no-install-recommends \
bison \
doxygen \
flex \
gettext \
graphviz \
libgstreamer1.0-dev \
libgtk2.0-dev \
libjack-dev \
libluajit-5.1-dev \
liborc-0.4-dev \
libpng-dev \
libasound2-dev \
libsdl1.2-dev \
libgl1-mesa-dev \
pkg-config \
portaudio19-dev
- name: Install build dependency Clang ${{ matrix.clang_major_version }}
if: "${{ contains(matrix.cxx, 'clang') }}"
run: |-
sudo apt-get install --yes --no-install-recommends -V \
clang-${{ matrix.clang_major_version }}
- name: Checkout Git branch
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: '[LV] Run CMake'
run: |-
mkdir build_lv
cd build_lv
cmake \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${LV_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX:PATH=${LV_INSTALL_PREFIX} \
\
-DENABLE_DOCS=yes \
-DENABLE_FATAL_WARNINGS=yes \
-DENABLE_TESTS=yes \
../libvisual/ \
- name: '[LV] Run "make"'
run: |-
make -C build_lv -j2 VERBOSE=1
- name: '[LV] Run "make install"'
run: |-
make -C build_lv install
find ${LV_INSTALL_PREFIX} | sort
- name: '[Plugins] Run CMake'
run: |-
mkdir build_plugins
cd build_plugins
PKG_CONFIG_PATH=${LV_INSTALL_PREFIX}/lib/pkgconfig/ \
cmake \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${LV_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX:PATH=${LV_INSTALL_PREFIX} \
\
-DENABLE_FATAL_WARNINGS=yes \
../libvisual-plugins/
- name: '[Plugins] Run "make"'
run: |-
set -x -o pipefail
make -C build_plugins -j2 VERBOSE=1
# Detect and deny underlinking
! find -name \*.so | sort | xargs ldd -r | grep -F 'undefined symbol'
- name: '[Plugins] Run "make install"'
run: |-
make -C build_plugins install DESTDIR="${PWD}"/ROOT_PLUGINS
find ROOT_PLUGINS/ | sort
- name: '[LV] Run tests (exit code ignored for now!)'
# TODO Fix tests and remove " || true" here
run: |-
make -C build_lv \
CMAKE_CONFIG_TYPE=${LV_BUILD_TYPE} \
CTEST_OUTPUT_ON_FAILURE=1 \
VERBOSE=1 \
test || true