Skip to content

Commit

Permalink
temp: valgrind and gdb
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Szakacs <[email protected]>
  • Loading branch information
alltilla committed Oct 25, 2023
1 parent 2bade51 commit 399586b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 39 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/syslog-ng-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ on:
type: string

env:
DOCKER_IMAGE_NAME: ghcr.io/axoflow/axosyslog
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
DOCKER_IMAGE_NAME: ghcr.io/alltilla/axosyslog
PLATFORMS: linux/amd64

jobs:
docker:
name: syslog-ng Docker
if: github.repository_owner == 'axoflow'
if: github.repository_owner == 'alltilla'
runs-on: ubuntu-latest
steps:
- name: Checkout source
Expand Down Expand Up @@ -77,7 +77,6 @@ jobs:
tags: ${{ steps.tags.outputs.TAGS }}
# description should be here because it is a multi-arch image
# see docs: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#adding-a-description-to-multi-arch-images
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.stable-tags.outputs.json).labels['org.opencontainers.image.description'] }}
build-args: |
PKG_TYPE=${{ inputs.pkg-type }}
SNAPSHOT_VERSION=${{ inputs.snapshot-version }}
34 changes: 1 addition & 33 deletions .github/workflows/syslog-ng-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,41 +59,9 @@ jobs:
name: source-tarball
path: dbld/build/*.tar.*

build-and-test:
runs-on: ubuntu-latest
needs: tarball
steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Download source tarball artifact
uses: actions/download-artifact@v3
with:
name: source-tarball
path: syslog-ng/apkbuild/axoflow/syslog-ng

- name: Build and export Docker image
uses: docker/build-push-action@v3
with:
context: syslog-ng
file: syslog-ng/alpine.dockerfile
load: true
tags: syslog-ng:test
build-args: |
PKG_TYPE=nightly
SNAPSHOT_VERSION=${{ needs.tarball.outputs.snapshot-version }}
- name: Smoke test
run: |
export SYSLOG_NG_IMAGE="syslog-ng:test"
export SYSLOG_NG_VERSION="${{ needs.tarball.outputs.snapshot-version }}"
syslog-ng/tests/smoke.sh
publish-image:
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/syslog-ng-docker.yml
needs: [tarball, build-and-test]
needs: [tarball]
with:
pkg-type: nightly
tarball-artifact: source-tarball
Expand Down
4 changes: 3 additions & 1 deletion syslog-ng/alpine.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ COPY --from=apkbuilder /home/builder/packages/ /
COPY --from=apkbuilder /home/builder/.abuild/*.pub /etc/apk/keys/

RUN apk add --repository /axoflow -U --upgrade --no-cache \
gdb \
valgrind \
jemalloc \
libdbi-drivers \
syslog-ng \
Expand Down Expand Up @@ -79,4 +81,4 @@ EXPOSE 6514/tcp

HEALTHCHECK --interval=2m --timeout=5s --start-period=30s CMD /usr/sbin/syslog-ng-ctl healthcheck --timeout 5
ENV LD_PRELOAD /usr/lib/libjemalloc.so.2
ENTRYPOINT ["/usr/sbin/syslog-ng", "-F"]
ENTRYPOINT ["valgrind", "--leak-check=full", "--trace-children=yes", "/usr/sbin/syslog-ng", "-F"]
2 changes: 1 addition & 1 deletion syslog-ng/apkbuild/axoflow/syslog-ng/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pkgdesc="Next generation logging daemon"
url="https://www.syslog-ng.com/products/open-source-log-management/"
arch="all"
license="GPL-2.0-or-later"
options="!check" # unit tests require https://github.com/Snaipe/Criterion with deps
options="!check !strip" # unit tests require https://github.com/Snaipe/Criterion with deps
makedepends="
bison
bpftool
Expand Down

0 comments on commit 399586b

Please sign in to comment.