Skip to content

Commit f5c61d8

Browse files
committed
Merge branch 'topic/christian/ci-pypi'
* 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
2 parents b6149ba + 0db0afa commit f5c61d8

File tree

15 files changed

+201
-248
lines changed

15 files changed

+201
-248
lines changed

.cirrus.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/ci-notification.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Test and upload Python package
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
tags:
8+
- 'v*'
9+
- '!v*-dev'
10+
11+
env:
12+
ZEEKROOT: /usr/local/zeek
13+
14+
jobs:
15+
test:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
# Test Zeek LTS, latest, and nightly, and
20+
# don't fail for the nightly one.
21+
include:
22+
- repo: zeek
23+
version: latest
24+
continue_on_error: false
25+
- repo: zeek
26+
version: lts
27+
continue_on_error: false
28+
- repo: zeek-dev
29+
version: latest
30+
continue_on_error: true
31+
32+
runs-on: ubuntu-latest
33+
continue-on-error: ${{ matrix.continue_on_error }}
34+
container:
35+
image: zeek/${{ matrix.repo }}:${{ matrix.version }}
36+
37+
steps:
38+
- name: Install build environment
39+
run: |
40+
apt-get update
41+
apt-get install -y --no-install-recommends cmake g++ libssl-dev libpcap-dev make
42+
- name: Remove zkg installation
43+
# Rule out confusion between test environment and pre-existing zkg:
44+
run: |
45+
rm $ZEEKROOT/bin/zkg $ZEEKROOT/share/man/man1/zkg.1
46+
rm -r $ZEEKROOT/etc/zkg
47+
rm -r $ZEEKROOT/lib/zeek/python/zeekpkg
48+
rm -r $ZEEKROOT/var/lib/zkg
49+
- uses: actions/checkout@v3
50+
- name: Run unit tests
51+
run: btest -j -A -d -c testing/btest.cfg
52+
- uses: actions/upload-artifact@v3
53+
if: failure()
54+
with:
55+
name: btest-${{ matrix.repo }}-${{ matrix.version }}
56+
path: testing/.tmp/
57+
58+
upload:
59+
runs-on: ubuntu-latest
60+
needs: [test]
61+
if: github.repository == 'zeek/package-manager' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
62+
steps:
63+
- uses: actions/checkout@v3
64+
- name: Check release version
65+
# This fails e.g. if VERSION contains a dev commits suffix,
66+
# since we don't want to push these to PyPI. Accepts two-
67+
# and three-component version numbers (e.g. 1.0 and 1.0.1).
68+
run: |
69+
grep -E -x '[0-9]+\.[0-9]+(\.[0-9]+)?' VERSION
70+
- name: Build wheel
71+
run: |
72+
make dist
73+
- name: Upload to PyPI
74+
uses: pypa/gh-action-pypi-publish@release/v1
75+
with:
76+
user: __token__
77+
password: ${{ secrets.PYPI_API_TOKEN }}

CHANGES

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2.13.0-51 | 2023-07-17 18:07:42 -0700
2+
3+
* CI: automatically push to PyPI when pushing a git tag (Christian Kreibich, Corelight)
4+
5+
* CI: add Github workflow for testing zkg (Christian Kreibich, Corelight)
6+
7+
* CI: remove Cirrus setup (Christian Kreibich, Corelight)
8+
9+
* Don't analyze __bro_plugin__ file content in tests, only its presence (Christian Kreibich, Corelight)
10+
111
2.13.0-46 | 2023-06-30 12:47:34 -0700
212

313
* Update man page with changes to other documentation (Tim Wojtulewicz, Corelight)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.13.0-46
1+
2.13.0-51

ci/test.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

ci/zeek/Dockerfile

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)