Skip to content

Commit

Permalink
github: split smoke tests in a separate job
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Jarry <rjarry@redhat.com>
  • Loading branch information
rjarry committed May 30, 2024
1 parent 09e3f38 commit 629cd06
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,48 @@ jobs:
runs-on: ubuntu-24.04
env:
CC: ccache gcc
SANITIZE: address
BUILDTYPE: debugoptimized
steps:
- name: install system dependencies
run: |
set -xe
sudo apt-get update -qy
sudo apt-get install -qy \
make gcc ccache ninja-build meson git scdoc socat tcpdump \
iproute2 iputils-ping libasan8 libcmocka-dev libedit-dev \
make gcc ccache ninja-build meson git scdoc \
libasan8 libcmocka-dev libedit-dev \
libevent-dev libsmartcols-dev libnuma-dev python3-pyelftools
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache
- run: make
- uses: actions/upload-artifact@v4
with:
path: |
build/br
build/br-cli
retention-days: 5
- run: make unit-tests
smoke:
runs-on: ubuntu-24.04
needs: build
steps:
- name: install system dependencies
run: |
set -xe
sudo apt-get update -qy
sudo apt-get install -qy \
git socat tcpdump \
iproute2 iputils-ping libasan8 libedit2 \
libevent-2.1-7t64 libsmartcols1 libnuma1
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: build
merge-multiple: true
- run: chmod 755 build/br build/br-cli
- run: sudo smoke/run.sh build
lint:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions smoke/_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ cleanup() {

tmp=$(mktemp -d)
trap cleanup EXIT
builddir=$1
builddir=${1?builddir}

export BR_SOCK_PATH=$tmp/br.sock
export PATH=$builddir:$PATH

uid=$(base32 -w6 < /dev/urandom | tr '[:upper:]' '[:lower:]' | head -n1)
set -x

uid=$(echo $SRANDOM$SRANDOM | base32 -w6 | tr '[:upper:]' '[:lower:]' | head -n1)

name() {
echo "br$uid-$1"
}

set -x

br -tv &
socat FILE:/dev/null UNIX-CONNECT:$BR_SOCK_PATH,retry=10

0 comments on commit 629cd06

Please sign in to comment.