Formatting and structure cleanup #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
env: | |
BUILD_TYPE: Release | |
JUCE_URL_LINUX: https://github.com/juce-framework/JUCE/archive/refs/tags/7.0.9.tar.gz | |
JUCE_URL_WIN: https://github.com/juce-framework/JUCE/archive/refs/tags/7.0.9.zip | |
jobs: | |
format-checking: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: RafikFarhad/clang-format-github-action@v3 | |
with: | |
sources: 'src/**/*.h,src/**/*.cpp,src/*.cpp' | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install packages | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt update | |
sudo apt install -y \ | |
curl \ | |
clang-tidy-15 \ | |
g++-13 \ | |
ninja-build \ | |
libasound2-dev \ | |
libjack-jackd2-dev \ | |
ladspa-sdk \ | |
libcurl4-openssl-dev \ | |
libfreetype6-dev \ | |
libx11-dev \ | |
libxcomposite-dev \ | |
libxcursor-dev \ | |
libxext-dev \ | |
libxinerama-dev \ | |
libxrandr-dev \ | |
libxrender-dev \ | |
libwebkit2gtk-4.0-dev | |
fi | |
shell: bash | |
- name: Install JUCE on Linux | |
if: ${{ runner.os == 'Linux' }} | |
working-directory: ${{github.workspace}} | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/juce | |
curl -s -L $JUCE_URL_LINUX | tar xzvf - -C $GITHUB_WORKSPACE/juce | |
shell: bash | |
- name: Install JUCE on Windows | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
Invoke-WebRequest -Uri $env:JUCE_URL_WIN -OutFile juce.zip | |
Expand-Archive -Path juce.zip -DestinationPath $env:GITHUB_WORKSPACE/juce -Force | |
Remove-Item juce.zip | |
shell: pwsh | |
- name: Configure CMake | |
working-directory: ${{github.workspace}} | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
export CXX=/usr/bin/g++-13 | |
export GENERATOR=Ninja | |
else | |
export GENERATOR="''Visual Studio 17 2022''" | |
fi | |
cmake -S $GITHUB_WORKSPACE -B ./build -G $GENERATOR -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DJUCE_PATH=$GITHUB_WORKSPACE/juce/JUCE-7.0.9 | |
shell: bash | |
- name: Build | |
working-directory: ${{github.workspace}} | |
run: cmake --build ./build | |
shell: bash |