-
-
Notifications
You must be signed in to change notification settings - Fork 17
87 lines (70 loc) · 2.38 KB
/
ci.yml
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
name: CI
on:
workflow_dispatch:
push:
pull_request:
branches:
- main
- next
env:
CMAKE_BUILD_PARALLEL_LEVEL: 3 # Use up to 3 cpus to build juceaide, etc
concurrency:
group: ${{ github.workflow }}.${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
BuildAndTest:
name: ${{ matrix.os }} ${{ matrix.app }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
app: [ member_enabled, member_disabled, unique_ptr_enabled, unique_ptr_disabled ]
os: [ macos-14, windows-2022, ubuntu-latest ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Linux Deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt install libasound2-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libfreetype6-dev libglu1-mesa-dev libjack-jackd2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
# This block can be removed once 15.1 is default (JUCE requires it when building on macOS 14)
- name: Use latest Xcode on system (macOS)
if: ${{ matrix.os == 'macos-14' }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Configure
run: cmake -B Builds -DTARGET_NAME:STRING=${{ matrix.app }}
- name: Build
run: cmake --build Builds --parallel 4
- name: Run
if: ${{ matrix.os == 'macos-latest' }}
working-directory: Builds/${{ matrix.app }}_artefacts
timeout-minutes: 2
run: |
ls -ahl
${{ matrix.app }}.app/Contents/MacOS/${{ matrix.app }} &
- name: Run
if: ${{ matrix.os == 'windows-latest' }}
working-directory: Builds/${{ matrix.app }}_artefacts
timeout-minutes: 2
run: |
ls -ahl
./Debug/${{ matrix.app }}.exe &
- uses: OrbitalOwen/desktop-screenshot-action@0.1
if: ${{ matrix.os == 'windows-latest' }}
with:
file-name: ${{ matrix.os }}-${{matrix.app}}.jpg