aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/yatr.yaml
blob: 897c41ed977d9793eff609d51acf4a88eae5c86c (plain)
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
name: yatr
on:
  - push

jobs:
  yatr:
    runs-on: "${{ matrix.image }}"

    strategy:
      fail-fast: false
      matrix:
        target:
          - distcheck
          - valgrind
          - check-make-embedded
        compiler:
          - gcc
          - clang
        image:
          - ubuntu-20.04
        include:
          - target: distcheck
            compiler: clang
            image: macos-10.15
          - target: clang-analyzer
            compiler: clang
            image: ubuntu-20.04
          - target: dist-srpm
            compiler: gcc
            image: ubuntu-20.04
          - target: deb-bullseye-amd64
            compiler: gcc
            image: ubuntu-22.04
          - target: deb-bookworm-amd64
            compiler: gcc
            image: ubuntu-22.04
          - target: deb-sid-amd64
            compiler: gcc
            image: ubuntu-22.04
          - target: deb-focal-amd64
            compiler: gcc
            image: ubuntu-22.04
          - target: deb-jammy-amd64
            compiler: gcc
            image: ubuntu-22.04
          - target: deb-kinetic-amd64
            compiler: gcc
            image: ubuntu-22.04
          - target: static
            compiler: gcc
            image: ubuntu-20.04
          - target: static-all
            compiler: gcc
            image: ubuntu-20.04
          - target: win32
            compiler: gcc
            image: ubuntu-20.04
          - target: win64
            compiler: gcc
            image: ubuntu-20.04

    steps:
      - name: Check out code
        uses: actions/checkout@v2

      - name: Install dependencies
        run: |
          if [[ "x${{ matrix.image }}" = xubuntu-* ]]; then
              sudo gem install ronn
              sudo apt-get update -y
              if [[ "x${{ matrix.target }}" = *check* ]] || [[ "x${{ matrix.target }}" = xvalgrind ]] || [[ "x${{ matrix.target }}" = xdeb-* ]]; then
                  sudo apt-get install -y libcmocka-dev
              fi
              if [[ "x${{ matrix.target }}" = xvalgrind ]]; then
                  sudo apt-get install -y valgrind
              fi
              if [[ "x${{ matrix.target }}" = xclang-analyzer ]]; then
                  sudo apt-get install -y clang-tools
              fi
              if [[ "x${{ matrix.target }}" = xwin32 ]]; then
                  sudo apt-get install -y gcc-mingw-w64-i686
              fi
              if [[ "x${{ matrix.target }}" = xwin64 ]]; then
                  sudo apt-get install -y gcc-mingw-w64-x86-64
              fi
              if [[ "x${{ matrix.target }}" = xdeb-* ]]; then
                  sudo apt-get install -y cowbuilder debhelper pbuilder reprepro
              fi
          elif [[ "x${{ matrix.image }}" = xmacos-* ]]; then
              gem install ronn
              brew install automake coreutils cmocka pkg-config
          fi

      - name: Run yatr
        env:
          CC: "${{ matrix.compiler }}"
          TARGET: "${{ matrix.target }}"
          DISTFILES_URL: "${{ secrets.DISTFILES_URL }}"
          DISABLE_PUBLISHER: "${{ matrix.compiler != 'gcc' && matrix.target != 'clang-analyzer' }}"
        run: curl -sSf https://yatr.rgm.io/run.sh | bash