-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
15 changed files
with
201 additions
and
248 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.13.0-46 | ||
2.13.0-51 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.