Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build pipeline, edit readme #40

Merged
merged 11 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 0 additions & 118 deletions .github/workflows/build.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
branch:
description: 'Name of the branch to build and release'
required: true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ['3.9', '3.10.8', '3.11']

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine cython numpy

- name: Build a binary wheel and a source tarball
run: |
python setup.py bdist_wheel sdist

- name: Rename wheel for manylinux compatibility (Ubuntu only)
if: runner.os == 'Linux'
run: |
for file in *.whl; do
if [[ $file == *linux* ]]; then
mv "$file" "${file/-linux/-manylinux1}"
fi
done

- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist/

- name: Publish to GitHub Releases
uses: softprops/action-gh-release@v1
with:
files: dist/*
tag_name: v${{ github.ref }}
title: Release ${{ github.ref }}
body: ${{ github.event.pull_request.body }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,9 @@ venv/
dist/
temp/
build/
anomaly_detector.egg-info/
time_series_anomaly_detector.egg-info/
anomaly-detector/anomaly_detector/univariate/_anomaly_kernel_cython.c

.idea/
*.so

*.pyd
.script\Dockerfile
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Tested on
## Installing from pip

```bash
# install dependencies
pip install numpy>=1.23.5 Cython

# then install time-series-anomaly-detector
pip install time-series-anomaly-detector
```

Expand Down
Loading