From d28291ba6cd5feba28c4fd7dd0cbb6fa31399274 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Tue, 12 Mar 2024 09:13:36 -0400 Subject: [PATCH] Modify ci.yml 'on' to run on pull request; Activate linux ci.yml runs on PR ci turns on ubuntu CMakeLists adjusts to turn off werror on linux for now CMakeLists adjusts to turn off JUCE on linux for now --- .github/workflows/ci.yml | 15 ++++++++++++++- CMakeLists.txt | 12 +++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c6d46c..2774b5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,10 @@ name: CI on: workflow_dispatch: push: + pull_request: + branches: + - main + - next env: CMAKE_BUILD_PARALLEL_LEVEL: 3 # Use up to 3 cpus to build juceaide, etc @@ -29,7 +33,7 @@ jobs: fail-fast: false matrix: app: [ member_enabled, member_disabled, unique_ptr_enabled, unique_ptr_disabled ] - os: [ macos-latest, windows-latest ] + os: [ macos-latest, windows-latest, ubuntu-latest ] steps: - name: Checkout @@ -37,6 +41,15 @@ jobs: with: fetch-depth: 1 + - name: Install Linux Deps + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt install libasound2-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libfreetype6-dev libglu1-mesa-dev libjack-jackd2-dev + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 + + - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.3 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c89ed2..626a28c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,17 @@ if (MelatoninInspector_IS_TOP_LEVEL) juce_add_gui_app ("${TARGET_NAME}" VERSION 1.0.0) target_sources("${TARGET_NAME}" PRIVATE "tests/${TARGET_NAME}.cpp") - set_target_properties("${TARGET_NAME}" PROPERTIES COMPILE_WARNING_AS_ERROR ON) + + target_compile_definitions("${TARGET_NAME}" PUBLIC + JUCE_USE_CURL=0 + JUCE_WEB_BROWSER=0 + ) + + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + message(STATUS "Avoiding warnings are errors") + else() + set_target_properties("${TARGET_NAME}" PROPERTIES COMPILE_WARNING_AS_ERROR ON) + endif() endif ()