Add JUCE as submodule. #3
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| include: | |
| - os: ubuntu-latest | |
| artifact_path: build/Spice_artefacts/Release/ | |
| name_suffix: Linux | |
| - os: macos-latest | |
| artifact_path: build/Spice_artefacts/Release/ | |
| name_suffix: macOS | |
| - os: windows-latest | |
| artifact_path: build/Spice_artefacts/Release/ | |
| name_suffix: Windows | |
| steps: | |
| - name: Checkout code with submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libasound2-dev \ | |
| libjack-jackd2-dev \ | |
| libfreetype6-dev \ | |
| libx11-dev \ | |
| libxcomposite-dev \ | |
| libxcursor-dev \ | |
| libxext-dev \ | |
| libxinerama-dev \ | |
| libxrandr-dev \ | |
| libxrender-dev \ | |
| libwebkit2gtk-4.0-dev \ | |
| libglu1-mesa-dev \ | |
| mesa-common-dev | |
| - name: Setup Xcode | |
| if: runner.os == 'macOS' | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Install macOS dependencies | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install cmake | |
| - name: Setup MSVC | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Configure CMake | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: List build artifacts (Debug) | |
| shell: bash | |
| run: | | |
| echo "Contents of build directory:" | |
| ls -R build/ || dir /s build\ | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: spice-oss-${{ matrix.name_suffix }} | |
| path: ${{ matrix.artifact_path }} | |
| if-no-files-found: warn | |
| create-release-artifacts: | |
| name: Create Release Package | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Display structure | |
| run: ls -R artifacts/ | |
| - name: Create combined artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: spice-oss-all-platforms | |
| path: artifacts/ | |
| retention-days: 30 |