Skip to content

Commit

Permalink
Add GH Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
severinsimmler authored and ariddell committed Nov 28, 2023
1 parent 715e7df commit aee65d3
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 597 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,43 @@
name: CI & CD

on:
push:
tags:
- '*.*.*'

env:
PYTHONDONTWRITEBYTECODE: 1

jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.12"

- name: Install Poetry
run: pip install "poetry~=1.2"

- name: Install Python dependencies
run: poetry install --only build --no-root

- name: Build wheels
run: poetry run cibuildwheel --output-dir dist

- name: Build source distribution
run: poetry build --format sdist

- name: Deploy wheels
run: poetry publish --username ${{ secrets.PYPI_USER }} --password ${{ secrets.PYPI_PW }} --skip-existing
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

13 changes: 5 additions & 8 deletions README.rst
@@ -1,7 +1,7 @@
lda: Topic modeling with latent Dirichlet allocation
====================================================

|pypi| |travis| |zenodo|
|pypi| |actions| |zenodo|

**NOTE: This package is in maintenance mode. Critical bugs will be fixed. No new features will be added.**

Expand Down Expand Up @@ -89,10 +89,7 @@ The document-topic distributions are available in ``model.doc_topic_``.
Requirements
------------
Python 2.7 or Python 3.5+ is required. The following packages are required
- numpy_
- pbr_
Python 3.9+ and NumPy is required.
Caveat
------
Expand Down Expand Up @@ -144,9 +141,9 @@ lda is licensed under Version 2.0 of the Mozilla Public License.
:target: https://pypi.python.org/pypi/lda
:alt: pypi version

.. |travis| image:: https://travis-ci.org/lda-project/lda.png?branch=master
:target: https://travis-ci.org/lda-project/lda
:alt: travis-ci build status
.. |actions| image:: https://github.com/lda-project/lda/actions/workflows/release.yml/badge.svg
:target: https://github.com/lda-project/lda/actions
:alt: github actions build status

.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1412135.svg
:target: https://doi.org/10.5281/zenodo.1412135
Expand Down
96 changes: 0 additions & 96 deletions appveyor.yml

This file was deleted.

8 changes: 7 additions & 1 deletion build.py
@@ -1,3 +1,4 @@
import platform
import shutil
import subprocess
from pathlib import Path
Expand All @@ -6,6 +7,11 @@
LIB_DIR = Path(__file__).parent.joinpath("lda")


def _is_windows():
"""Return True if the current platform is Windows."""
return platform.system() == "Windows"


def _meson(*args):
"""Invoke meson with the given arguments."""
subprocess.check_call(["meson", *list(args)])
Expand All @@ -16,7 +22,7 @@ def _cleanup():
if BUILD_DIR.exists():
shutil.rmtree(BUILD_DIR)

for file in LIB_DIR.glob("*.so"):
for file in LIB_DIR.glob("*.pyd" if _is_windows() else "*.so"):
file.unlink()


Expand Down
2 changes: 0 additions & 2 deletions continuous_integration/appveyor/README.md

This file was deleted.

0 comments on commit aee65d3

Please sign in to comment.