Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 59 additions & 22 deletions .github/workflows/build-puredata-plugins-with-pd-lib-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ on:
types:
- completed

defaults:
run:
shell: bash

jobs:
macOS:
runs-on: macos-latest
Expand Down Expand Up @@ -141,6 +137,7 @@ jobs:
submodules: true

- name: Ensure core artifact id present
shell: bash
env:
CORE_RUN_ID: ${{ github.event.workflow_run.id || inputs.core_run_id }}
run: |
Expand All @@ -156,14 +153,32 @@ jobs:

- name: Install Pd
id: pd
shell: pwsh
run: |
wget -q -O Pd.zip http://msp.ucsd.edu/Software/pd-0.53-2.msw.zip
rm -rf "${PROGRAMFILES}/pd" && mkdir -p "${PROGRAMFILES}/pd"
unzip -q Pd.zip -d "${PROGRAMFILES}/pd"
mv -v "${PROGRAMFILES}/pd"/*/* "${PROGRAMFILES}/pd"
rm -f Pd.zip
export PD="${PROGRAMFILES}/pd/bin/pd.com"
echo "PD=${PD}" | tee "$GITHUB_OUTPUT"
$ErrorActionPreference = "Stop"

$url = "http://msp.ucsd.edu/Software/pd-0.53-2.msw.zip"
$zip = Join-Path $env:RUNNER_TEMP "Pd.zip"
$pdDir = Join-Path $env:ProgramFiles "pd"

Invoke-WebRequest $url -OutFile $zip

if (Test-Path $pdDir) { Remove-Item $pdDir -Recurse -Force }
New-Item -ItemType Directory -Path $pdDir | Out-Null

Expand-Archive -LiteralPath $zip -DestinationPath $pdDir -Force
Remove-Item $zip -Force

# flatten nested directory
$top = Get-ChildItem $pdDir | Where-Object { $_.PSIsContainer } | Select-Object -First 1
if ($top) {
Get-ChildItem $top.FullName | Move-Item -Destination $pdDir -Force
Remove-Item $top.FullName -Recurse -Force
}

$pd = "$pdDir\bin\pd.com"
"PD=$pd" | Out-File -FilePath $env:GITHUB_ENV -Append
"PD=$pd" | Out-File -FilePath $env:GITHUB_OUTPUT -Append

- name: Download zerr-core library
uses: actions/download-artifact@v4
Expand All @@ -173,27 +188,49 @@ jobs:
run-id: ${{ github.event.workflow_run.id || inputs.core_run_id }}
github-token: ${{ github.token }}

# - name: Display structure of downloaded files
# run: ls -la core/lib/
# - name: Set up Conan
# shell: bash
# run: |
# pip install conan

# conan profile detect --name mingw --force

# PROFILE_PATH=$(conan profile path default)

# echo "Default profile path: $PROFILE_PATH"

# conan profile set settings.os=Windows mingw
# conan profile set settings.arch=x86_64 mingw
# conan profile set settings.compiler=gcc mingw
# conan profile set settings.compiler.version=13 mingw
# conan profile set settings.compiler.libcxx=libstdc++11 mingw
# conan profile set settings.build_type=Release mingw

# conan profile set conf.tools.build:compiler_executables.c=x86_64-w64-mingw32-gcc mingw
# conan profile set conf.tools.build:compiler_executables.cpp=x86_64-w64-mingw32-g++ mingw

# conan profile show mingw

# - name: Install Dependencies
# shell: bash
# working-directory: puredata
# run: |
# mkdir -p build
# conan install . --output-folder=build --build=missing -pr:b=mingw -pr:h=mingw

- name: Set up Conan
run: |
pip install conan
conan profile detect --name=mingw --force
conan profile update settings.compiler=gcc mingw
conan profile update settings.compiler.version=13 mingw
conan profile update settings.compiler.libcxx=libstdc++11 mingw
conan profile update settings.os=Windows mingw
conan profile update settings.arch=x86_64 mingw
conan profile update settings.build_type=Release mingw
conan profile detect --force

- name: Install Dependencies
working-directory: puredata
run: |
mkdir -p build
conan install . --output-folder=build --build=missing -pr:b=mingw -pr:h=mingw
mkdir build
conan install . -pr:h=./mingw-profile.txt -pr:b=./mingw-profile.txt --output-folder=build --build=missing

- name: Build External
shell: bash
working-directory: puredata
run: |
mingw32-make
Expand Down
1 change: 1 addition & 0 deletions puredata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CC = g++
cflags += -std=c++17 -Wall -DYAML_CPP_STATIC_DEFINE

include build/conandeps.mk

cflags += -I$(CONAN_INCLUDE_DIRS_YAML_CPP) -I$(CONAN_INCLUDE_DIRS_FFTW)
# ldflags = -L$(CONAN_LIB_DIRS_YAML_CPP) # Add library directories
# ldlibs = -l$(CONAN_LIBS_YAML_CPP) # Link the yaml-cpp library
Expand Down
13 changes: 13 additions & 0 deletions puredata/mingw-profile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[settings]
os=Windows
arch=x86_64
build_type=Release
compiler=gcc
compiler.version=13
compiler.libcxx=libstdc++11
compiler.threads=posix
compiler.exception=seh
compiler.cppstd=17

[conf]
tools.build:compiler_executables={"c":"x86_64-w64-mingw32-gcc","cpp":"x86_64-w64-mingw32-g++"}
Loading