-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (115 loc) · 5.87 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
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@v4
with:
name: artifact-${{matrix.csound-branch }}-${{ matrix.os }}-${{ matrix.python-version }}-${{ strategy.job-index}}
path: test/*.flac