-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (121 loc) · 3.81 KB
/
compile.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
name: PsyLib compilation and test
run-name: ${{ github.actor }} is compiling and testing PsyLib
on:
push:
branches: [develop, main]
pull_request:
branches: [develop, main]
workflow_dispatch:
branches: [develop]
jobs:
Compile-psy-lib-Linux:
strategy:
matrix:
compiler: [gcc, clang]
buildtype: [debug, release]
runs-on: ubuntu-22.04
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >
libglib2.0-dev
libgtk-4-dev
libcunit1-dev
libasound-dev
portaudio19-dev
libboost-all-dev
libunwind-dev
libgstreamer1.0-dev
libgstreamer-plugins-good1.0-dev
libgstreamer-plugins-base1.0-dev
gstreamer1.0-plugins-good1.0-dev
gstreamer1.0-plugins-base1.0-dev
version: 1.0.4
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: '3.10'
cache: 'pip'
- name: Install pip packages
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
- name: configure_for_gcc
if: ${{matrix.compiler == 'gcc'}}
run: meson setup --buildtype=${{ matrix.buildtype}} --werror build/
env:
CC: gcc
CXX: g++
- name: configure_for_clang
if: ${{matrix.compiler == 'clang'}}
run: meson setup --buildtype=${{ matrix.buildtype}} --werror build/
env:
CC: clang
CXX: clang++
- name: Build
run: xvfb-run meson compile -C build/
- name: C Unit tests
run: |
meson devenv -C build meson test
- uses: actions/upload-artifact@v4
if: '!cancelled()'
with:
name: Linux_meson_testlog-${{matrix.buildtype}}-${{matrix.compiler}}
path: build/meson-logs/
- uses: actions/upload-artifact@v4
if: '!cancelled()'
with:
name: Linux_tmp_log-${{matrix.buildtype}}-${{matrix.compiler}}
path: /tmp/psy-unit-tests
# see https://mesonbuild.com/Continuous-Integration.html
Compile-psylib-windows:
strategy:
matrix:
buildtype: [debug, release]
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >
git
mingw-w64-ucrt-x86_64-python
mingw-w64-ucrt-x86_64-python-pip
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-glib2
mingw-w64-ucrt-x86_64-gstreamer
mingw-w64-ucrt-x86_64-gst-plugins-base
mingw-w64-ucrt-x86_64-gst-plugins-good
mingw-w64-ucrt-x86_64-gtk4
mingw-w64-ucrt-x86_64-libepoxy
mingw-w64-ucrt-x86_64-portaudio
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-gobject-introspection
mingw-w64-ucrt-x86_64-cunit
mingw-w64-ucrt-x86_64-gi-docgen
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-meson
mingw-w64-ucrt-x86_64-ninja
mingw-w64-ucrt-x86_64-python-gobject
- name: configure
run: meson setup build --buildtype=${{matrix.buildtype}}
- name: build
run: meson compile -C build
- name: test
run: meson devenv -C build meson test
- uses: actions/upload-artifact@v4
if: '!cancelled()'
with:
name: Linux_meson_testlog-${{matrix.buildtype}}
path: build/meson-logs/
- uses: actions/upload-artifact@v4
if: '!cancelled()'
with:
name: Linux_tmp_log-${{matrix.buildtype}}
path: /tmp/psy-unit-tests