Trying to get the Windows build to succeed on GitHub #7
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: CI Build and Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-unix: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y g++ make libflac-dev libsndfile1-dev pkg-config | |
| - name: Install dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install flac libsndfile pkg-config | |
| - name: Build (make) | |
| working-directory: code | |
| run: make | |
| build-windows-mfc: | |
| name: Build (Windows / Visual Studio) | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out project | |
| uses: actions/checkout@v4 | |
| - name: Check out FLAC (headers + static lib for vcxproj) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: xiph/flac | |
| path: flac | |
| ref: 1.4.3 | |
| - name: Configure & build FLAC (Release | x64, static) | |
| shell: cmd | |
| run: | | |
| cmake -S flac -B flac\build -G "Visual Studio 17 2022" -A x64 ^ | |
| -DBUILD_SHARED_LIBS=OFF ^ | |
| -DBUILD_DOCS=OFF ^ | |
| -DBUILD_TESTING=OFF ^ | |
| -DBUILD_EXAMPLES=OFF ^ | |
| -DBUILD_PROGRAMS=OFF ^ | |
| -DBUILD_CXXLIBS=OFF ^ | |
| -DINSTALL_MANPAGES=OFF ^ | |
| -DWITH_OGG=OFF | |
| cmake --build flac\build --config Release --parallel --target FLAC | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| # Headers + sndfile.lib for SndFileBackedMetadataAudioFile (matches vcxproj LibSndFileInstalledRoot defaults). | |
| - name: Install libsndfile (vcpkg x64-windows) | |
| shell: pwsh | |
| run: | | |
| $root = $env:VCPKG_INSTALLATION_ROOT | |
| if (-not $root) { $root = 'C:\vcpkg' } | |
| & "$root\vcpkg.exe" install libsndfile:x64-windows --recurse | |
| - name: Build AudioMixerCPP.sln | |
| working-directory: code | |
| env: | |
| FLAC_LIB_DIR: ${{ github.workspace }}/flac | |
| run: msbuild AudioMixerCPP.sln /m /p:Configuration=Release /p:Platform=x64 |