|
| 1 | +name: CI |
| 2 | + |
| 3 | +# Builds ReceiveMIDI on macOS, Linux and Windows and smoke-checks the binary. |
| 4 | +# JUCE is vendored under JuceLibraryCode/modules, so no framework needs to be |
| 5 | +# fetched -- the committed Projucer build files are used as-is. A unit-test suite |
| 6 | +# will be run here once it exists. |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: [ master ] |
| 11 | + pull_request: |
| 12 | + workflow_dispatch: |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 16 | + cancel-in-progress: true |
| 17 | + |
| 18 | +jobs: |
| 19 | + build: |
| 20 | + name: ${{ matrix.name }} |
| 21 | + runs-on: ${{ matrix.os }} |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + include: |
| 26 | + - { os: macos-latest, name: macOS } |
| 27 | + - { os: ubuntu-latest, name: Linux } |
| 28 | + - { os: windows-latest, name: Windows } |
| 29 | + |
| 30 | + steps: |
| 31 | + - name: Checkout |
| 32 | + uses: actions/checkout@v5 |
| 33 | + |
| 34 | + # ---------------------------------------------------------------- macOS |
| 35 | + - name: Build (macOS) |
| 36 | + if: runner.os == 'macOS' |
| 37 | + run: | |
| 38 | + xcodebuild -project Builds/MacOSX/receivemidi.xcodeproj \ |
| 39 | + -target "receivemidi - ConsoleApp" -configuration Release SYMROOT=build build |
| 40 | +
|
| 41 | + - name: Smoke test (macOS) |
| 42 | + if: runner.os == 'macOS' |
| 43 | + run: ./Builds/MacOSX/build/Release/receivemidi --version | grep -q "receivemidi v" |
| 44 | + |
| 45 | + # ---------------------------------------------------------------- Linux |
| 46 | + - name: Install Linux dependencies |
| 47 | + if: runner.os == 'Linux' |
| 48 | + run: sudo apt-get update && sudo apt-get install -y libasound2-dev |
| 49 | + |
| 50 | + - name: Build (Linux) |
| 51 | + if: runner.os == 'Linux' |
| 52 | + run: make -C Builds/LinuxMakefile CONFIG=Release -j"$(nproc)" |
| 53 | + |
| 54 | + - name: Smoke test (Linux) |
| 55 | + if: runner.os == 'Linux' |
| 56 | + run: ./Builds/LinuxMakefile/build/receivemidi --version | grep -q "receivemidi v" |
| 57 | + |
| 58 | + # -------------------------------------------------------------- Windows |
| 59 | + - name: Add MSBuild to PATH |
| 60 | + if: runner.os == 'Windows' |
| 61 | + uses: microsoft/setup-msbuild@v3 |
| 62 | + |
| 63 | + - name: Build (Windows) |
| 64 | + if: runner.os == 'Windows' |
| 65 | + # the committed project targets the v141 toolset (VS2017); build with the |
| 66 | + # runner's current toolset so no legacy build tools need installing |
| 67 | + run: msbuild Builds/VisualStudio2017/receivemidi.sln /m /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 |
| 68 | + |
| 69 | + - name: Smoke test (Windows) |
| 70 | + if: runner.os == 'Windows' |
| 71 | + shell: bash |
| 72 | + run: ./Builds/VisualStudio2017/x64/Release/ConsoleApp/receivemidi.exe --version | grep -q "receivemidi v" |
0 commit comments