66 pull_request :
77 branches : [ main ]
88 workflow_dispatch :
9+ workflow_call :
910
1011jobs :
1112 build-and-test :
@@ -17,72 +18,96 @@ jobs:
1718 runs-on : ${{ matrix.os }}
1819
1920 steps :
20- - name : Checkout code
21- uses : actions/checkout@v4
22- with :
23- submodules : recursive
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+ with :
24+ submodules : recursive
2425
25- - name : Install dependencies (Linux)
26- if : runner.os == 'Linux'
27- run : |
28- sudo apt-get update
29- sudo apt-get install -y \
30- build-essential \
31- cmake \
32- ninja-build \
33- libasound2-dev \
34- libjack-jackd2-dev \
35- ladspa-sdk \
36- libcurl4-openssl-dev \
37- libfontconfig1-dev \
38- libfreetype6-dev \
39- libx11-dev \
40- libxcomposite-dev \
41- libxcursor-dev \
42- libxext-dev \
43- libxinerama-dev \
44- libxrandr-dev \
45- libxrender-dev \
46- libglu1-mesa-dev \
47- mesa-common-dev
26+ - name : Install dependencies (Linux)
27+ if : runner.os == 'Linux'
28+ run : |
29+ sudo apt-get update
30+ sudo apt-get install -y \
31+ build-essential \
32+ cmake \
33+ ninja-build \
34+ libasound2-dev \
35+ libjack-jackd2-dev \
36+ ladspa-sdk \
37+ libcurl4-openssl-dev \
38+ libfontconfig1-dev \
39+ libfreetype6-dev \
40+ libx11-dev \
41+ libxcomposite-dev \
42+ libxcursor-dev \
43+ libxext-dev \
44+ libxinerama-dev \
45+ libxrandr-dev \
46+ libxrender-dev \
47+ libglu1-mesa-dev \
48+ mesa-common-dev
4849
49- - name : Install dependencies (macOS)
50- if : runner.os == 'macOS'
51- run : |
52- brew install cmake ninja
50+ - name : Install dependencies (macOS)
51+ if : runner.os == 'macOS'
52+ run : |
53+ brew install cmake ninja
5354
54- - name : Install dependencies (Windows)
55- if : runner.os == 'Windows'
56- run : |
57- choco install cmake ninja -y
55+ - name : Install dependencies (Windows)
56+ if : runner.os == 'Windows'
57+ run : |
58+ choco install cmake ninja -y
5859
59- - name : Setup MSVC environment (Windows)
60- if : runner.os == 'Windows'
61- uses : ilammy/msvc-dev-cmd@v1
62- with :
63- arch : x64
60+ - name : Setup MSVC environment (Windows)
61+ if : runner.os == 'Windows'
62+ uses : ilammy/msvc-dev-cmd@v1
63+ with :
64+ arch : x64
6465
65- - name : Configure CMake (Windows)
66- if : runner.os == 'Windows'
67- run : |
68- cmake -B build -G Ninja `
69- -DCMAKE_C_COMPILER=cl `
70- -DCMAKE_CXX_COMPILER=cl `
71- -DCMAKE_BUILD_TYPE=Release
66+ - name : Configure CMake (Windows)
67+ if : runner.os == 'Windows'
68+ run : |
69+ cmake -B build -G Ninja `
70+ -DCMAKE_C_COMPILER=cl `
71+ -DCMAKE_CXX_COMPILER=cl `
72+ -DCMAKE_BUILD_TYPE=Release
7273
73- - name : Configure CMake (macOS)
74- if : runner.os == 'macOS'
75- run : cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/"
74+ - name : Configure CMake (macOS)
75+ if : runner.os == 'macOS'
76+ run : cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/"
7677
77- - name : Configure CMake (Linux)
78- if : runner.os == 'Linux'
79- run : cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
78+ - name : Configure CMake (Linux)
79+ if : runner.os == 'Linux'
80+ run : cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
8081
81- - name : Build
82- run : cmake --build build --config Release
82+ - name : Build
83+ run : cmake --build build --config Release
8384
84- - name : Run tests
85- run : ctest --test-dir build --output-on-failure
85+ - name : Run tests
86+ run : ctest --test-dir build --output-on-failure
8687
87- - name : Installer
88- run : cmake --build build --target installer --config Release
88+ - name : Installer
89+ run : cmake --build build --target installer --config Release
90+
91+ - name : Upload artifact (macOS)
92+ if : runner.os == 'macOS'
93+ uses : actions/upload-artifact@v4
94+ with :
95+ name : package-macos
96+ path : build/virtual-midi-controller*.dmg
97+ if-no-files-found : error
98+
99+ - name : Upload artifact (Linux)
100+ if : runner.os == 'Linux'
101+ uses : actions/upload-artifact@v4
102+ with :
103+ name : package-linux
104+ path : build/virtual-midi-controller*.deb
105+ if-no-files-found : error
106+
107+ - name : Upload artifact (Windows)
108+ if : runner.os == 'Windows'
109+ uses : actions/upload-artifact@v4
110+ with :
111+ name : package-windows
112+ path : build/virtual-midi-controller*.zip
113+ if-no-files-found : error
0 commit comments