ccpp.yml (5887B)
1 --- 2 name: Build CI 3 4 on: # yamllint disable-line rule:truthy 5 push: 6 pull_request: 7 pull_request_review: 8 types: [submitted] 9 10 jobs: 11 build: 12 name: ${{ matrix.config.name }} 13 runs-on: ${{ matrix.config.os }} 14 strategy: 15 fail-fast: false 16 matrix: 17 config: 18 - { 19 name: "Windows MSVC", 20 enabled: 0, 21 os: windows-latest, 22 deps1: "", 23 deps2: "", 24 testdeps: "", 25 info: "", 26 config: "cmake 27 -B build 28 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake 29 -DRTOSC_WERROR=1 30 -DCMAKE_BUILD_TYPE=Debug 31 ", 32 configext: "cmake -B build -DCompileExtensiveTests=ON ..", 33 build: "cmake --build build --config Debug", 34 test: "ctest --output-on-failure --test-dir build" 35 } 36 - { 37 name: "Ubuntu gcc", 38 enabled: 1, 39 os: ubuntu-latest, 40 update: "sudo apt-get update", 41 deps1: "sudo apt-get install zlib1g-dev libmxml-dev libfftw3-dev dssi-dev libfltk1.3-dev fluid libxpm-dev", 42 deps2: "sudo apt-get install liblo-dev", 43 testdeps: "sudo apt-get install ruby", 44 info: "cmake --version && gcc --version", 45 config: "cd build && cmake -DRTOSC_WERROR=ON -DWerror=ON ..", 46 configext: "cd build && cmake -DCompileExtensiveTests=ON ..", 47 build: "cd build && make VERBOSE=1", 48 test: "cd build && ctest --output-on-failure" 49 } 50 - { 51 name: "Ubuntu clang+lld", 52 enabled: 1, 53 os: ubuntu-latest, 54 update: "sudo apt-get update", 55 deps1: "sudo apt-get install zlib1g-dev libmxml-dev libfftw3-dev dssi-dev libfltk1.3-dev fluid libxpm-dev", 56 deps2: "sudo apt-get install liblo-dev", 57 testdeps: "sudo apt-get install ruby", 58 info: "cmake --version && clang --version", 59 # the only really different line to gcc: 60 config: "cd build && \ 61 cmake \ 62 -DCMAKE_C_COMPILER=clang \ 63 -DCMAKE_CXX_COMPILER=clang++ \ 64 -DCMAKE_C_FLAGS='-fuse-ld=lld -Wno-unused-command-line-argument' \ 65 -DCMAKE_CXX_FLAGS='-fuse-ld=lld -Wno-unused-command-line-argument' \ 66 -DRTOSC_WERROR=ON -DWerror=ON ..", 67 configext: "cd build && cmake -DCompileExtensiveTests=ON ..", 68 build: "cd build && make VERBOSE=1", 69 test: "cd build && ctest --output-on-failure" 70 } 71 - { 72 name: "macOS clang", 73 enabled: 1, 74 os: macos-latest, 75 update: "cmake --version && clang --version", 76 deps1: "brew install extra-cmake-modules liblo zlib fftw [email protected] fluid-synth libxpm", 77 deps2: "brew install libmxml --HEAD", 78 testdeps: "brew install ruby", 79 info: "cmake --version && clang --version", 80 config: "cd build && cmake -DRTOSC_WERROR=ON -DWerror=ON ..", 81 configext: "cd build && cmake -DCompileExtensiveTests=ON ..", 82 build: "cd build && make VERBOSE=1", 83 test: "cd build && ctest --output-on-failure" 84 } 85 steps: 86 - name: check out 87 if: ${{ matrix.config.enabled == 1 }} 88 uses: actions/checkout@v4 89 with: 90 fetch-depth: 0 91 - name: update_apt 92 if: ${{ matrix.config.enabled == 1 }} 93 run: ${{ matrix.config.update }} 94 - name: install_deps1 95 if: ${{ matrix.config.enabled == 1 }} 96 run: ${{ matrix.config.deps1 }} 97 - name: install_deps2 98 if: ${{ matrix.config.enabled == 1 }} 99 run: ${{ matrix.config.deps2 }} 100 - name: install_test_deps1 101 if: ${{ matrix.config.enabled == 1 }} 102 run: ${{ matrix.config.testdeps }} 103 - name: submodule 104 if: ${{ matrix.config.enabled == 1 }} 105 run: git submodule update --init 106 - name: info 107 if: ${{ matrix.config.enabled == 1 }} 108 run: ${{ matrix.config.info }} 109 - name: create_builddir 110 if: ${{ matrix.config.enabled == 1 }} 111 run: mkdir build 112 - name: configure 113 if: ${{ matrix.config.enabled == 1 }} 114 run: ${{ matrix.config.config }} 115 - name: configure-extensive 116 if: ${{ matrix.config.enabled == 1 && ( (github.event_name == 'pull_request_review' && github.event.action == 'submitted') || ( github.ref == 'refs/heads/master' ) ) }} 117 run: ${{ matrix.config.configext }} 118 - name: make 119 if: ${{ matrix.config.enabled == 1 }} 120 run: ${{ matrix.config.build }} 121 - name: make test 122 if: ${{ matrix.config.enabled == 1 }} 123 run: ${{ matrix.config.test }} 124 125 # build_arch_linux_system_rtosc: 126 # runs-on: ubuntu-latest 127 # container: 128 # image: archlinux:latest 129 # steps: 130 # - name: Install dependencies 131 # run: pacman --noconfirm -Syu alsa-lib base-devel cmake cxxtest dssi fftw fltk git jack ladspa liblo libxpm mxml portaudio rtosc zlib 132 # - uses: actions/checkout@v2 133 # with: 134 # submodules: recursive 135 # # test does not seem to work in a container and reports: 136 # # Process not started 137 # # /__w/zynaddsubfx/zynaddsubfx/build/src/Tests/check-ports.rb 138 # # [no such file or directory] 139 # - name: Disable PortChecker test 140 # run: sed -e '/add_test(PortChecker/d' -i src/Tests/CMakeLists.txt 141 # - name: Build zynaddsubfx 142 # run: | 143 # cmake -DCMAKE_INSTALL_PREFIX=/usr -DZYN_SYSTEM_RTOSC=ON -B build -S . 144 # make VERBOSE=1 -C build 145 # - name: Test zynaddsubfx 146 # run: make VERBOSE=1 -k test ARGS='-VVd' -C build 147 # - name: Install zynaddsubfx 148 # run: make VERBOSE=1 install -C build