Skip to content

Commit

Permalink
Pin SuperCollider to 3.13 (#382)
Browse files Browse the repository at this point in the history
* Pin SuperCollider to 3.13

* Install blackhole

* Harden test

* Comment out

* Only print log on error

* Remember to re-error

* Debug Jack

* Add OS check

* Increase sleep times

* Move jack setup before SC build
  • Loading branch information
josephine-wolf-oberholtzer authored Apr 15, 2024
1 parent f40e28a commit d204561
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 25 deletions.
49 changes: 28 additions & 21 deletions .github/actions/supercollider/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
branch:
description: SuperCollider branch
required: false
default: Version-3.13.0
default: develop
origin:
description: SuperCollider repo origin
required: false
Expand All @@ -16,15 +16,6 @@ runs:
id: current-date
run: echo "stamp=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT
shell: bash
- name: Clone SuperCollider
run: |
git clone \
--quiet \
--recursive \
--branch ${{ inputs.branch }} \
${{ inputs.origin }} \
/tmp/supercollider
shell: bash
- name: '[macOS] Cache Homebrew'
id: cache-homebrew
if: runner.os == 'macOS'
Expand Down Expand Up @@ -74,6 +65,32 @@ runs:
fftw \
jack \
portaudio
# brew install --cask blackhole-16ch
shell: bash
- name: Setup Jack
run: |
echo "Setting up Jack..."
if [ "$RUNNER_OS" == "Linux" ]; then
sudo usermod -a -G audio ${USER}
fi
sleep 5
echo "Starting Jack..."
sudo -E su ${USER} -c "jackd -r -ddummy -r44100 -p1024" &
echo "Waiting for Jack..."
sleep 5
shell: bash
- name: '[macOS] Debug Jack'
if: runner.os == 'macOS'
run: system_profiler -json | jq .SPAudioDataType
shell: bash
- name: Clone SuperCollider
run: |
git clone \
--quiet \
--recursive \
--branch ${{ inputs.branch }} \
${{ inputs.origin }} \
/tmp/supercollider
shell: bash
- name: '[Linux] Configure'
if: runner.os == 'Linux'
Expand Down Expand Up @@ -121,7 +138,7 @@ runs:
if: runner.os == 'Linux'
run: |
cd /tmp/supercollider/build
sudo make install -j2
sudo make install -j2 > build.log || (cat build.log && false)
mkdir -p /home/runner/.local/share/SuperCollider/synthdefs
shell: bash
- name: '[macOS] Install'
Expand All @@ -134,16 +151,6 @@ runs:
- name: Debug ccache
run: ccache --show-stats --show-config
shell: bash
- name: Setup Jack
run: |
echo "Setting up Jack..."
if [ "$RUNNER_OS" == "Linux" ]; then
sudo usermod -a -G audio ${USER}
fi
sleep 1
sudo -E su ${USER} -c "jackd -r -ddummy -r44100 -p1024" &
sleep 1
shell: bash
- name: Sanity-check scsynth
run: |
echo "Sanity-checking scsynth..."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
SC_ORIGIN: https://github.com/supercollider/supercollider.git
SC_BRANCH: develop
SC_BRANCH: Version-3.13.0

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
7 changes: 4 additions & 3 deletions tests/contexts/test_Server_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,17 @@ async def test_query_version(context):
stdout = completed_subprocess.stdout
line = completed_subprocess.stdout.splitlines()[0]
print(stdout, line)
(program_name, major, minor, patch, branch, commit) = re.match(
r"(\w+) (\d+)\.(\d+)(\.[\w-]+) \(Built from branch '([\W\w]+)' \[([\W\w]+)\]\)",
groups = re.match(
r"(\w+) (\d+)\.(\d+)(\.[\w-]+) \(Built from (?:branch|tag) '([\W\w]+)' \[([\W\w]+)\]\)",
line,
).groups()
program_name, major, minor, patch, ref, commit = groups
expected_info = VersionInfo(
program_name=program_name,
major=int(major),
minor=int(minor),
patch=patch,
branch=branch,
branch=ref,
commit=commit,
)
assert await get(context.query_version()) == expected_info
Expand Down

0 comments on commit d204561

Please sign in to comment.