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

docker should install extra deps + workflow trigger fix #86

Merged
merged 1 commit into from
Dec 6, 2024
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
30 changes: 22 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

name: Python Package Publication

on:
pull_request:
types: [closed]
branches: [master]
paths:
- '**.cpp'
- '**.hpp'
- '**.py'
- 'setup.py'
- 'setup.cfg'
- 'pyproject.toml'
workflow_dispatch:
inputs:
release-version:
required: true
linux:
type: boolean
required: true
Expand All @@ -25,12 +29,14 @@ jobs:
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Get version
id: get_version
run: |
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
- name: Python wheels manylinux stable build
uses: RalfG/python-wheels-manylinux-build@v0.5.0
with:
Expand All @@ -57,6 +63,10 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Get version
id: get_version
run: |
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -77,12 +87,16 @@ jobs:
needs: [ linux-build, other-os-build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get version
id: get_version
run: |
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release-version }}
run: |
gh release create "$tag" \
gh release create "v${{ steps.get_version.outputs.version }}" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--title="${GITHUB_REPOSITORY#*/} v${{ steps.get_version.outputs.version }}" \
--generate-notes
3 changes: 1 addition & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ RUN python3 -m pip install --upgrade pip
WORKDIR /scratch
RUN git clone --recurse-submodules https://github.com/LemurPwned/cmtj.git && \
cd cmtj && \
python3 -m pip install numpy scipy && \
python3 -m pip install .
python3 -m pip install .[utils]
WORKDIR /app
RUN python3 -c "import cmtj; from cmtj.utils import FieldScan"
Loading