File: ci.yml

package info (click to toggle)
hypre 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 80,152 kB
  • sloc: ansic: 409,546; cpp: 63,220; sh: 11,814; fortran: 9,433; makefile: 3,346; perl: 2,994; awk: 339; python: 126
file content (59 lines) | stat: -rw-r--r-- 1,551 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
name: CI

on:
  push:
    branches: ["master"]
  pull_request:
    branches: ["**"]
    types: [opened, reopened, synchronize, labeled, unlabeled]
  workflow_dispatch:

jobs:
  require-label:
    name: Require Run CI label
    runs-on: ubuntu-latest
    if: github.event_name == 'pull_request'
    steps:
      - name: Ensure Run CI label is present
        env:
          HAS_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'Run CI') }}
        run: |
          if [ "${HAS_LABEL}" != "true" ]; then
            echo "::error::Add the 'Run CI' label to this pull request to trigger CI."
            exit 1
          fi
        shell: bash

  build-and-check:
    name: Build & Check (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    needs: [require-label]
    if: github.event_name != 'pull_request' || needs.require-label.result == 'success'
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]

    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Install dependencies
        shell: bash
        run: |
          if [[ "${RUNNER_OS}" == "Linux" ]]; then
            sudo apt-get update
            sudo apt-get install -y mpich
          else
            brew update
            brew install open-mpi
          fi

      - name: Configure (Debug)
        run: cmake -S src -B build -DHYPRE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug

      - name: Build
        run: cmake --build build --parallel

      - name: Run check target
        run: cmake --build build --target check