desubmodulize portaudio - PLEASE READ

this is necessary in order to get Furnace to build using CMake 4.0.

you should do:

git submodule deinit extern/portaudio
This commit is contained in:
tildearrow 2025-02-22 14:47:45 -05:00
parent c58a7cba20
commit 165b814f5d
328 changed files with 190256 additions and 6 deletions

View file

@ -0,0 +1,96 @@
name: MSBuild MSVC Project File CI
on: [push, pull_request]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: ./msvc/portaudio.sln
VCPROJ_FILE_PATH: ./msvc/portaudio.vcproj
VCXPROJ_FILE_PATH: ./msvc/portaudio.vcxproj
VCXPROJ_FILTERS_FILE_PATH: ./msvc/portaudio.vcxproj.filters
VCXPROJ_USER_FILE_PATH: ./msvc/portaudio.vcxproj.user
DEF_FILE_PATH: ./msvc/portaudio.def
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
BUILD_CONFIGURATION: [Release]
BUILD_PLATFORM: [Win32, x64]
steps:
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- uses: actions/checkout@v2
- name: Upgrade VC Project File
# We maintain our vcproj file in an old format to maintain backwards compatibility
# This step upgrades the project to the latest version of MSVC
# see https://docs.microsoft.com/en-us/visualstudio/ide/reference/upgrade-devenv-exe?view=vs-2019
# pipe to file to ensure that it terminates https://stackoverflow.com/questions/48896010/occasionally-occurring-msbuild-error-msb3428/48918105#48918105
# discussion of using vswhere.exe here: https://stackoverflow.com/questions/65287456/how-to-upgrade-a-visual-studio-project-from-within-a-github-action/65311868#65311868
run: |
$devenv = & vswhere.exe '-property' productPath
Write-Output "$devenv"
& $devenv "${{env.VCPROJ_FILE_PATH}}" /Upgrade /NoSplash | Out-Null
Write-Output "devenv launched"
while (!(Test-Path "${{env.VCXPROJ_FILE_PATH}}")) { Start-Sleep -Seconds 10 }
Write-Output "vcxproj found"
while (!(Test-Path "${{env.VCXPROJ_FILTERS_FILE_PATH}}")) { Start-Sleep -Seconds 10 }
Write-Output "vcxproj.filters found"
Start-Sleep -Seconds 10
Write-Output "done."
- name: Remove ASIO Files and Enable PA_USE_DS=1
# Process the project files to remove ASIO-related sources and includes (since we can not access the ASIO SDK in a public build)
run: |
# Process .vcxproj file: remove source files
$xdoc = new-object System.Xml.XmlDocument
$vcxprojFile = resolve-path("${{env.VCXPROJ_FILE_PATH}}")
$xdoc.load($vcxprojFile)
$namespace = New-Object -TypeName "Xml.XmlNamespaceManager" -ArgumentList $xdoc.NameTable
$namespace.AddNamespace("vs", $xdoc.DocumentElement.NamespaceURI)
$nodes = $xdoc.SelectNodes("//vs:ClCompile[contains(@Include, '..\src\hostapi\asio')]", $namespace)
Write-Output "deleting ASIO related compilation nodes from .vcxproj:"
Write-Output $nodes
ForEach($node in $nodes) {
$parent = $node.ParentNode
$parent.RemoveChild($node)
}
# Enable DirectSound host API
$nodes = $xdoc.SelectNodes("//vs:PreprocessorDefinitions[contains(., 'PA_USE_DS=0')]", $namespace)
ForEach($node in $nodes) {
$text = $node.InnerText
$node.InnerText = $text -replace 'PA_USE_DS=0', 'PA_USE_DS=1'
}
$xdoc.save($vcxprojFile)
# Process .vcxproj.filters file: remove source files and includes
$vcxprojFiltersFile = resolve-path("${{env.VCXPROJ_FILTERS_FILE_PATH}}")
$xdoc.load($vcxprojFiltersFile)
$namespace = New-Object -TypeName "Xml.XmlNamespaceManager" -ArgumentList $xdoc.NameTable
$namespace.AddNamespace("vs", $xdoc.DocumentElement.NamespaceURI)
$nodes = $xdoc.SelectNodes("//vs:ClCompile[contains(@Include, '..\src\hostapi\asio')]", $namespace)
Write-Output "deleting ASIO related compilation nodes from .vcxproj.filters:"
Write-Output $nodes
ForEach($node in $nodes) {
$parent = $node.ParentNode
$parent.RemoveChild($node)
}
$nodes = $xdoc.SelectNodes("//vs:ClInclude[contains(@Include, 'pa_asio.h')]", $namespace)
Write-Output "deleting ASIO related include nodes from .vcxproj.filters:"
Write-Output $nodes
ForEach($node in $nodes) {
$parent = $node.ParentNode
$parent.RemoveChild($node)
}
$xdoc.save($vcxprojFiltersFile)
# Process .def file: remove PaAsio_ symbols
Set-Content -Path "${{env.DEF_FILE_PATH}}" -Value (Get-Content -Path "${{env.DEF_FILE_PATH}}" | Select-String -Pattern 'PaAsio_' -NotMatch)
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{matrix.BUILD_CONFIGURATION}} /p:Platform=${{matrix.BUILD_PLATFORM}} ${{env.VCXPROJ_FILE_PATH}}

View file

@ -0,0 +1,20 @@
name: autotools build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-autotools:
runs-on: ubuntu-latest
name: Ubuntu
steps:
- uses: actions/checkout@v2
- name: configure
run: ./configure
- name: make
run: make

View file

@ -0,0 +1,128 @@
name: CMake build
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-latest
install_dir: ~/portaudio
vcpkg_triplet: x64-linux
cmake_generator: "Unix Makefiles"
cmake_options:
-DPA_USE_OSS=ON
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Ubuntu MinGW
os: ubuntu-latest
install_dir: ~/portaudio
asio_sdk_cache_path: asiosdk.zip
dependencies_extras: mingw-w64
# FIXME: linking JACK fails with vcpkg. Switch the CMake toolchain file to use vcpkg. The
# toolchain file in this repository is not needed when using a MinGW triplet with vcpkg.
vcpkg_triplet: x64-mingw-static
cmake_generator: "Unix Makefiles"
cmake_options:
-DPA_USE_ASIO=ON
-DASIO_SDK_ZIP_PATH=asiosdk.zip
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-w64-mingw32.cmake
- name: Windows MSVC
os: windows-latest
install_dir: C:\portaudio
vcpkg_triplet: x64-windows
cmake_generator: "Visual Studio 17 2022"
# ASIO_SDK_ZIP_PATH needs to be quoted or CMake will save the download to
# asiosdk instead of asiosdk.zip.
asio_sdk_cache_path: "asiosdk.zip"
# Somehow CMake fails to find the toolchain file if a relative path is used on Windows.
cmake_options:
-DPA_USE_ASIO=ON
-DASIO_SDK_ZIP_PATH="asiosdk.zip"
-DCMAKE_TOOLCHAIN_FILE=D:\a\portaudio\portaudio\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: Windows MinGW
os: windows-latest
install_dir: C:\portaudio
vcpkg_triplet: x64-mingw-static
cmake_generator: "MinGW Makefiles"
# ASIO_SDK_ZIP_PATH needs to be quoted or CMake will save the download to
# asiosdk instead of asiosdk.zip.
asio_sdk_cache_path: "asiosdk.zip"
# Somehow CMake fails to find the toolchain file if a relative path is used on Windows.
cmake_options:
-DPA_USE_ASIO=ON
-DASIO_SDK_ZIP_PATH="asiosdk.zip"
-DCMAKE_TOOLCHAIN_FILE=D:\a\portaudio\portaudio\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: macOS Clang
os: macOS-latest
install_dir: ~/portaudio
vcpkg_triplet: x64-osx
cmake_generator: "Unix Makefiles"
cmake_options:
-DCMAKE_FRAMEWORK=OFF
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
- name: macOS Clang framework
os: macOS-latest
install_dir: ~/portaudio
vcpkg_triplet: x64-osx
cmake_generator: "Unix Makefiles"
cmake_options:
-DCMAKE_FRAMEWORK=ON
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
env:
cmake_build_type: RelWithDebInfo
steps:
- name: checkout Git repository
uses: actions/checkout@v2
- name: "[Ubuntu] install dependencies"
run: |
sudo apt-get update
sudo apt-get install libasound2-dev ${{ matrix.dependencies_extras }}
if: matrix.os == 'ubuntu-latest'
- name: "[macOS] install dependencies"
# https://github.com/PortAudio/portaudio/issues/767
run: brew install pkg-config
if: matrix.os == 'macOS-latest'
- name: "[Windows/MinGW] set up ASIO SDK cache"
uses: actions/cache@v2
if: matrix.asio_sdk_cache_path != null
with:
path: ${{ matrix.asio_sdk_cache_path }}
key: ${{ hashFiles('.github/asiosdk-version.txt') }}
- name: Setup vcpkg
uses: lukka/run-vcpkg@v7
if: ${{ matrix.vcpkg_triplet }} != null
with:
vcpkgTriplet: ${{ matrix.vcpkg_triplet }}
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
additionalCachedPaths: build/vcpkg_installed
vcpkgGitCommitId: f30786c9c4c901f21a13e2d524349e39cc359a90
# Required when using vcpkg.json manifest in repository
setupOnly: true
- name: configure
run: cmake
-G "${{ matrix.cmake_generator }}"
${{ matrix.cmake_options }}
-DCMAKE_INSTALL_PREFIX=${{ matrix.install_dir }}
-DCMAKE_BUILD_TYPE=${{ env.cmake_build_type }}
-DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }}
-DPA_USE_SKELETON=ON
-DPA_BUILD_TESTS=ON
-DPA_BUILD_EXAMPLES=ON
-DPA_WARNINGS_ARE_ERRORS=ON
-S .
-B build
- name: build
run: cmake --build build --config ${{ env.cmake_build_type }} --parallel 2
- name: install
run: cmake --install build --config ${{ env.cmake_build_type }}
- name: "Upload GitHub Actions artifacts"
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.name }} PortAudio build
path: ${{ matrix.install_dir }}

View file

@ -0,0 +1,17 @@
name: Check that PortAudio .def files are in sync
on: [push, pull_request]
jobs:
run-pa-compare-def-files-py:
runs-on: ubuntu-latest
name: Ubuntu
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Run the pa_compare_def_files.py script
run: python ./pa_compare_def_files.py

View file

@ -0,0 +1,17 @@
name: Check for valid whitespace usage in PortAudio source files
on: [push, pull_request]
jobs:
run-pa-whitelint-dot-py:
runs-on: ubuntu-latest
name: Ubuntu
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Run the pa_whitelint.py script
run: python ./pa_whitelint.py