-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (93 loc) · 3.91 KB
/
Copy pathtest.yml
File metadata and controls
108 lines (93 loc) · 3.91 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
99
100
101
102
103
104
105
106
107
108
name: plugdata tests
# Manual trigger only (Actions tab -> "plugdata tests" -> "Run workflow").
on:
workflow_dispatch:
inputs:
branch:
description: "plugdata branch to clone and test"
default: "develop"
required: true
enable_asan:
description: "Build with AddressSanitizer"
type: boolean
default: true
env:
PLUGDATA_REPO: https://github.com/plugdata-team/plugdata.git
CMAKE_BUILD_PARALLEL_LEVEL: 4
jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
# The end-to-end suite (incl. helpfile fuzzers) under ASAN can take a while.
timeout-minutes: 300
strategy:
fail-fast: false
matrix:
include:
- name: Linux
runs-on: ubuntu-24.04
platform: linux
cmake_extra: ""
- name: macOS
runs-on: macos-latest
platform: macos
cmake_extra: ""
- name: Windows
runs-on: windows-2022
platform: windows
# Windows runs without Sfizz because that breaks std::string and std::vector annotations for ASAN
cmake_extra: "-DENABLE_SFIZZ=0 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_FLAGS:STRING=' /bigobj' -DCMAKE_CXX_FLAGS:STRING=' /bigobj /EHsc'"
steps:
- name: Checkout this repo
uses: actions/checkout@v4
# ---- Dependencies -------------------------------------------------
- name: Install dependencies (Linux)
if: matrix.platform == 'linux'
run: |
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive TZ="Europe/Amsterdam" apt install -y cmake git wget bzip2 build-essential libasound2-dev libjack-jackd2-dev curl libcurl4-openssl-dev libfreetype6-dev libx11-dev libxi-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxrandr-dev libxkbcommon-dev libxinerama-dev ccache python3 python3-pip freeglut3-dev unzip ninja-build libfontconfig-dev libwayland-dev libdecor-0-dev libegl1-mesa-dev
- name: Install dependencies (macOS)
if: matrix.platform == 'macos'
run: brew install ninja ccache
- name: Set up MSVC environment (Windows)
if: matrix.platform == 'windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Ninja (Windows)
if: matrix.platform == 'windows'
uses: seanmiddleditch/gha-setup-ninja@v5
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.name }}
max-size: 1200M
# ---- Clone plugdata (with its own submodules) ---------------------
- name: Clone plugdata (${{ github.event.inputs.branch }})
shell: bash
run: |
git clone \
--branch "${{ github.event.inputs.branch }}" \
--depth 1 \
--recurse-submodules --shallow-submodules \
"$PLUGDATA_REPO" plugdata
echo "Cloned $(git -C plugdata rev-parse HEAD) on branch ${{ github.event.inputs.branch }}"
# ---- Configure + build the standalone -----------------------------
- name: Configure
working-directory: plugdata
run: |
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=1 -DENABLE_ASAN=${{ github.event.inputs.enable_asan }} -DENABLE_GEM=0 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${{ matrix.cmake_extra }}
- name: Build standalone
working-directory: plugdata
run: cmake --build build --target plugdata_standalone
# ---- Run the test suite -------------------------------------------
- name: Run tests
shell: bash
run: bash "${GITHUB_WORKSPACE}/run-and-check.sh"
- name: Upload test log
if: always()
uses: actions/upload-artifact@v4
with:
name: test-output-${{ matrix.name }}
path: test-output.log
if-no-files-found: ignore