Skip to content

Commit

Permalink
Add build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
phihos committed Feb 13, 2024
1 parent d600fe6 commit bae80ea
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build
on: [push]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Run build script
run: |
./build.sh
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: sdist-and-wheels
path: |
target/wheels/*.tar.gz
target/wheels/*.whl
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "pyduckling-native"
name = "pyduckling-native-phihos"
version = "0.1.1-dev0"
authors = ["Edgar Andrés Margffoy Tuay <[email protected]>"]
description = "Rust-based Python wrapper for duckling library in Haskell."
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ To install pyduckling, you can use both conda and pip package managers:

```bash
# Using pip
pip install pyduckling-native

# Using conda
conda install pyduckling -c treble-ai
pip install pyduckling-native-phihos
```

**Notes:** Right now, we only provide package distributions for Linux (x86_64). We will provide Windows and Mac distributions on the next release
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ function build_python_package() {
"${BUILD_IMAGE}" \
sleep infinity
docker exec "${CONTAINER_NAME}" bash -c 'if [[ ! -d "$HOME/venv" ]]; then python3 -m venv "$VENV"; fi'
docker exec "${CONTAINER_NAME}" bash -c 'source "$VENV/bin/activate" && pip install pytest pendulum'
docker exec "${CONTAINER_NAME}" bash -c 'source "$VENV/bin/activate" && pip install pytest pytest-cov coverage pendulum'
docker exec "${CONTAINER_NAME}" bash -c 'source "$VENV/bin/activate" && cd /repo && maturin develop'
docker exec "${CONTAINER_NAME}" bash -c 'source "$VENV/bin/activate" && cd /repo && pytest -v duckling/tests'
docker exec "${CONTAINER_NAME}" bash -c 'source "$VENV/bin/activate" && cd /repo && pytest -x -v --cov=duckling duckling/tests'
docker exec "${CONTAINER_NAME}" bash -c 'source "$VENV/bin/activate" && cd /repo && maturin build -r --sdist'
docker rm -f "${CONTAINER_NAME}" > /dev/null 2>&1 || true
}
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ classifier = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8"
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

0 comments on commit bae80ea

Please sign in to comment.