Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Git Version Extraction in Submodule Context #25

Merged
merged 8 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
pull_request:
branches:
- main
- develop

env:
SCCACHE_GHA_ENABLED: "true"
Expand Down Expand Up @@ -46,8 +45,12 @@ jobs:
shell: bash
run: |
if [ "${{ matrix.name }}" == "Linux-x86_64" ]; then
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libfreetype6-dev libasound2-dev
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libfreetype6-dev libasound2-dev libfontconfig1-dev
# Fix the juce bug with ft2build.h not found
sudo ln -s /usr/include/freetype2/ft2build.h /usr/include/ft2build.h
sudo ln -s /usr/include/freetype2/freetype /usr/include/freetype
fi

- name: build
uses: ./.github/actions/build
with:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/build_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: build_examples

on:
workflow_call:
workflow_dispatch: # lets you run a build from github.com
# Runs the workflow on all push events
pull_request:
branches:
- main

env:
SCCACHE_GHA_ENABLED: "true"

# When pushing new commits, cancel any workflows with the same name on that branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_test:
name: ${{ matrix.name }}
strategy:
fail-fast: false # show all errors for each platform (vs. cancel jobs on error)
matrix:
include:
- name: Linux-x86_64
os: ubuntu-latest
- name: macOS-x86_64
os: macOS-latest
- name: macOS-arm64
os: macOS-latest
- name: Windows-x86_64
os: windows-latest

runs-on: ${{ matrix.os }}
steps:
- name: get repo and submodules
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: setup
uses: ./.github/actions/setup
- name: add juce deps
shell: bash
run: |
if [ "${{ matrix.name }}" == "Linux-x86_64" ]; then
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libfreetype6-dev libasound2-dev libfontconfig1-dev
# Fix the juce bug with ft2build.h not found
sudo ln -s /usr/include/freetype2/ft2build.h /usr/include/ft2build.h
sudo ln -s /usr/include/freetype2/freetype /usr/include/freetype
fi
- name: build
uses: ./.github/actions/build
with:
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 4
TARGETS: (anira-clap-plugin-example anira-juce-plugin-example_All minimal-libtorch minimal-onnxruntime minimal-tflite)
CMAKE_BUILD_ARGS: "-DBUILD_SHARED_LIBS=ON -DANIRA_WITH_EXAMPLES=ON"
1 change: 0 additions & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
pull_request:
branches:
- main
- develop

env:
SCCACHE_GHA_ENABLED: "true"
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ option(ANIRA_WITH_CONTROLLED_BLOCKING "Use of controlled blocking operation for
# ==============================================================================

execute_process(COMMAND git describe --dirty
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PROJECT_VERSION_FULL
OUTPUT_STRIP_TRAILING_WHITESPACE)

execute_process(COMMAND git describe --tags --abbrev=0
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PROJECT_VERSION_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE)

Expand Down Expand Up @@ -271,4 +271,4 @@ endif()

if (ANIRA_WITH_TESTS)
add_subdirectory(test)
endif()
endif()
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

![build_test](https://github.com/anira-project/anira/actions/workflows/build_test.yml/badge.svg)
![build_benchmark](https://github.com/anira-project/anira/actions/workflows/build_benchmark.yml/badge.svg)
![build_examples](https://github.com/anira-project/anira/actions/workflows/build_examples.yml/badge.svg)
![on_tag](https://github.com/anira-project/anira/actions/workflows/on_tag.yml/badge.svg)

---
Expand Down
4 changes: 4 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# TODOs

- [ ] Trigger `ldconfig` in the .deb package
- [ ] Run the examples as tests in CI
3 changes: 1 addition & 2 deletions examples/juce-audio-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include(FetchContent)

FetchContent_Declare(JUCE
GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
GIT_TAG 8.0.4
GIT_TAG 8.0.6
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(JUCE)
Expand Down Expand Up @@ -100,7 +100,6 @@ target_compile_definitions(${TARGET_NAME}
JUCE_WEB_BROWSER=0 # If you remove this, add `NEEDS_WEB_BROWSER TRUE` to the `juce_add_plugin` call
JUCE_USE_CURL=0 # If you remove this, add `NEEDS_CURL TRUE` to the `juce_add_plugin` call
JUCE_VST3_CAN_REPLACE_VST2=0
DONT_SET_USING_JUCE_NAMESPACE=1

# Backend-specific definitions
$<$<BOOL:${BACKEND_LIBTORCH}>:USE_LIBTORCH>
Expand Down
Loading