Skip to content

use matrix for window tests #97

use matrix for window tests

use matrix for window tests #97

Workflow file for this run

on: [push]
jobs:
testwin:
name: Test maelzel on windows ${{ matrix.install-method }}
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
install-method: ["git", "pip"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: windows setup
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"
[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"
Write-Output $Env:PATH
csound.exe --version
mkdir artifacts
- name: install from repo
if: ${{ matrix.install-method }} == 'git'
run: |
pip install .
- name: install from pip
if: ${{ matrix.install-method }} == 'pip'
run: |
pip install maelzel
- name: test
run: |
$Env:Path = $Env:Path + ";C:\Program Files\csound-binaries\build\Release"
cd test
python test-rec.py -o test-rec--windows-${{ matrix.install-method }}.wav
python test-dependencies.py
python test-notation.py -o 'test-notation-windows-${{ matrix.install-method }}-${{ matrix.python-version }}.pdf'
cp *.wav ../artifacts
cp *.pdf ../artifacts
- uses: actions/upload-artifact@v3
with:
path: artifacts
testlinuxgit:
name: Test maelzel in linux (git)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: linux - setup
run: |
set -x
sudo apt update
sudo apt install lilypond
sudo apt install csound libcsnd-dev
csound --version
lilypond --version
- name: linux - test install from git
run: |
set -x
pip install .
mkdir -p artifacts
cd test
python test-rec.py -o test-rec--linuxgit.wav
python test-dependencies.py
python test-notation.py -o 'test-notation-linux-${{ matrix.python-version }}.pdf'
cp *.wav ../artifacts
cp *.pdf ../artifacts
cd ..
pip uninstall -y maelzel
- uses: actions/upload-artifact@v3
with:
path: artifacts
testlinuxpypi:
name: Test maelzel in linux (pypi)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: linux - setup
run: |
set -x
sudo apt update
sudo apt install lilypond
sudo apt install csound libcsnd-dev
csound --version
lilypond --version
- name: linux - test install from pypi
run: |
set -x
python -m venv maelzelenv
source maelzelenv/bin/activate
pip install maelzel
mkdir -p artifacts
cd test
python test-rec.py -o test-rec--linuxpip.wav
python test-dependencies.py
python test-notation.py -o 'test-notation-linux-${{ matrix.python-version }}.pdf'
cp *.wav ../artifacts
cp *.pdf ../artifacts
cd ..
deactivate
- uses: actions/upload-artifact@v3
with:
path: artifacts
testmacgit:
name: Test maelzel in mac (git)
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
arch: ["x86_64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: macos - setup
run: |
set -x
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 ..
# brew install lilypond
# lilypond --version
- name: macos - test install from git
run: |
set -x
pip install .
mkdir -p artifacts
cd test
python test-rec.py -o "test-rec-${{ matrix.python-version }}-${{ matrix.arch }}.wav"
python test-dependencies.py
python test-notation.py -o 'test-notation-macos-${{ matrix.python-version }}-${{ matrix.arch }}.pdf'
cp *.wav ../artifacts
cp *.pdf ../artifacts
cd ..
pip uninstall -y maelzel
- uses: actions/upload-artifact@v3
with:
path: artifacts
testmacpypi:
name: Test maelzel in mac (pypi)
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
arch: ["x86_64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: macos - setup
run: |
set -x
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 ..
brew install lilypond
lilypond --version
- name: macos - test install from pypi
run: |
set -x
python -m venv maelzelenv
source maelzelenv/bin/activate
pip install maelzel
mkdir -p artifacts
cd test
python test-rec.py
python test-dependencies.py
python test-notation.py -o 'test-notation-macos-${{ matrix.python-version }}.pdf'
cp *.wav ../artifacts
cp *.pdf ../artifacts
cd ..
deactivate
- uses: actions/upload-artifact@v3
with:
path: artifacts