Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
BatchDrake committed Jan 13, 2024
2 parents 1d7559d + dce61c2 commit abd66e6
Show file tree
Hide file tree
Showing 135 changed files with 3,485 additions and 6,393 deletions.
27 changes: 27 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build
description: 'Build a CMake project with optional configuration and building parameters'

inputs:
shell:
required: false
default: bash
cmake_build_type:
default: 'Release'
required: false
cmake_configuration_parameters:
required: false
cmake_build_paramters:
required: false
target:
default: 'all'

runs:
using: "composite"
steps:
- name: Configure
shell: ${{inputs.shell}}
run: cmake -B build -DCMAKE_BUILD_TYPE=${{inputs.cmake_build_type}} ${{inputs.cmake_configuration_parameters}}

- name: Build
shell: ${{inputs.shell}}
run: cmake --build build --config ${{inputs.cmake_build_type}} --verbose ${{inputs.cmake_build_paramters}} --target ${{inputs.target}}
41 changes: 41 additions & 0 deletions .github/actions/package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Package
description: 'Package a CMake project with CPack support'

inputs:
generators:
required: true

runs:
using: "composite"
steps:
- name: Package
shell: bash
run: cpack --config build/CPackConfig.cmake --verbose -G "${{inputs.generators}}"

- name: Upload DEB artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: linux-deb.zip
path: build/dist/*.deb

- name: Upload TGZ artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: linux-tgz.zip
path: build/dist/*.tar.gz

- name: Upload TGZ artifact
if: runner.os == 'MacOS'
uses: actions/upload-artifact@v3
with:
name: macos-tgz.zip
path: build/dist/*.tar.gz

- name: Upload ZIP artifact
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
name: windows-zip.zip
path: build/dist/*.zip
14 changes: 14 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Test
description: 'Test a CMake project with CTest support'

inputs:
shell:
required: false
default: bash

runs:
using: "composite"
steps:
- name: Test
shell: ${{inputs.shell}}
run: ctest --test-dir build -VV --rerun-failed --output-on-failure
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
- package-ecosystem: "gitsubmodule"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
16 changes: 16 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ci:
- .github/**

build_system:
- 'CMake*'
- '**/CMakeLists.txt'
- '**/*.cmake'

sigutils:
- any: ['src/**', '!src/CMakeLists.txt']

documentation:
- any: ['doc/**', '!doc/CMakeLists.txt']

tests:
- any: ['tests/**', '!tests/CMakeLists.txt']
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build

on: [push, pull_request, workflow_dispatch]

jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libsndfile1-dev libvolk2-dev libfftw3-dev catch2

- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Build
uses: "./.github/actions/build"
with:
target: sigutils
cmake_configuration_parameters: -DCMAKE_INSTALL_PREFIX=/usr

- name: Build tests
uses: "./.github/actions/build"
with:
target: sigutils_test

- name: Test
uses: "./.github/actions/test"

- name: Package
uses: "./.github/actions/package"
with:
generators: TGZ;DEB

build-macos:
runs-on: macos-latest
steps:
- name: Install dependencies
run: brew install libsndfile volk fftw catch2

- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Build
uses: "./.github/actions/build"
with:
target: sigutils

- name: Build tests
uses: "./.github/actions/build"
with:
target: sigutils_test

- name: Test
uses: "./.github/actions/test"

- name: Package
uses: "./.github/actions/package"
with:
generators: TGZ

build-windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-libsndfile mingw-w64-x86_64-fftw mingw-w64-x86_64-volk mingw-w64-x86_64-catch

- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Build
uses: "./.github/actions/build"
with:
shell: msys2 {0}
target: sigutils

- name: Build tests
uses: "./.github/actions/build"
with:
shell: msys2 {0}
target: sigutils_test

- name: Test
uses: "./.github/actions/test"
with:
shell: msys2 {0}

- name: Package
uses: "./.github/actions/package"
with:
generators: ZIP
92 changes: 0 additions & 92 deletions .github/workflows/cmake.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "CodeQL"

on:
push:
branches: [ "develop" ]
paths:
- src/
pull_request:
branches: [ "develop" ]
paths:
- src/

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libsndfile1-dev libvolk2-dev libfftw3-dev

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

0 comments on commit abd66e6

Please sign in to comment.