Skip to content

Commit 17e3ffe

Browse files
committed
Merge branch 'main' into dev/improved_artboard
# Conflicts: # examples/render/source/main.cpp # modules/yup_gui/artboard/yup_Artboard.cpp # modules/yup_gui/yup_gui.cpp # modules/yup_gui/yup_gui.h
2 parents ab6fcfc + cf7b90d commit 17e3ffe

File tree

1,207 files changed

+201103
-192734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,207 files changed

+201103
-192734
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ SpacesInSquareBrackets: false
7070
Standard: "c++17"
7171
TabWidth: 4
7272
UseTab: Never
73-
WhitespaceSensitiveMacros: ['JUCE_NTH_ARG_', 'EM_ASM', 'EM_JS', 'EM_ASM_INT', 'EM_ASM_DOUBLE', 'EM_ASM_PTR', 'MAIN_THREAD_EM_ASM', 'MAIN_THREAD_EM_ASM_INT', 'MAIN_THREAD_EM_ASM_DOUBLE', 'MAIN_THREAD_EM_ASM_DOUBLE', 'MAIN_THREAD_ASYNC_EM_ASM']
73+
WhitespaceSensitiveMacros: ['YUP_NTH_ARG_', 'EM_ASM', 'EM_JS', 'EM_ASM_INT', 'EM_ASM_DOUBLE', 'EM_ASM_PTR', 'MAIN_THREAD_EM_ASM', 'MAIN_THREAD_EM_ASM_INT', 'MAIN_THREAD_EM_ASM_DOUBLE', 'MAIN_THREAD_EM_ASM_DOUBLE', 'MAIN_THREAD_ASYNC_EM_ASM']
7474
---
7575
Language: ObjC
7676
BasedOnStyle: Chromium

.github/workflows/coverage.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
paths:
6+
- "CMakeLists.txt"
7+
- "codecov.yml"
8+
- "**/workflows/coverage.yml"
9+
- "**/cmake/**"
10+
- "**/modules/**"
11+
- "**/tests/**"
12+
- "!**/native/*_android.*"
13+
- "!**/native/*_apple.*"
14+
- "!**/native/*_emscripten.*"
15+
- "!**/native/*_ios.*"
16+
- "!**/native/*_mac.*"
17+
- "!**/native/*_wasm.*"
18+
- "!**/native/*_windows.*"
19+
branches:
20+
- "**"
21+
pull_request:
22+
paths:
23+
- "CMakeLists.txt"
24+
- "codecov.yml"
25+
- "**/workflows/coverage.yml"
26+
- "**/cmake/**"
27+
- "**/modules/**"
28+
- "**/tests/**"
29+
- "!**/native/*_android.*"
30+
- "!**/native/*_apple.*"
31+
- "!**/native/*_emscripten.*"
32+
- "!**/native/*_ios.*"
33+
- "!**/native/*_mac.*"
34+
- "!**/native/*_wasm.*"
35+
- "!**/native/*_windows.*"
36+
branches:
37+
- main
38+
- "dev/**"
39+
40+
concurrency:
41+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
42+
cancel-in-progress: true
43+
44+
env:
45+
INSTALL_DEPS: >-
46+
libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev libfreetype6-dev
47+
libx11-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev
48+
libxrandr-dev libxrender-dev libglu1-mesa-dev libegl1-mesa-dev mesa-common-dev lcov
49+
50+
jobs:
51+
coverage:
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
58+
- name: Setup Ninja
59+
uses: seanmiddleditch/gha-setup-ninja@master
60+
61+
- name: Install Dependencies
62+
run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
63+
64+
- name: Create Build Environment
65+
run: cmake -E make_directory ${{runner.workspace}}/build
66+
67+
- name: Configure CMake with Coverage
68+
working-directory: ${{runner.workspace}}/build
69+
run: |
70+
cmake $GITHUB_WORKSPACE \
71+
-G "Ninja Multi-Config" \
72+
-DYUP_BUILD_TESTS=ON \
73+
-DYUP_BUILD_EXAMPLES=OFF \
74+
-DYUP_ENABLE_COVERAGE=ON \
75+
-DCMAKE_BUILD_TYPE=Debug
76+
77+
- name: Build Tests
78+
working-directory: ${{runner.workspace}}/build
79+
run: cmake --build . --config Debug --parallel 4 --target yup_tests
80+
81+
- name: Clean Coverage Data
82+
working-directory: ${{runner.workspace}}/build
83+
run: cmake --build . --target coverage_clean
84+
85+
- name: Run Tests
86+
working-directory: ${{runner.workspace}}/build/tests/Debug
87+
run: ./yup_tests --gtest_output=xml:test_results.xml
88+
89+
- name: Generate Combined Coverage Report
90+
working-directory: ${{runner.workspace}}/build
91+
run: |
92+
lcov --directory . --capture --output-file coverage/coverage.info --ignore-errors mismatch,gcov,source,negative,unused,empty
93+
lcov --remove coverage/coverage.info \
94+
"*/thirdparty/*" \
95+
"*/build/*" \
96+
"*/tests/*" \
97+
"*/usr/*" \
98+
"*/opt/*" \
99+
"*/CMakeFiles/*" \
100+
--output-file coverage/coverage_final.info --ignore-errors mismatch,gcov,source,negative,unused,empty
101+
lcov --list coverage/coverage_final.info
102+
103+
- name: Upload Overall Coverage to Codecov
104+
uses: codecov/codecov-action@v4
105+
with:
106+
token: ${{ secrets.CODECOV_TOKEN }}
107+
file: ${{runner.workspace}}/build/coverage/coverage_final.info
108+
name: overall-coverage
109+
fail_ci_if_error: false
110+
verbose: true
111+
112+
- name: Upload Test Results
113+
uses: actions/upload-artifact@v4
114+
if: always()
115+
with:
116+
name: test-results
117+
path: ${{runner.workspace}}/build/tests/Debug/test_results.xml
118+
119+
- name: Upload Coverage Reports
120+
uses: actions/upload-artifact@v4
121+
if: always()
122+
with:
123+
name: coverage-reports
124+
path: ${{runner.workspace}}/build/coverage/

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ set_property (GLOBAL PROPERTY USE_FOLDERS ON)
3535
option (YUP_TARGET_ANDROID "Target Android project" OFF)
3636
option (YUP_TARGET_ANDROID_BUILD_GRADLE "When building for Android, build the gradle infrastructure" OFF)
3737
option (YUP_ENABLE_PROFILING "Enable the profiling code using Perfetto SDK" OFF)
38+
option (YUP_ENABLE_COVERAGE "Enable code coverage collection for tests" OFF)
39+
option (YUP_BUILD_JAVA_SUPPORT "Build the Java support" OFF)
3840
option (YUP_BUILD_EXAMPLES "Build the examples" ${PROJECT_IS_TOP_LEVEL})
3941
option (YUP_BUILD_TESTS "Build the tests" ${PROJECT_IS_TOP_LEVEL})
4042

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ Example Rive animation display ([source code](./examples/render/source/main.cpp)
2222
[![Build And Test iOS](https://github.com/kunitoki/yup/actions/workflows/build_ios.yml/badge.svg)](https://github.com/kunitoki/yup/actions/workflows/build_ios.yml)
2323
[![Build And Test Android](https://github.com/kunitoki/yup/actions/workflows/build_android.yml/badge.svg)](https://github.com/kunitoki/yup/actions/workflows/build_android.yml)
2424

25+
[![Coverage](https://github.com/kunitoki/yup/actions/workflows/coverage.yml/badge.svg)](https://github.com/kunitoki/yup/actions/workflows/coverage.yml)
26+
[![codecov](https://codecov.io/gh/kunitoki/yup/branch/main/graph/badge.svg)](https://codecov.io/gh/kunitoki/yup)
27+
28+
[![codecov](https://codecov.io/gh/kunitoki/yup/graphs/tree.svg?token=IO71C3DR1A)](https://codecov.io/gh/kunitoki/yup)
2529

2630
## Introduction
2731
YUP is an open-source library dedicated to empowering developers with advanced tools for cross-platform application and plugin development, featuring state-of-the-art rendering and audio processing. Originating from a fork of [JUCE7](https://juce.com/)'s ISC-licensed modules, YUP builds on the robust, high-performance capabilities that made JUCE7 popular among audio and visual application developers. Unlike its successor JUCE8, which moved to a restrictive AGPL license and an even more costly commercial one, YUP maintains the more permissive ISC license and ensures that all of its dependencies are either liberally licensed or public domain, remaining a freely accessible and modifiable resource for developers worldwide.
@@ -43,7 +47,7 @@ YUP brings a suite of powerful features, including:
4347

4448
## Supported Platforms
4549
| **Windows** | **macOS** | **Linux** | **WASM** | **Android** | **iOS** |
46-
|--------------------|:------------------:|:------------------:|:------------------:|:------------------:|:------------------:|
50+
|:------------------:|:------------------:|:------------------:|:------------------:|:------------------:|:------------------:|
4751
| :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
4852

4953

@@ -209,8 +213,8 @@ Compile example targets like example_app, example_console, or example_render to
209213
Here is a simple example of creating a basic window using YUP, save this as `main.cpp`:
210214

211215
```cpp
212-
#include <juce_core/juce_core.h>
213-
#include <juce_events/juce_events.h>
216+
#include <yup_core/yup_core.h>
217+
#include <yup_events/yup_events.h>
214218
#include <yup_graphics/yup_graphics.h>
215219
#include <yup_gui/yup_gui.h>
216220

@@ -268,7 +272,7 @@ private:
268272
std::unique_ptr<MyWindow> window;
269273
};
270274

271-
START_JUCE_APPLICATION (MyApplication)
275+
START_YUP_APPLICATION (MyApplication)
272276
```
273277
274278
And add this as `CMakeLists.txt`:

cmake/yup.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,4 @@ include (${CMAKE_CURRENT_LIST_DIR}/yup_modules.cmake)
9292
include (${CMAKE_CURRENT_LIST_DIR}/yup_standalone.cmake)
9393
include (${CMAKE_CURRENT_LIST_DIR}/yup_audio_plugin.cmake)
9494
include (${CMAKE_CURRENT_LIST_DIR}/yup_embed_binary.cmake)
95+
include (${CMAKE_CURRENT_LIST_DIR}/yup_android_java.cmake)

0 commit comments

Comments
 (0)