forked from supercollider/supercollider
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 2.31 KB
/
test_macos.yml
File metadata and controls
62 lines (54 loc) · 2.31 KB
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
name: Test macOS
on:
workflow_call:
inputs:
sc-version:
required: true
type: string
jobs:
test-macos:
runs-on: macos-15
env:
INSTALL_PATH: ${{ github.workspace }}/build/Install
ARTIFACT_FILE: "SuperCollider-${{ inputs.sc-version }}-macOS-universal.dmg"
TESTS_PATH: ${{ github.workspace }}/testsuite/classlibrary
SCLANG: ${{ github.workspace }}/build/Install/SuperCollider/SuperCollider.app/Contents/MacOS/sclang
TEST_LIST_PROTO: ${{ github.workspace }}/testsuite/scripts/test_run_proto_gha.scd
TEST_LIST_RESULT: ${{ github.workspace }}/testsuite/scripts/run/gha_result.scxtar
SCRIPT_RUN_TESTS: ${{ github.workspace }}/testsuite/scripts/sclang_test_runner.scd
SCRIPT_PRINT_RESULTS: ${{ github.workspace }}/testsuite/scripts/print_results.scd
steps:
- uses: actions/checkout@v6
with:
submodules: false # don't need submodules for testing
- name: Download artifacts
uses: actions/download-artifact@v7
with:
name: ${{ env.ARTIFACT_FILE }}
path: ${{ env.INSTALL_PATH }}
- name: Extract artifact
run: |
cd "$INSTALL_PATH"
echo Contents of `pwd`:
ls
hdiutil attach $ARTIFACT_FILE
echo "mkdir SuperCollider"
mkdir SuperCollider
cp -R /Volumes/SuperCollider/* SuperCollider/
- name: Setup environment
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install coreutils # to get 'timeout' utility
- name: Grant microphone access # solution from https://github.com/actions/runner-images/issues/9330#issuecomment-1938616628
run: sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
- name: Run tests
shell: bash
continue-on-error: true
run: |
timeout 20m $SCLANG --include-path $TESTS_PATH $SCRIPT_RUN_TESTS $TEST_LIST_PROTO $TEST_LIST_RESULT
- name: Post test results
shell: bash
run: |
timeout 1m $SCLANG $SCRIPT_PRINT_RESULTS $TEST_LIST_RESULT