Skip to content

Workflow file for this run

on: [push]
jobs:
alltest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
python-version: ["3.9", "3.12"]
install-method: ["git"]
csound-branch: ["csound6", "develop"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: linux setup csound6
if: runner.os == 'linux' && matrix.csound-branch == 'csound6'
run: |
sudo apt install csound libcsnd-dev
csound --version
- name: linux setup csound 7
if: runner.os == 'linux' && matrix.csound-branch == 'develop'
run: |
git clone -b develop https://github.com/csound/csound --depth 1
cd csound
sudo apt-get update && sudo apt-get install cmake libsndfile1-dev libasound2-dev libjack-dev portaudio19-dev libportmidi-dev libpulse-dev default-jdk liblo-dev libpng-dev libgmm++-dev bison flex libportsmf-dev libeigen3-dev libcunit1-dev
mkdir build && cd build
cmake .. -DUSE_MP3=OFF -DBUILD_OSC_OPCODES=OFF -DBUILD_TESTS=OFF -DBUILD_JAVA_INTERFACE=OFF
cmake --build . --parallel
sudo make install
# sudo cmake --install .
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
sudo ldconfig
csound --version
strace -f -t -e trace=file csound -+rtaudio=dummy --devices=out | grep "\.so" || echo ok
- name: macos - install csound 6
if: runner.os == 'macOS' && matrix.csound-branch == 'csound6'
run: |
curl -L -o csound6.18.dmg https://github.com/csound/csound/releases/download/6.18.1/Csound-MacOS-universal-6.18.1.dmg
brew install p7zip
7z x csound6.18.dmg
cd Csound-universal-6.18.1
sudo installer -pkg csound-MacOS-universal-6.18.1.pkg -target /
csound --version
cd ..
- name: macos setup csound 7
if: runner.os == 'macOS' && matrix.csound-branch == 'develop'
run: |
git clone -b develop https://github.com/csound/csound --depth 1
cd csound
brew install bison flex libmicrohttpd libogg flac lame libvorbis mpg123 opus libsndfile portaudio fluid-synth libaec libsamplerate aften liblo openblas portmidi
cmake -B build -DBUILD_TESTS=0 -DCUSTOM_CMAKE="../cmake/csound-custom-macos.cmake"
cmake --build build --config Release
sudo cmake --install build
csound --version
- name: windows setup csound 6
if: runner.os == 'windows' && matrix.csound-branch == 'csound6'
run: |
curl -L -o csound-binaries.zip https://github.com/csound/csound/releases/download/6.18.1/Csound-6.18.1-windows-x64-binaries.zip
Expand-Archive csound-binaries.zip -DestinationPath "C:/Program Files/csound-binaries"
ls -r "C:/Program Files/csound-binaries"
"C:/Program Files/csound-binaries/build/Release" | Out-File -FilePath $env:GITHUB_PATH -Append
[Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";C:/Program Files/csound-binaries/build/Release", [EnvironmentVariableTarget]::Machine)
$Env:Path = $Env:Path + ";C:/Program Files/csound-binaries/build/Release"
echo "$PATH"
# Write-Output $Env:PATH
csound.exe --version
# via https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: windows setup csound 7
if: runner.os == 'windows' && matrix.csound-branch == 'develop'
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
run: |
git clone -b develop https://github.com/csound/csound --depth 1
cd csound
git submodule update --init --recursive
choco install -y winflexbison3 innosetup
.\vcpkg\bootstrap-vcpkg.bat
cmake -B build -S . -DBUILD_TESTS=0 -DUSE_VCPKG=1 -DCUSTOM_CMAKE="./platform/windows/Custom-vs.cmake" -DBUILD_JAVA_INTERFACE=OFF -DBUILD_TESTS=OFF
cmake --build build --config Release
# ls -r .
New-Item -Type Directory -Force "C:/Program Files/csound"
cp build/Release/*.exe "C:/Program Files/csound"
cp build/Release/*.dll "C:/Program Files/csound"
cp build/Release/*.lib "C:/Program Files/csound"
$machinePath = [System.Environment]::GetEnvironmentVariable('PATH', 'Machine')
# [System.Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";C:/Program Files/csound", [EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable("PATH", $machinePath + ";C:/Program Files/csound", [EnvironmentVariableTarget]::Machine)
$Env:Path = $Env:Path + ";C:/Program Files/csound"
# Write-Output $Env:PATH
csound.exe --version
- name: install from repo
if: ${{ matrix.install-method == 'git' }}
run: |
pip install .
- name: install from pip
if: ${{ matrix.install-method == 'pip' }}
run: |
pip install libcsound
- name: test
run: |
cd test
python actions-test1.py -o actions-test1-${{ runner.os }}-${{ matrix.install-method }}-py${{ matrix.python-version }}-${{ matrix.csound-branch }}.flac
- uses: actions/upload-artifact@v3
with:
path: test/*.flac