Skip to content

prepare to 0.2 release #86

prepare to 0.2 release

prepare to 0.2 release #86

Workflow file for this run

name: C/C++ CI
on:
workflow_dispatch:
push:
branches: ["master"]
paths:
- '**/*.cpp'
pull_request:
branches: ["master"]
paths:
- '**/*.cpp'
env:
LIBNAME: partialtrack
jobs:
macos-universal-build:
runs-on: macos-latest
strategy:
matrix:
arch: [amd64, arm64]
precision: [32, 64]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install PureData and Deps
run: |
brew install pd
- name: Build Object for Arm
if: ${{ matrix.arch == 'arm64' }}
run: |
cd Libraries/agsl/ampl/thirdparty/asl
git checkout 2f5d9de
cd ../../../../..
cmake . -B build -DCMAKE_OSX_ARCHITECTURES=arm64 -DPD_FLOATSIZE=${{ matrix.precision }} -DPD_INSTALL_LIBS=True -DPDLIBDIR=./
cmake --build build -j $(sysctl -n hw.logicalcpu)
- name: Build Object for Intel
if: ${{ matrix.arch == 'amd64' }}
run: |
cmake . -B build -DPD_FLOATSIZE=${{ matrix.precision }} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DPD_INSTALL_LIBS=True -DPDLIBDIR=./
cmake --build build -j $(sysctl -n hw.logicalcpu)
- name: Upload Object
uses: actions/upload-artifact@v4
with:
name: ${{env.LIBNAME}}-macos-${{matrix.arch}}-${{matrix.precision}}
path: ${{env.LIBNAME}}
windows-build:
runs-on: windows-latest
strategy:
matrix:
compiler: [mingw] # CHANGE: Choose between a compiler, you don't need boths
arch: [amd64]
precision: [32, 64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- if: matrix.compiler == 'mingw'
name: Set up Msys2
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: make mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-cmake
update: false
# ──────────────────────────────────────
- name: Install winget
uses: Cyberboss/install-winget@v1
- name: Install PureData Float 32
if: matrix.precision == '32'
run: |
winget install -e --id MillerPuckette.PureData --accept-source-agreements
- name: Install PureData Float 64
if: matrix.precision == '64'
run: |
winget install -e --id MillerPuckette.Pd64 --accept-source-agreements
- name: Configure and build
shell: msys2 {0}
run: |
cmake . -B build -DPD_FLOATSIZE=${{ matrix.precision }} -DPD_INSTALL_LIBS=True -DPDLIBDIR=./
cmake --build build
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{env.LIBNAME}}-f${{ matrix.precision }}-windows-${{ matrix.compiler }}
path: ${{env.LIBNAME}}
linux-build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, aarch64, arm]
precision: [32, 64]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: PureData Sources
run: |
sudo apt update
sudo add-apt-repository ppa:pure-data/pure-data -y
sudo apt install puredata -y
- name: Install aarch64 gcc
if: matrix.arch == 'aarch64'
run: |
sudo apt install gcc-aarch64-linux-gnu -y
sudo apt install g++-aarch64-linux-gnu -y
- name: Install arm gcc
if: matrix.arch == 'arm'
run: |
sudo apt install gcc-arm-linux-gnueabihf -y
sudo apt install g++-arm-linux-gnueabihf -y
- name: Build Object
if: matrix.arch == 'amd64'
run: |
cmake . -B build -DPD_FLOATSIZE=${{ matrix.precision }} -DPD_INSTALL_LIBS=True -DPDLIBDIR=./
cmake --build build -- -j$(nproc)
- name: Build Object
if: matrix.arch == 'aarch64'
run: |
cmake . -B build -DPD_FLOATSIZE=${{ matrix.precision }} -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DPD_INSTALL_LIBS=True -DPDLIBDIR=./
cmake --build build -- -j$(nproc)
- name: Build Object
if: matrix.arch == 'arm'
run: |
cmake . -B build -DPD_FLOATSIZE=${{ matrix.precision }} -DCMAKE_SYSTEM_PROCESSOR=arm -DPD_INSTALL_LIBS=True -DPDLIBDIR=./
cmake --build build -- -j$(nproc)
- name: Upload Object
uses: actions/upload-artifact@v4
with:
name: ${{ env.LIBNAME }}-linux-${{matrix.arch}}-${{matrix.precision}}
path: ${{env.LIBNAME}}
package-artifacts:
needs: [macos-universal-build, windows-build, linux-build]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: '${{ env.LIBNAME }}-*'
path: artifacts
merge-multiple: true
- name: Clear tmp files
run: rm -f artifacts/*.pdb
- name: Upload artifacts zip
uses: actions/upload-artifact@v4
with:
name: ${{env.LIBNAME}}-ALL-binaries
path: artifacts