Skip to content

combine tcp/udp port with target like TARGET[:PORT] #62

combine tcp/udp port with target like TARGET[:PORT]

combine tcp/udp port with target like TARGET[:PORT] #62

name: build_and_run
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build_debs_on_ubuntu_and_run:
name: Build-n-Run on ${{matrix.os}} with ${{matrix.compiler}}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Install mandatory packages for building
run: |
sudo apt update
sudo apt install -y devscripts debhelper libidn2-dev libcap-dev meson git sed pkgconf libcap2-bin libbsd-dev
- name: Create deb package with ${{matrix.compiler}}
env:
CC: ${{matrix.compiler}}
run: ./misc/build_deb.sh
- name: Install deb package built with ${{matrix.compiler}}
run: sudo dpkg -i debs/mtr085_*.deb
- name: Run on ${{matrix.os}}
run: mtr -r localhost
- uses: actions/upload-artifact@v4
with:
name: assets built with ${{matrix.compiler}}
path: debs/mtr085_*_*.deb
build_exec_on_macos_and_run:
name: Build-n-Run on ${{matrix.os}} with ${{matrix.compiler}}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [macos-latest]
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Install mandatory packages for building
run: brew install meson
- name: Create executable with ${{matrix.compiler}}
env:
CC: ${{matrix.compiler}}
run: |
meson setup _build -DCAP=false
meson compile -C _build
- name: Run on ${{matrix.os}}
run: sudo ./_build/mtr -r localhost