65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
name: smoke
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
smoke:
|
|
runs-on:
|
|
- debian-13
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Verify runner prerequisites
|
|
run: |
|
|
set -euo pipefail
|
|
require_cmd() {
|
|
if ! command -v "$1" >/dev/null 2>&1; then
|
|
echo "Missing required command: $1" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
require_cmd bash
|
|
require_cmd curl
|
|
require_cmd gcc
|
|
require_cmd pkg-config
|
|
|
|
if ! pkg-config --exists libnftables; then
|
|
echo "Missing libnftables pkg-config metadata on the runner host." >&2
|
|
echo "Install the system libnftables development package before running this workflow." >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Runner prerequisites look good."
|
|
gcc --version | head -n 1
|
|
pkg-config --modversion libnftables
|
|
|
|
- name: Install .NET SDK
|
|
run: |
|
|
set -euo pipefail
|
|
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
|
|
bash dotnet-install.sh --channel 10.0 --quality ga --install-dir "$HOME/.dotnet"
|
|
|
|
- name: Show .NET info
|
|
run: |
|
|
set -euo pipefail
|
|
"$HOME/.dotnet/dotnet" --info
|
|
|
|
- name: Restore
|
|
run: |
|
|
set -euo pipefail
|
|
"$HOME/.dotnet/dotnet" restore
|
|
|
|
- name: Build
|
|
run: |
|
|
set -euo pipefail
|
|
"$HOME/.dotnet/dotnet" build --no-restore
|
|
|
|
- name: Test
|
|
run: |
|
|
set -euo pipefail
|
|
"$HOME/.dotnet/dotnet" test LibNftables.slnx --no-build
|