Skip to content

Commit dffe74f

Browse files
committed
Build libprojectM-4 in workflow, add more compilers on Ubuntu 24
1 parent 5e3dada commit dffe74f

File tree

2 files changed

+58
-12
lines changed

2 files changed

+58
-12
lines changed

.github/workflows/linux.yml

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
include:
2020
- cc: gcc-12
2121
cxx: g++-12
22-
clang_major_version: null
23-
clang_repo_suffix: null
22+
clang_major_version: ''
23+
clang_repo_suffix: ''
2424
runs-on: ubuntu-22.04
2525
- cc: clang-17
2626
cxx: clang++-17
@@ -30,23 +30,41 @@ jobs:
3030
- cc: clang-18
3131
cxx: clang++-18
3232
clang_major_version: 18
33-
clang_repo_suffix:
33+
clang_repo_suffix: -18
3434
runs-on: ubuntu-22.04
35+
- cc: gcc-14
36+
cxx: g++-14
37+
clang_major_version: ''
38+
clang_repo_suffix: ''
39+
runs-on: ubuntu-24.04
40+
- cc: clang-20
41+
cxx: clang++-20
42+
clang_major_version: 20
43+
clang_repo_suffix: -20
44+
runs-on: ubuntu-24.04
45+
- cc: clang-21
46+
cxx: clang++-21
47+
clang_major_version: 21
48+
clang_repo_suffix: -21
49+
runs-on: ubuntu-24.04
3550
steps:
3651
- name: Add Clang/LLVM repositories
3752
if: "${{ contains(matrix.cxx, 'clang') }}"
3853
run: |-
3954
set -x
4055
source /etc/os-release
4156
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
42-
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}${{ matrix.clang_repo_suffix }} main"
57+
sudo add-apt-repository "deb https://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}${{ matrix.clang_repo_suffix }} main"
4358
4459
- name: Install build dependencies
4560
run: |-
4661
sudo apt-get update
4762
sudo apt-get install --yes --no-install-recommends \
4863
cmake \
49-
libprojectm-dev \
64+
ninja-build \
65+
build-essential \
66+
libgl1-mesa-dev \
67+
mesa-common-dev \
5068
libvisual-0.4-dev \
5169
pkg-config
5270
@@ -56,27 +74,52 @@ jobs:
5674
sudo apt-get install --yes --no-install-recommends -V \
5775
clang-${{ matrix.clang_major_version }}
5876
77+
- name: Checkout libprojectM Sources
78+
uses: actions/checkout@v4
79+
with:
80+
repository: projectM-visualizer/projectm
81+
path: libprojectM
82+
submodules: recursive
83+
84+
- name: Build/Install libprojectM
85+
run: |
86+
mkdir cmake-build-libprojectM
87+
cmake -G Ninja -S libprojectM -B "${{ github.workspace }}/cmake-build-libprojectM" \
88+
-DCMAKE_C_COMPILER="${{ matrix.cc }}" \
89+
-DCMAKE_CXX_COMPILER="${{ matrix.cxx }}" \
90+
-DBUILD_SHARED_LIBS=ON \
91+
-DCMAKE_BUILD_TYPE=Release \
92+
-DCMAKE_VERBOSE_MAKEFILE=ON \
93+
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install-libprojectM"
94+
cmake --build "${{ github.workspace }}/cmake-build-libprojectM" --parallel
95+
cmake --install "${{ github.workspace }}/cmake-build-libprojectM"
96+
5997
- name: Checkout Git branch
6098
uses: actions/checkout@v4
99+
with:
100+
path: libvisual-projectm
61101

62102
- name: 'Configure with CMake'
63103
run: |-
64104
cmake_args=(
65105
-DCMAKE_C_COMPILER="${{ matrix.cc }}"
66106
-DCMAKE_CXX_COMPILER="${{ matrix.cxx }}"
67-
-S ./
68-
-B build/
107+
-DCMAKE_BUILD_TYPE=Release
108+
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/install-libprojectM"
109+
-DCMAKE_VERBOSE_MAKEFILE=ON
110+
-S "${{ github.workspace }}/libvisual-projectm"
111+
-B "${{ github.workspace }}/cmake-build-libvisual-projectm"
69112
)
70113
set -x
71114
cmake "${cmake_args[@]}"
72115
73116
- name: 'Build'
74117
run: |-
75118
set -x
76-
make -C build -j$(nproc) VERBOSE=1
119+
cmake --build "${{ github.workspace }}/cmake-build-libvisual-projectm" --parallel
77120
78121
- name: 'Install'
79122
run: |-
80123
set -x -o pipefail
81-
make -C build install DESTDIR="${PWD}"/ROOT/
82-
find ROOT/ | sort | xargs ls -ld
124+
cmake --install "${{ github.workspace }}/cmake-build-libvisual-projectm" --prefix "${{ github.workspace }}/ROOT/"
125+
find "${{ github.workspace }}/ROOT/" | sort | xargs ls -ld

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ include(FindPkgConfig)
1212

1313
pkg_check_modules(LIBVISUAL libvisual-0.4 REQUIRED IMPORTED_TARGET)
1414
pkg_get_variable(LIBVISUAL_PLUGINS_BASE_DIR libvisual-0.4 pluginsbasedir)
15-
set(LIBVISUAL_ACTOR_PLUGINS_DIR "${LIBVISUAL_PLUGINS_BASE_DIR}/actor")
15+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
16+
set(CMAKE_INSTALL_PREFIX "${LIBVISUAL_PLUGINS_BASE_DIR}")
17+
endif()
1618

1719
find_package(projectM4 REQUIRED COMPONENTS Playlist)
1820

@@ -39,7 +41,8 @@ set_target_properties(actor_projectM PROPERTIES
3941
)
4042

4143
install(TARGETS actor_projectM
42-
LIBRARY DESTINATION "${LIBVISUAL_ACTOR_PLUGINS_DIR}"
44+
LIBRARY DESTINATION "actor/"
45+
RUNTIME DESTINATION "actor/"
4346
)
4447

4548
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)

0 commit comments

Comments
 (0)