-
Notifications
You must be signed in to change notification settings - Fork 31
98 lines (81 loc) · 3.64 KB
/
Copy pathci.yml
File metadata and controls
98 lines (81 loc) · 3.64 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
name: CI
# Builds ReceiveMIDI and its unit-test suite on macOS, Linux and Windows, then
# runs the tests and smoke-checks the binary. JUCE is vendored under
# JuceLibraryCode/modules, so no framework needs to be fetched -- the committed
# Projucer build files are used as-is.
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: macos-latest, name: macOS }
- { os: ubuntu-latest, name: Linux }
- { os: windows-latest, name: Windows }
steps:
- name: Checkout
uses: actions/checkout@v5
# ---------------------------------------------------------------- macOS
- name: Build (macOS)
if: runner.os == 'macOS'
run: |
xcodebuild -project Builds/MacOSX/receivemidi.xcodeproj \
-target "receivemidi - ConsoleApp" -configuration Release SYMROOT=build build
xcodebuild -project Tests/Builds/MacOSX/ReceiveMIDITests.xcodeproj \
-target "ReceiveMIDITests - ConsoleApp" -configuration Release SYMROOT=build build
- name: Run tests (macOS)
if: runner.os == 'macOS'
run: ./Tests/Builds/MacOSX/build/Release/ReceiveMIDITests
- name: Smoke test (macOS)
if: runner.os == 'macOS'
run: ./Builds/MacOSX/build/Release/receivemidi --version | grep -q "receivemidi v"
- name: End-to-end test (macOS)
if: runner.os == 'macOS'
# sends through a virtual MIDI port with sendmidi and checks what
# receivemidi prints; the script skips cleanly if the runner has no MIDI
run: |
brew install gbevin/tools/sendmidi
./Scripts/e2e-test.sh ./Builds/MacOSX/build/Release/receivemidi
# ---------------------------------------------------------------- Linux
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libasound2-dev
- name: Build (Linux)
if: runner.os == 'Linux'
run: |
make -C Builds/LinuxMakefile CONFIG=Release -j"$(nproc)"
make -C Tests/Builds/LinuxMakefile CONFIG=Release -j"$(nproc)"
- name: Run tests (Linux)
if: runner.os == 'Linux'
run: ./Tests/Builds/LinuxMakefile/build/ReceiveMIDITests
- name: Smoke test (Linux)
if: runner.os == 'Linux'
run: ./Builds/LinuxMakefile/build/receivemidi --version | grep -q "receivemidi v"
# -------------------------------------------------------------- Windows
- name: Add MSBuild to PATH
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v3
- name: Build (Windows)
if: runner.os == 'Windows'
# the committed projects target the v141 toolset (VS2017); build with the
# runner's current toolset so no legacy build tools need installing
run: |
msbuild Builds/VisualStudio2017/receivemidi.sln /m /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143
msbuild Tests/Builds/VisualStudio2017/ReceiveMIDITests.sln /m /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143
- name: Run tests (Windows)
if: runner.os == 'Windows'
run: .\Tests\Builds\VisualStudio2017\x64\Release\ConsoleApp\ReceiveMIDITests.exe
- name: Smoke test (Windows)
if: runner.os == 'Windows'
shell: bash
run: ./Builds/VisualStudio2017/x64/Release/ConsoleApp/receivemidi.exe --version | grep -q "receivemidi v"