start testing macos #18
This file contains 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
on: [push] | |
jobs: | |
alltest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# os: ["windows-latest", "ubuntu-latest", "macos-latest"] | |
os: ["macos-latest"] | |
python-version: ["3.12"] | |
install-method: ["git"] | |
# csound-branch: ["csound6", "develop"] | |
csound-branch: ["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 swig liblua5.1-0-dev default-jdk libfltk1.1-dev libfluidsynth-dev liblo-dev fluid ladspa-sdk libpng-dev dssi-dev libstk0-dev libgmm++-dev bison flex libportsmf-dev libeigen3-dev libcunit1-dev | |
mkdir build && cd build | |
cmake .. -DUSE_MP3=0 | |
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: | | |
brew install --HEAD csound | |
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 | |
- name: install from repo | |
if: ${{ matrix.install-method == 'git' }} | |
run: | | |
pip install . | |
- name: install from pip | |
if: ${{ matrix.install-method == 'pip' }} | |
run: | | |
pip install ctcsound7 | |
- 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 |