Skip to content
Open
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
48 changes: 23 additions & 25 deletions .github/workflows/ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,26 @@ jobs:
matrix:
python-version: [3.12]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup pipenv
uses: dschep/install-pipenv-action@v1
- name: Setup HDT v1.3.3
uses: Callidon/setup-hdt-action@v1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
hdt-tag: v1.3.3
source-path: ./
- name: Install dependencies
run: pipenv install --dev
- name: Compile & install package
run: pipenv run python setup.py install
- name: Build documentation
run: |
cd docs && pipenv run make html
- name: Deploy documentation to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup HDT v1.3.3
uses: Callidon/setup-hdt-action@v1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
hdt-tag: v1.3.3
source-path: ./
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Build documentation
run: |
cd docs && uv run make html
- name: Deploy documentation to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
57 changes: 28 additions & 29 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
name: ⏳ Tests
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.12]
hdt-version: ['v1.3.3']
hdt-version: ["v1.3.3"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup pipenv
uses: dschep/install-pipenv-action@v1
- name: Cache pipenv dependencies
uses: actions/cache@v4
id: cache-pipenv
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Setup HDT ${{ matrix.hdt-version }}
uses: Callidon/setup-hdt-action@v1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
hdt-tag: ${{ matrix.hdt-version }}
source-path: ./
- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: pipenv install --dev
- name: Compile & install package
run: pipenv run python -m pip install build --user
- name: Test with pytest
run: pipenv run pytest
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install pybind11 dependencies
run: sudo apt install -y python3-dev cmake

- name: Setup HDT ${{ matrix.hdt-version }}
uses: Callidon/setup-hdt-action@v1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
hdt-tag: ${{ matrix.hdt-version }}
source-path: ./

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Build package
run: uv build
- name: Check that package is correctly built
run: uv run --with rdflib_hdt --no-project -- python -c "import rdflib_hdt"
- name: Test with pytest
run: uv run pytest
125 changes: 30 additions & 95 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,100 +1,35 @@
name: Publish Python 🐍 distribution 📦 to PyPI
on: push
on:
push:
branches: [master]
jobs:
build:
name: Build distribution 📦
run:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Setup C++
uses: aminya/setup-cpp@v1
with:
compiler: llvm
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
env:
# use clang++ as compiler, as github actions uses g++ by default
CC: clang++
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/rdflib-hdt
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

id-token: write
contents: read
strategy:
matrix:
python-version: [3.12]
hdt-version: ["v1.3.3"]
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
"$GITHUB_REF_NAME"
--repo "$GITHUB_REPOSITORY"
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
"$GITHUB_REF_NAME" dist/**
--repo "$GITHUB_REPOSITORY"
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install pybind11 dependencies
run: sudo apt install -y python3-dev cmake
- name: Setup HDT ${{ matrix.hdt-version }}
uses: Callidon/setup-hdt-action@v1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
hdt-tag: ${{ matrix.hdt-version }}
source-path: ./
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build
run: uv build
- name: Publish
run: uv publish
17 changes: 0 additions & 17 deletions Pipfile

This file was deleted.

Loading
Loading