-
Notifications
You must be signed in to change notification settings - Fork 81
133 lines (116 loc) · 4.57 KB
/
test-mmedia.yml
File metadata and controls
133 lines (116 loc) · 4.57 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
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
name: Test Multimedia API
run-name: TestMultimedia_${{ github.ref_name }}_${{ vars.LIBRARY_VERSION }}_${{ github.run_number }}
on:
workflow_dispatch:
push:
branches:
- master
- develop
paths:
- 'DryWetMidi/**'
- 'DryWetMidi.Tests/**'
- 'DryWetMidi.Tests.Common/**'
- '.github/workflows/test-mmedia.yml'
- '.github/workflows/build-native-libs.yml'
- '.github/actions/**'
- 'Resources/Utilities/CreateLoopbackPort_Windows/**'
- 'Resources/Utilities/CreateLoopbackPort_macOS/**'
- 'Resources/Scripts/Setup MIDI ports.ps1'
- 'Resources/Native/**'
pull_request:
branches:
- develop
paths:
- 'DryWetMidi/**'
- 'DryWetMidi.Tests/**'
- 'DryWetMidi.Tests.Common/**'
- '.github/workflows/test-mmedia.yml'
- '.github/workflows/build-native-libs.yml'
- '.github/actions/**'
- 'Resources/Utilities/CreateLoopbackPort_Windows/**'
- 'Resources/Utilities/CreateLoopbackPort_macOS/**'
- 'Resources/Scripts/Setup MIDI ports.ps1'
- 'Resources/Native/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-native-libs:
name: Build Native Libraries
uses: ./.github/workflows/build-native-libs.yml
run-tests:
name: Run tests (${{ matrix.os }}, ${{ matrix.framework }})
needs: build-native-libs
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
#- os: windows-11-arm
# framework: Net
- os: macos-latest
framework: Net
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy native libraries
uses: ./.github/actions/copy-native-libraries
- name: Setup framework
id: framework
uses: ./.github/actions/setup-framework
with:
framework: ${{ matrix.framework }}
net-tfm: ${{ vars.BUILD_FRAMEWORK_NET_TFM || 'net8.0' }}
net-sdk-version: ${{ vars.BUILD_FRAMEWORK_NET_SDK_VERSION }}
netframework-tfm: ${{ vars.BUILD_FRAMEWORK_NETFRAMEWORK_TFM }}
netframework-sdk-version: ${{ vars.BUILD_FRAMEWORK_NETFRAMEWORK_SDK_VERSION }}
- name: Build tests
uses: ./.github/actions/build-tests
with:
tfm: ${{ steps.framework.outputs.tfm }}
configuration: ${{ vars.TEST_BUILD_CONFIGURATION || 'Release' }}
- name: Build test data sending utility
uses: ./.github/actions/build-test-data-sending-utility
with:
enabled: ${{ runner.os == 'macOS' }}
tfm: ${{ steps.framework.outputs.tfm }}
configuration: ${{ vars.TEST_BUILD_CONFIGURATION || 'Release' }}
suffix: _${{ matrix.os }}_${{ matrix.framework }}
- name: Create MIDI ports (Windows)
if: runner.os == 'Windows'
uses: ./.github/actions/create-ports-windows
with:
enabled: 'true'
ports-names: 'MIDI A,MIDI B,MIDI C'
- name: Create MIDI ports (macOS)
if: runner.os == 'macOS'
uses: ./.github/actions/create-ports-macos
with:
enabled: 'true'
- name: Run unit tests
continue-on-error: false
shell: pwsh
run: |
dotnet test DryWetMidi.Tests/Melanchall.DryWetMidi.Tests.csproj --blame --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type full --no-build --configuration ${{ vars.TEST_BUILD_CONFIGURATION || 'Release' }} --filter "(FullyQualifiedName~.Multimedia)" --framework ${{ steps.framework.outputs.tfm }} --verbosity normal --diag diagnostic.log --logger "console;verbosity=detailed" -p:SolutionDir="${{ github.workspace }}/"
- name: Collect logs
if: always()
uses: ./.github/actions/collect-logs
with:
suffix: _${{ matrix.os }}_${{ matrix.framework }}
- name: Upload PlaybackTraces
if: failure()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: PlaybackTraces_${{ matrix.os }}_${{ matrix.framework }}_Attempt${{ github.run_attempt }}
path: ${{ github.workspace }}/PlaybackTraces
if-no-files-found: ignore
- name: Upload SysExTraces
if: failure()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: SysExTraces_${{ matrix.os }}_${{ matrix.framework }}_Attempt${{ github.run_attempt }}
path: ${{ github.workspace }}/SysExTraces
if-no-files-found: ignore