maartenuni is compiling and testing PsyLib #168
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
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-dev libunwind-dev libgstreamer1.0-dev gstreamer1.0-plugins-good | ||
version: 1.0.1 | ||
- 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: msys{0} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: UCRT64 | ||
update: true | ||
install: | ||
- git | ||
- mingw-w64-ucrt-x86_64-python-version | ||
- 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 |