summaryrefslogtreecommitdiff
path: root/.github/workflows/build_where.yml
blob: 6ebb475735915315dd314f2a95aed54aad11c8ff (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
name: Build where

on:
  push:
    branches: [ mane ]
  pull_request:
    branches: [ mane ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ ubuntu-latest, macos-latest ]
        profile: [ dev, release ]

    steps:
    - uses: actions/checkout@v4
    - name: Build
      run: cargo build --all --profile ${{ matrix.profile }}
    - name: Check
      run: cargo clippy --profile ${{ matrix.profile }} -- -D warnings
    - name: Test message exchange
      working-directory: target/${{ matrix.profile == 'dev' && 'debug' || matrix.profile }}
      run: |
        ./where -c
        ./whered &

        i=0
        while [ ! $(pgrep whered) ] && [ $i -lt 10 ]
        do
          sleep 1
          ((i++))
        done

        ./where