|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master, dev ] |
| 6 | + pull_request: |
| 7 | + branches: [ master, dev ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + build-linux: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + fedora: [38, 39] |
| 15 | + include: |
| 16 | + - fedora: 38 |
| 17 | + gcc: 13 |
| 18 | + - fedora: 39 |
| 19 | + gcc: 13 |
| 20 | + |
| 21 | + container: ghcr.io/fairrootgroup/fairmq-dev:fedora-${{ matrix.fedora }} |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + |
| 26 | + - name: Install additional dependencies |
| 27 | + run: | |
| 28 | + dnf install -y fmt-devel || true |
| 29 | +
|
| 30 | + - name: Configure |
| 31 | + run: | |
| 32 | + cmake -B build -G Ninja \ |
| 33 | + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 34 | + -DDISABLE_COLOR=ON \ |
| 35 | + -DUSE_EXTERNAL_FMT=ON \ |
| 36 | + -DUSE_BOOST_PRETTY_FUNCTION=ON |
| 37 | +
|
| 38 | + - name: Build |
| 39 | + run: cmake --build build |
| 40 | + |
| 41 | + - name: Test |
| 42 | + run: | |
| 43 | + cd build |
| 44 | + ctest -V --output-on-failure |
| 45 | +
|
| 46 | + build-macos: |
| 47 | + runs-on: ${{ matrix.os }} |
| 48 | + strategy: |
| 49 | + matrix: |
| 50 | + os: [macos-13, macos-14] |
| 51 | + |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v4 |
| 54 | + |
| 55 | + - name: Cache Homebrew packages |
| 56 | + uses: actions/cache@v4 |
| 57 | + with: |
| 58 | + path: | |
| 59 | + ~/Library/Caches/Homebrew |
| 60 | + /usr/local/Homebrew/Library/Taps |
| 61 | + key: ${{ runner.os }}-${{ matrix.os }}-brew-${{ hashFiles('.github/workflows/ci.yml') }} |
| 62 | + restore-keys: | |
| 63 | + ${{ runner.os }}-${{ matrix.os }}-brew- |
| 64 | +
|
| 65 | + - name: Install dependencies |
| 66 | + run: | |
| 67 | + brew install cmake ninja boost fmt |
| 68 | +
|
| 69 | + - name: Configure |
| 70 | + run: | |
| 71 | + cmake -B build -G Ninja \ |
| 72 | + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 73 | + -DDISABLE_COLOR=ON \ |
| 74 | + -DUSE_EXTERNAL_FMT=ON \ |
| 75 | + -DUSE_BOOST_PRETTY_FUNCTION=ON |
| 76 | +
|
| 77 | + - name: Build |
| 78 | + run: cmake --build build |
| 79 | + |
| 80 | + - name: Test |
| 81 | + run: | |
| 82 | + cd build |
| 83 | + ctest -V --output-on-failure |
0 commit comments