build pd-lib-builder based pure data externals #46
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 pd-lib-builder based pure data externals | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| # push: | |
| # branches: | |
| # - main | |
| # paths: | |
| # - 'puredata/**' # Trigger when Pure Data related code changes | |
| workflow_run: | |
| workflows: ["build zerr-core static library"] | |
| types: | |
| - completed | |
| jobs: | |
| macOS: | |
| runs-on: macos-latest | |
| env: | |
| cflags: -mmacosx-version-min=10.9 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Download zerr-core library | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: zerr-core-macos | |
| path: core/lib/ | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ github.token }} | |
| - name: Display structure of downloaded files | |
| run: ls -R core/lib/ | |
| - name: Install Pure Data | |
| run: brew install --cask pd | |
| - name: Set up Conan | |
| run: | | |
| pip install conan | |
| conan profile detect | |
| - name: Configure Conan | |
| working-directory: puredata | |
| run: | | |
| conan install . --output-folder=build --build=missing | |
| - name: Build & Install | |
| working-directory: puredata | |
| run: | | |
| make | |
| make install PDLIBDIR=build | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zerr-pd-macos | |
| path: puredata/build/zerr | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Download zerr-core library | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: zerr-core-linux | |
| path: core/lib/ | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ github.token }} | |
| - name: Display structure of downloaded files | |
| run: ls -R core/lib/ | |
| - name: Install Pure Data | |
| run: sudo apt update && sudo apt install puredata-dev | |
| - name: Set up Conan | |
| run: | | |
| pip install conan | |
| conan profile detect | |
| - name: Configure Conan | |
| working-directory: puredata | |
| run: | | |
| conan install . --output-folder=build --build=missing | |
| - name: Build & Install | |
| working-directory: puredata | |
| run: | | |
| make | |
| make install PDLIBDIR=build | |
| - name: Upload Linux artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zerr-pd-linux | |
| path: puredata/build/zerr | |
| # windows: | |
| # runs-on: windows-latest | |
| # steps: | |
| # - name: Checkout Code | |
| # uses: actions/checkout@v3 | |
| # with: | |
| # submodules: true | |
| # - name: Download zerr-core library | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # name: zerr-core-windows | |
| # path: core/lib/ | |
| # run-id: ${{ github.event.workflow_run.id }} | |
| # github-token: ${{ github.token }} | |
| # - name: Display structure of downloaded files | |
| # run: dir core\lib\ | |
| # - name: Install Pure Data | |
| # run: | | |
| # Invoke-WebRequest -Uri "https://msp.ucsd.edu/Software/pd-0.53-2.msw.zip" -OutFile "pd.zip" | |
| # Expand-Archive -Path "pd.zip" -DestinationPath "C:\" | |
| # echo "C:\pd\bin" | Out-File -FilePath $env:GITHUB_PATH -Append | |
| # - name: Set up Conan | |
| # run: | | |
| # pip install conan | |
| # conan profile detect | |
| # - name: Configure Conan | |
| # working-directory: puredata | |
| # run: | | |
| # mkdir build -Force | |
| # conan install . --output-folder=build --build=missing | |
| # - name: Build Pure Data Externals | |
| # working-directory: puredata | |
| # run: | | |
| # $env:PATH += ";C:\pd\bin" | |
| # make PDINCLUDEDIR=C:\pd\src | |
| # - name: Install Pure Data Externals | |
| # working-directory: puredata | |
| # run: | | |
| # make install PDLIBDIR=build | |
| # - name: Upload Windows artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: zerr-pd-windows | |
| # path: puredata/build/zerr | |
| windows: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: Install MSYS2 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| release: false | |
| path-type: inherit | |
| install: >- | |
| mingw-w64-x86_64-ntldd-git | |
| - name: Find usable compiler | |
| id: compiler | |
| run: | | |
| for cc in cc gcc clang; do echo "testing compiler $cc"; "${cc}" -dumpmachine && export CC=${CC:-$cc} || true; done | |
| echo "CC=${CC}" | tee "$GITHUB_OUTPUT" | |
| - name: Install Pd | |
| id: pd | |
| 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" | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Download zerr-core library | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: zerr-core-windows | |
| path: core/lib/ | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ github.token }} | |
| - name: Display structure of downloaded files | |
| run: ls -la core/lib/ | |
| - name: Set up Conan | |
| run: | | |
| pip install conan | |
| conan profile detect | |
| - name: Configure Conan | |
| working-directory: puredata | |
| run: | | |
| mkdir -p build | |
| conan install . --output-folder=build --build=missing | |
| - name: Build & Install | |
| working-directory: puredata | |
| run: | | |
| make | |
| make install PDLIBDIR=build | |
| - name: Upload Windows artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zerr-pd-windows | |
| path: puredata/build/zerr | |