Skip to content
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
20 changes: 16 additions & 4 deletions .cirrus.star
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ load("cirrus", "env", "fs")

def main(ctx):
# Default case: don't do anything if not in the core repo
# or if you're not targetting the develop branch
if ((env.get("CIRRUS_REPO_FULL_NAME") != "MDAnalysis/mdanalysis")
or (env.get("CIRRUS_BASE_BRANCH") != "develop")):
if env.get("CIRRUS_REPO_FULL_NAME") != "MDAnalysis/mdanalysis":
return []

return fs.read("maintainer/ci/cirrus-ci.yml")
# Some debugging to know what state you are in, by default everything is None but PR
print(env.get("CIRRUS_TAG") == None)
print(env.get("CIRRUS_RELEASE") == None)
print(env.get("CIRRUS_PR") != None)
print(env.get("CIRRUS_BASE_BRANCH") == "develop")

# If you're targetting develop and it's a PR, run a CI job
if ((env.get("CIRRUS_BASE_BRANCH") == "develop") and (env.get("CIRRUS_PR") != None)):
return fs.read("maintainer/ci/cirrus-ci.yml")

# If you've tagged a package or released something, deploy
if ((env.get("CIRRUS_TAG") != None) or (env.get("CIRRUS_RELEASE") != None)):
return fs.read("maintainer/ci/cirrus-deploy.yml")

return []
79 changes: 79 additions & 0 deletions maintainer/ci/cirrus-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.12.3
run_cibuildwheel_script:
- cibuildwheel ./package
wheels_artifacts:
path: "wheelhouse/*"


linux_aarch64_wheel_task:
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder-arm64
architecture: arm64
platform: linux
cpu: 4
memory: 4G
env:
CIBW_BUILD: cp39-manylinux* cp310-manylinux* cp311-manylinux*

build_script: |
apt install -y python3-venv python-is-python3
python3 --version
python --version
<<: *BUILD_AND_STORE_WHEELS


macos_arm64_wheel_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:14
env:
CIBW_BUILD: cp39-* cp310-* cp311-*
PATH: /opt/homebrew/opt/python@3.10/bin:$PATH

build_script: |
brew install python@3.10
ln -s python3 /opt/homebrew/opt/python@3.10/bin/python
python --version
python3 --version
<<: *BUILD_AND_STORE_WHEELS


wheel_upload_task:
depends_on:
- macos_arm64_wheel
- linux_aarch64_wheel
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder
platform: linux
env:
TESTPYPI: ENCRYPTED[!adb082e719dbf71b700796a3f6969d1ca8ba69879cbf8ce4e969285b2ccd0212a54afea897c8d55174bd18388b22fd7a!]
PYPI: ENCRYPTED[!35e6711ac1b0f6ff790a2743db2e02c9efc07a49865252c53f9482c71609946746eb7d05fa75a13c094c9692f4d869d4!]
uploady_script: |
curl https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/wheels.zip --output wheels.zip
unzip wheels.zip
ls *
ls wheelhouse
apt install -y python3-venv python-is-python3
python --version
python3 --version
python -m pip install pipx

export TWINE_USERNAME="__token__"

echo $CIRRUS_RELEASE
echo $CIRRUS_TAG

if [ ! -z "$CIRRUS_RELEASE" ]; then
echo "RELEASE INCOMING!"
export TWINE_PASSWORD=$PYPI
pipx run twine upload -r pypi wheelhouse/* --non-interactive
elif [[ $CIRRUS_TAG == "package-"* ]]; then
echo "Let's get this tested!"
export TWINE_PASSWORD=$TESTPYPI
pipx run twine upload -r testpypi wheelhouse/* --non-interactive
else
echo "Nothing to see here I'm afraid"
fi
1 change: 1 addition & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Fixes
(Issue #3336)

Enhancements
* ARM64 (osx and linux) wheels now uploaded on release (Issue #4054)
* Add simple atomic distance analysis to `analysis.atomicdistances` with
new class `AtomicDistances` (Issue #3654)
* Add kwarg `n_frames` to class method `empty()` in
Expand Down