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

Conda build and upload #22

Merged
merged 20 commits into from
Nov 25, 2023
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
63 changes: 47 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.9'
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
Expand All @@ -48,32 +48,35 @@ jobs:
with:
password: ${{ secrets.PYPI_API_TOKEN }}

aur-release:
pypi-public:
needs: pypi-release
- name: Get version number
run: |
VERSION="$(grep ':Version:' README.rst | awk '{print $2}')"
echo "DIST_VERSION=v${VERSION}" >> $GITHUB_ENV
- name: Wait for PyPi
uses: nev7n/wait_for_response@v1
with:
url: "https://files.pythonhosted.org/packages/source/l/lsbi/lsbi-${{ env.DIST_VERSION }}.tar.gz"
responseCode: 200
timeout: 600000
interval: 10000

aur-release:
needs: pypi-public
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tomli
- name: Generate PKGBUILD
run: python ./bin/gen_PKGBUILD.py > ./PKGBUILD
- name: Get version number
run: |
VERSION="$(cat ./PKGBUILD | grep pkgver= | awk -F= '{print $2}')"
echo "DIST_VERSION=${VERSION}" >> $GITHUB_ENV
- name: Wait for PyPi
uses: nev7n/wait_for_response@v1
with:
url: "https://files.pythonhosted.org/packages/source/l/lsbi/lsbi-${{ env.DIST_VERSION }}.tar.gz"
responseCode: 200
timeout: 600000
interval: 10000
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
Expand All @@ -83,3 +86,31 @@ jobs:
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}

conda-release:
needs: pypi-public
name: Build and deploy to conda
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Conda environment creation and activation
uses: conda-incubator/setup-miniconda@v2
with:
python-version: '3.9'
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
- name: install dependencies
shell: bash -el {0}
run: conda install grayskull conda-build anaconda-client
- name: Generate meta.yaml from grayskull
shell: bash -el {0}
run: grayskull pypi --strict-conda-forge lsbi
- name: Build and upload the conda packages
uses: uibcdf/[email protected]
with:
meta_yaml_dir: lsbi
python-version: '3.9'
user: handley-lab
label: 'main'
token: ${{ secrets.ANACONDA_TOKEN }} # Replace with the right name of your secret
8 changes: 6 additions & 2 deletions .github/workflows/pr_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ jobs:
version-is-unit-incremented:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Upgrade pip and install linters
run: |
python -m pip install --upgrade pip
Expand All @@ -33,7 +36,8 @@ jobs:
make clean
make html SPHINXOPTS="-W --keep-going -n"

test-build-n-publish:
test-pypi-release:
name: Build and deploy to test PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ lsbi: Linear Simulation Based Inference
=======================================
:lsbi: Linear Simulation Based Inference
:Author: Will Handley & David Yallup
:Version: 0.9.0
:Version: 0.9.1
:Homepage: https:/handley-lab/lsbi
:Documentation: http://lsbi.readthedocs.io/

Expand Down
2 changes: 1 addition & 1 deletion lsbi/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.0"
__version__ = "0.9.1"
Loading