Skip to content

MIDIVisualizer 7.2

MIDIVisualizer 7.2 #15

Workflow file for this run

name: Release
on:
release:
types:
- published
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-20.04
cmake-opts: -D CMAKE_C_COMPILER=gcc-9 -D CMAKE_CXX_COMPILER=g++-9
artifact_name: build/MIDIVisualizer
asset_name: MIDIVisualizer-ubuntu20.zip
ffmpeg-archive: ffmpeg-ubuntu20-64-static-lgpl.zip
- os: windows-2019
cmake-opts: -A x64
artifact_name: build/Release/MIDIVisualizer.exe
asset_name: MIDIVisualizer-windows-64bits.zip
ffmpeg-archive: ffmpeg-windows-64-static-lgpl.zip
- os: macos-11
cmake-opts: -G Xcode
artifact_name: build/Release/MIDIVisualizer.app
asset_name: MIDIVisualizer-macos.zip
ffmpeg-archive: ffmpeg-osx-uni64-static-lgpl.zip
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Dependencies-ubuntu
if: startsWith(matrix.os, 'ubuntu')
shell: bash
run: sudo apt-get update -y && sudo apt-get install -yq xorg-dev libgtk-3-dev libasound2-dev libnotify-dev
- name: Dependencies-macos
if: startsWith(matrix.os, 'macos')
shell: bash
run: brew install wget
- name: Dependencies-windows
if: startsWith(matrix.os, 'windows')
shell: bash
run: choco install wget unzip zip
- name: Dependencies
shell: bash
run: |
cd $GITHUB_WORKSPACE/libs
wget -O ffmpeg.zip https://github.com/kosua20/MIDIVisualizer-dependencies/releases/latest/download/${{matrix.ffmpeg-archive}}
unzip ffmpeg.zip
rm ffmpeg.zip
cp ffmpeg/share/ffmpeg/FindFFMPEG.cmake ./
- name: Configure
shell: bash
working-directory: ${{runner.workspace}}
run: |
cmake -E make_directory ${{runner.workspace}}/build
cmake -S $GITHUB_WORKSPACE -B build/ -DCMAKE_BUILD_TYPE=Release ${{matrix.cmake-opts}}
- name: Build
working-directory: ${{runner.workspace}}
shell: bash
run: cmake --build build/ --config Release
- name: Package-ubuntu
if: startsWith(matrix.os, 'ubuntu')
working-directory: ${{runner.workspace}}
shell: bash
run: sh $GITHUB_WORKSPACE/libs/package-ubuntu.sh ${{runner.workspace}}/${{matrix.artifact_name}} $GITHUB_WORKSPACE ${{runner.workspace}}/release.zip
- name: Package-macos
if: startsWith(matrix.os, 'macos')
working-directory: ${{runner.workspace}}
shell: bash
run: sh $GITHUB_WORKSPACE/libs/package-macos.sh ${{runner.workspace}}/${{matrix.artifact_name}} $GITHUB_WORKSPACE ${{runner.workspace}}/release.zip
- name: Package-windows
if: startsWith(matrix.os, 'windows')
working-directory: ${{runner.workspace}}
shell: bash
run: zip -j release.zip ${{matrix.artifact_name}}
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{runner.workspace}}/release.zip
asset_name: ${{matrix.asset_name}}
asset_content_type: application/zip