Skip to content

Commit

Permalink
Modify ci.yml 'on' to run on pull request; Activate linux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
baconpaul committed Mar 12, 2024
1 parent c472f0a commit d28291b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,14 +33,23 @@ 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
uses: actions/checkout@v3
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/[email protected]

Expand Down
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand Down

0 comments on commit d28291b

Please sign in to comment.