Skip to content

Commit

Permalink
Merge branch 'topic/christian/ci-pypi'
Browse files Browse the repository at this point in the history
* topic/christian/ci-pypi:
  CI: automatically push to PyPI when pushing a git tag
  CI: add Github workflow for testing zkg
  CI: remove Cirrus setup
  Don't analyze __bro_plugin__ file content in tests, only its presence
  • Loading branch information
ckreibich committed Jul 18, 2023
2 parents b6149ba + 0db0afa commit f5c61d8
Show file tree
Hide file tree
Showing 15 changed files with 201 additions and 248 deletions.
41 changes: 0 additions & 41 deletions .cirrus.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/ci-notification.yml

This file was deleted.

77 changes: 77 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Test and upload Python package

on:
pull_request:
push:
branches: [master]
tags:
- 'v*'
- '!v*-dev'

env:
ZEEKROOT: /usr/local/zeek

jobs:
test:
strategy:
fail-fast: false
matrix:
# Test Zeek LTS, latest, and nightly, and
# don't fail for the nightly one.
include:
- repo: zeek
version: latest
continue_on_error: false
- repo: zeek
version: lts
continue_on_error: false
- repo: zeek-dev
version: latest
continue_on_error: true

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.continue_on_error }}
container:
image: zeek/${{ matrix.repo }}:${{ matrix.version }}

steps:
- name: Install build environment
run: |
apt-get update
apt-get install -y --no-install-recommends cmake g++ libssl-dev libpcap-dev make
- name: Remove zkg installation
# Rule out confusion between test environment and pre-existing zkg:
run: |
rm $ZEEKROOT/bin/zkg $ZEEKROOT/share/man/man1/zkg.1
rm -r $ZEEKROOT/etc/zkg
rm -r $ZEEKROOT/lib/zeek/python/zeekpkg
rm -r $ZEEKROOT/var/lib/zkg
- uses: actions/checkout@v3
- name: Run unit tests
run: btest -j -A -d -c testing/btest.cfg
- uses: actions/upload-artifact@v3
if: failure()
with:
name: btest-${{ matrix.repo }}-${{ matrix.version }}
path: testing/.tmp/

upload:
runs-on: ubuntu-latest
needs: [test]
if: github.repository == 'zeek/package-manager' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Check release version
# This fails e.g. if VERSION contains a dev commits suffix,
# since we don't want to push these to PyPI. Accepts two-
# and three-component version numbers (e.g. 1.0 and 1.0.1).
run: |
grep -E -x '[0-9]+\.[0-9]+(\.[0-9]+)?' VERSION
- name: Build wheel
run: |
make dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
10 changes: 10 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2.13.0-51 | 2023-07-17 18:07:42 -0700

* CI: automatically push to PyPI when pushing a git tag (Christian Kreibich, Corelight)

* CI: add Github workflow for testing zkg (Christian Kreibich, Corelight)

* CI: remove Cirrus setup (Christian Kreibich, Corelight)

* Don't analyze __bro_plugin__ file content in tests, only its presence (Christian Kreibich, Corelight)

2.13.0-46 | 2023-06-30 12:47:34 -0700

* Update man page with changes to other documentation (Tim Wojtulewicz, Corelight)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.13.0-46
2.13.0-51
7 changes: 0 additions & 7 deletions ci/test.sh

This file was deleted.

45 changes: 0 additions & 45 deletions ci/zeek/Dockerfile

This file was deleted.

Loading

0 comments on commit f5c61d8

Please sign in to comment.