File: windows.yml

package info (click to toggle)
libomemo 0.8.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 300 kB
  • sloc: ansic: 3,170; sh: 45; makefile: 3
file content (78 lines) | stat: -rw-r--r-- 1,939 bytes parent folder | download
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
# Copyright (c) 2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the GPL v2 or later

name: Build for Windows

on:
  pull_request:
  push:
  schedule:
    - cron: '0 2 * * 5'  # Every Friday at 2am

jobs:
  checks:
    name: Build for Windows (shared=${{ matrix.BUILD_SHARED_LIBS }})
    runs-on: windows-2019
    defaults:
      run:
        shell: msys2 {0}
    strategy:
      fail-fast: false
      matrix:
        BUILD_SHARED_LIBS: ['ON', 'OFF']
    steps:

    - uses: actions/checkout@v3.0.0

    - name: Install build dependencies
      uses: msys2/setup-msys2@v2
      with:
        msystem: MINGW32
        install: |
          cmake
          mingw-w64-i686-cmocka
          mingw-w64-i686-glib2
          mingw-w64-i686-libgcrypt
          mingw-w64-i686-mxml
          mingw-w64-i686-sqlite3
          mingw-w64-i686-toolchain
          ninja

    - name: Configure
      run: |-
        set -x
        cmake \
          -B build \
          -G Ninja \
          -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_SYSTEM_NAME=Windows -DWIN32=ON -DMINGW=ON \
          -DBUILD_SHARED_LIBS=${{ matrix.BUILD_SHARED_LIBS }} \
          -D_OMEMO_WITH_COVERAGE=ON

    - name: Build
      run: |-
        set -x
        ninja -v -C build all
        cat build/libomemo.pc

    - name: Test
      run: |-
        set -x
        CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test
        # Note: msys2 does not come with a package for gcovr, yet(?)
        # ninja -C build coverage

    - name: Install
      run: |-
        set -x -o pipefail
        DESTDIR="${PWD}"/ROOT ninja -v -C build install
        find ROOT/ -not -type d | sort | xargs ls -l

    - name: Store Windows binaries
      uses: actions/upload-artifact@v3.0.0
      with:
        name: omemo_win32bin_shared_${{ matrix.BUILD_SHARED_LIBS }}
        path: |
          build/*.a
          build/*.dll
          build/*.exe
        if-no-files-found: error