File: check.yml

package info (click to toggle)
librsync 2.3.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates
  • size: 1,204 kB
  • sloc: ansic: 4,956; sh: 245; xml: 182; perl: 30; makefile: 21
file content (91 lines) | stat: -rw-r--r-- 2,977 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
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Check

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

defaults:
  run:
    shell: bash

jobs:
  check:
    runs-on: ${{matrix.os}}
    strategy:
      fail-fast: false
      matrix:
       os: [ubuntu-latest, macos-latest, windows-latest]
       build: [Release]
       options: [""]
       include:
         - os: windows-latest
           os_options: "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
         - os: ubuntu-latest
           build_docs: true
         - os: ubuntu-latest
           build: Release
           options: "-DBUILD_SHARED_LIBS=OFF"
         - os: ubuntu-latest
           build: Release
           options: "-DBUILD_RDIFF=OFF"
         - os: ubuntu-latest
           build: Release
           options: "-G Ninja -DCMAKE_C_COMPILER=clang"
         - os: ubuntu-latest
           build: Debug

    steps:
    - uses: actions/checkout@v3

    - name: Install Dependencies
      # Unfortunately available Marketplace Actions for this are in a mess, so we do it manually.
      run: |
        if [ "$RUNNER_OS" == "Linux" ]; then
          sudo apt-get update -y
          sudo apt-get install -y libpopt-dev libb2-dev doxygen graphviz ninja-build
        elif [ "$RUNNER_OS" == "macOS" ]; then
          brew update
          brew install popt
        elif [ "$RUNNER_OS" == "Windows" ]; then
          vcpkg update
          vcpkg --triplet x64-windows install libpopt
        fi

    - name: Configure CMake
      # Configure CMake in a 'build' subdirectory.
      # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
      run: cmake -B '${{github.workspace}}/build' -DCMAKE_BUILD_TYPE=${{matrix.build}} ${{matrix.os_options}} ${{matrix.options}}

    - name: Build all
      # Build your program with the given configuration.
      run: cmake --build '${{github.workspace}}/build' --config ${{matrix.build}}

    - name: Run tests
      working-directory: ${{github.workspace}}/build
      # Execute tests defined by the CMake configuration.
      # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
      run: ctest -C ${{matrix.build}} --output-on-failure

    - name: Build install
      # Build your program with the given configuration.
      run: cmake --install 'build' --config ${{matrix.build}} --prefix 'install'

    - name: Build docs
      if: ${{matrix.build_docs}}
      run: cmake --build '${{github.workspace}}/build' --target doc

    - name: Upload build
      uses: actions/upload-artifact@v3
      with:
        name: build results ${{matrix.os}} ${{matrix.build}} ${{matrix.options}}
        path: ${{github.workspace}}/build
        if-no-files-found: error

    - name: Upload install
      uses: actions/upload-artifact@v3
      with:
        name: install results ${{matrix.os}} ${{matrix.build}} ${{matrix.options}}
        path: ${{github.workspace}}/install
        if-no-files-found: error