Revert "remove building step when pushed to main, only deploy documen… #175
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: Audio CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: Build plugins | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Xcode 15.1 | |
if: matrix.os == 'macos-latest' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: "15.1" | |
- name: Install dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt install doxygen graphviz libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev libfreetype6-dev libx11-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev mesa-common-dev | |
- name: Set CMake default generator | |
if: matrix.os == 'macos-latest' | |
run: echo "CMAKE_GENERATOR=Xcode" >> $GITHUB_ENV | |
- name: Build | |
run: cmake --workflow --preset Release | |
- name: Generate documentation | |
if: matrix.os == 'ubuntu-latest' | |
run: cmake --build --preset Docs | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{matrix.os}} | |
path: | | |
CMakePresets.json | |
build/** | |
!build/build | |
!**/*_SharedCode.a | |
!build/_deps/juce-*/ | |
- name: Upload build artifact | |
if: matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/main' && github.event_name == 'push' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: doxygen-docs | |
path: build/docs/html | |
test: | |
name: Test | |
needs: build | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
steps: | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-${{matrix.os}} | |
- name: Change permissions | |
if: matrix.os != 'windows-latest' | |
run: chmod -R +x build/_deps/pluginval-src/ | |
- name: Register AU plugins | |
if: matrix.os == 'macos-latest' | |
run: | | |
mkdir -p ~/Library/Audio/Plug-Ins/Components | |
find build -name "*.component" -exec cp -r {} ~/Library/Audio/Plug-Ins/Components/ \; | |
pgrep -x AudioComponentRegistrar >/dev/null && killall -9 AudioComponentRegistrar; echo "killed AudioComponentRegistrar" || echo "AudioComponentRegistrar Process not found" | |
shell: bash | |
- name: Run Tests | |
run: ctest --preset Release | |
deploy: | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Doxygen Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: doxygen-docs | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: . |