| 1 | name: macOS |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [ "arping-2.x" ] |
| 6 | pull_request: |
| 7 | branches: [ "arping-2.x" ] |
| 8 | |
| 9 | jobs: |
| 10 | build: |
| 11 | runs-on: macos-latest |
| 12 | |
| 13 | steps: |
| 14 | - uses: actions/checkout@v6 |
| 15 | - name: Install dependencies |
| 16 | run: brew install autoconf automake libnet |
| 17 | - name: bootstrap |
| 18 | run: ./bootstrap.sh |
| 19 | - name: configure |
| 20 | run: | |
| 21 | export LDFLAGS="-L$(brew --prefix libnet)/lib" |
| 22 | export CPPFLAGS="-I$(brew --prefix libnet)/include" |
| 23 | ./configure |
| 24 | - name: make |
| 25 | run: make |
| 26 | - name: test |
| 27 | run: ./src/arping --help |
| 28 | - name: netstat |
| 29 | run: netstat -nr |
| 30 | - name: id |
| 31 | run: id |
| 32 | - name: sudo id |
| 33 | run: sudo id |
| 34 | - name: Find default gateway |
| 35 | run: | |
| 36 | GW="$(route -n get default | awk '/gateway:/ {print $2}')" |
| 37 | echo "ARPING_GW=$GW" >> "$GITHUB_ENV" |
| 38 | - name: ping default gateway |
| 39 | run: sudo ./src/arping -c 1 "$ARPING_GW" |
| 40 | - name: ping default gw verbosely |
| 41 | run: sudo ./src/arping -c 1 -vvvvvvv "$ARPING_GW" |