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

Build for pypi instead of conda #131

Merged
merged 35 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f2732d3
Conda env: more missing packages and changed version pins
vladsavelyev Feb 9, 2022
96a9eb6
CI: build conda package on pull requests, but upload only on push to …
vladsavelyev Feb 9, 2022
a5ea4ac
Build in py 3.10 enviornment
vladsavelyev Feb 9, 2022
4001271
Stick to py3.9. See https://github.com/conda/conda/issues/10969
vladsavelyev Feb 9, 2022
8d09106
Conda: avro -> python-avro
vladsavelyev Feb 9, 2022
d4a9db0
Build pip instead of conda
vladsavelyev Feb 9, 2022
be9e3a0
Render conda recipe from pip requirements
vladsavelyev Feb 10, 2022
a977a3f
Drop the pypi package
vladsavelyev Feb 10, 2022
dd88810
Render SPARK_VERSION before building recipe
vladsavelyev Feb 10, 2022
9b5dcc5
Setup conda before rendering recipe to make sure py3 is activated
vladsavelyev Feb 10, 2022
30c2674
Conda: upload macos as well
vladsavelyev Feb 10, 2022
ec4c498
Conda: build for py310
vladsavelyev Feb 10, 2022
e1c330b
Build for py310
vladsavelyev Feb 10, 2022
c027468
Build for py39 and py310
vladsavelyev Feb 10, 2022
427f9b4
Small fix
vladsavelyev Feb 11, 2022
cf66288
Remove trailing space
vladsavelyev Feb 11, 2022
cbfb8eb
Update conda/render_recipe.py
vladsavelyev Feb 11, 2022
5dbd0d4
Update conda/render_recipe.py
vladsavelyev Feb 11, 2022
33b690d
Merge remote-tracking branch 'origin/main' into fix-conda2
vladsavelyev Feb 16, 2022
5bef67d
Drop conda, replace with pip
vladsavelyev Feb 16, 2022
ce846cd
GH workflow: setup java and pin python
vladsavelyev Feb 16, 2022
aedd526
Fix
vladsavelyev Feb 16, 2022
a9512b5
Fix
vladsavelyev Feb 16, 2022
d4e03ce
Java 8
vladsavelyev Feb 16, 2022
a7162ce
Use twine action
vladsavelyev Feb 16, 2022
e23b878
Fix
vladsavelyev Feb 16, 2022
682a1ca
Install package for test
vladsavelyev Feb 16, 2022
632e146
Fix
vladsavelyev Feb 16, 2022
21d25fd
Remove fix-conda2 branch
vladsavelyev Feb 16, 2022
e617011
Fix
vladsavelyev Feb 18, 2022
d27097e
Add back macos-latest
vladsavelyev Feb 18, 2022
ec0258a
Build only on ubuntu
vladsavelyev Feb 18, 2022
badc8d5
Add comments, rename to build.yaml
vladsavelyev Feb 21, 2022
c921edd
Rename back
vladsavelyev Feb 21, 2022
05be147
Rename to package.yaml
vladsavelyev Feb 21, 2022
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
64 changes: 0 additions & 64 deletions .github/workflows/condarise.yaml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build pip package
on:
# Building on pull-requests and pushes to main, but restricting publishing
# to push events with `if: github.event_name == 'push'` for specific steps
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@main

- uses: actions/setup-python@v2
with:
python-version: '3.10'

# Hail builds only on java=8
- uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'temurin'

# Building the wheel.
# Note that because PyPI doesn't have channels like conda, we have to prefix
# the package name with "cpg-*" to avoid clashing with the official package.
- name: Build wheel
run: |
sed -i 's/name="hail",/name="cpg-hail",/' hail/python/setup.py
make -C hail python-version-info wheel

- name: Install
run: |
version=$(cat hail/python/hail/hail_pip_version)
pip install hail/build/deploy/dist/cpg_hail-$version-py3-none-any.whl

- name: Test hailctl
run: hailctl version

- name: Test hailtop import
run: python -c "import hailtop.batch"

- name: Test version
run: test "$(hailctl version)" = "$(cat hail/python/hail/hail_version)"

- name: Publish the wheel to PyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: hail/build/deploy/dist/
skip_existing: true

- name: Redeploy the analysis-server
if: github.event_name == 'push'
run: |
echo "version=$(cat hail/python/hail/hail_pip_version)" >> $GITHUB_ENV
curl --fail --silent --show-error -X POST \
-H "Authorization: token ${{ secrets.ANALYSIS_SERVER_GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/populationgenomics/analysis-runner/actions/workflows/6364059/dispatches \
-d '{"ref": "main", "inputs": {"hail_version": "${{ env.version }}"}}'
51 changes: 0 additions & 51 deletions conda/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions conda/hail/build.sh

This file was deleted.

64 changes: 0 additions & 64 deletions conda/hail/meta-template.yaml

This file was deleted.