File: linux.yml

package info (click to toggle)
fluidsynth 2.5.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,292 kB
  • sloc: ansic: 45,503; cpp: 4,974; xml: 877; sh: 200; makefile: 74
file content (198 lines) | stat: -rw-r--r-- 6,090 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
name: FluidSynth Linux

on:
  pull_request:
  push:
    paths-ignore:
      - '.azure/**'
      - '.circleci/**'
      - '.github/workflows/sonarcloud.yml'
      - '.github/workflows/solaris.yml'
      - '.github/workflows/windows.yml'
      - '.github/workflows/ios.yml'
      - '.cirrus.yml'
      - 'README.md'

env:
  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  BUILD_TYPE: RelWithDebInfo
  INSTALL_LOCATION: ${{github.workspace}}/fluidsynth_install

# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
defaults:
  run:
    shell: bash

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-22.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-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold", "-Dosal=cpp11 -Denable-libinstpatch=0 -Denable-ladspa=0"]
        include:
          - CC: "clang-15"
            CXX: "clang++-15"
            CMAKE_FLAGS: ""
          - CC: "clang-15"
            CXX: "clang++-15"
            CMAKE_FLAGS: "-DBUILD_SHARED_LIBS=0"
# clang9 is covered by openSUSE Leap 15.2
# clang11 is covered by openSUSE Leap 15.3

    steps:
    - uses: actions/checkout@v6
      with:
        submodules: recursive

    - name: Add apt-get repositories
      run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test

    - name: Update apt
      run: sudo apt-get update -y

    - name: Install Dependencies
      run: |
        sudo apt-get -yq --no-install-suggests --no-install-recommends install \
          clang-15 \
          clang-tidy \
          cmake \
          cmake-data \
          ladspa-sdk \
          libasound2-dev \
          libdbus-1-dev \
          libglib2.0-dev \
          libinstpatch-dev \
          libjack-dev \
          libpulse-dev \
          libreadline-dev \
          libsdl2-dev \
          libsndfile-dev \
          libsystemd-dev \
          ninja-build \
          libomp-dev \
          portaudio19-dev

    - name: Configure CMake
      run: |
        export CC=${{ matrix.CC }}
        export CXX=${{ matrix.CXX }}
        cmake -S . \
          -B build \
          -G Ninja \
          -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
          -DCMAKE_VERBOSE_MAKEFILE=1 \
          -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
          -Werror=dev \
          -DCMAKE_INSTALL_PREFIX=$INSTALL_LOCATION \
          -Denable-portaudio=1 \
          -Denable-ladspa=1 \
          -DNO_GUI=1 \
          ${{ matrix.CMAKE_FLAGS }}

    - name: Build
      run: cmake --build build

    - name: Test
      run: cmake --build build --target check

    - name: Demo
      run: cmake --build build --target demo

    - name: Install
      run: cmake --install build && ls -la $INSTALL_LOCATION

    - name: Consume from pkg-config
      if: ${{ contains(matrix.CMAKE_FLAGS, 'BUILD_SHARED_LIBS=0') }}
      run: |
        set -e
        cat << EOF > static-link-test.c
        #include <fluidsynth.h>
        int main() { fluid_synth_process(0,0,0,0,0,0); return 0; }
        EOF
        export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
        set -x
        g++ -fPIE -o static-link-test static-link-test.c $(pkg-config --cflags --static fluidsynth) $(pkg-config --libs --static fluidsynth)
        ./static-link-test
        echo $?

    - name: Consume from build
      run: |
        set -e
        export CC=${{ matrix.CC }}
        export CXX=${{ matrix.CXX }}
        cmake -S test/cmake \
          -B consume-build \
          -G Ninja \
          -DFluidSynth_DIR="${{github.workspace}}/build" \
          -DCMAKE_BUILD_TYPE=$BUILD_TYPE
        cmake --build consume-build

    - name: Consume from install
      run: |
        set -e
        export CC=${{ matrix.CC }}
        export CXX=${{ matrix.CXX }}
        cmake -S test/cmake -B consume-install \
          -G Ninja \
          -DFluidSynth_DIR="$INSTALL_LOCATION/lib/cmake/fluidsynth" \
          -DCMAKE_BUILD_TYPE=$BUILD_TYPE
        cmake --build consume-install

  # Tests to see if FluidSynth will build with GCC for PowerPC targets that use the IBM long double ABI
  build-ibm-long-double:
    runs-on: ubuntu-latest
    container:
      image: debian:trixie
      options: -u root
      volumes:
        - /etc/ssl/certs:/etc/ssl/certs

    steps:
    - name: Update apt
      run: |
        dpkg --add-architecture ppc64el
        apt-get update -y

    - name: Install Dependencies
      run: |
        apt-get -yq --no-install-suggests --no-install-recommends install \
          git \
          gcc-powerpc64le-linux-gnu \
          g++-powerpc64le-linux-gnu \
          cmake \
          cmake-data \
          ninja-build

    - uses: actions/checkout@v6
      with:
        submodules: recursive

    - name: Configure CMake
      run: |
        export CFLAGS="$CFLAGS -mabi=ibmlongdouble -Wno-psabi"
        export CXXFLAGS="$CXXFLAGS -mabi=ibmlongdouble -Wno-psabi"
        cmake -S . \
          -B build \
          -G Ninja \
          -DCMAKE_SYSTEM_NAME=Linux \
          -DCMAKE_SYSTEM_PROCESSOR=ppc64le \
          -DCMAKE_C_COMPILER=powerpc64le-linux-gnu-gcc \
          -DCMAKE_CXX_COMPILER=powerpc64le-linux-gnu-g++ \
          -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
          -DCMAKE_VERBOSE_MAKEFILE=1 \
          -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
          -Werror=dev \
          -DCMAKE_INSTALL_PREFIX=$INSTALL_LOCATION \
          -Dosal=embedded \
          -Denable-libinstpatch=0 \
          -DNO_GUI=1

    - name: Build
      run: cmake --build build