Skip to content

Add numpy headers and github actions #1

Add numpy headers and github actions

Add numpy headers and github actions #1

#A* -------------------------------------------------------------------
#B* This file contains source code for running a GitHub automation
#-* related to the build process of the PyMOL computer program
#C* Copyright 2025 by Martin Urban.
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove this copyright notice.
#F* -------------------------------------------------------------------
#G* Please see the accompanying LICENSE file for further information.
#H* -------------------------------------------------------------------
#I* Additional authors of this source file include:
#-*
#-*
#-*
#Z* -------------------------------------------------------------------
name: Build wheel files for all UNIX like operating systems
on: [push]
env:
VCPKG_ROOT: ${{ github.workspace }}/vendor/vcpkg
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Initialize vcpkg
run: |
git clone https://github.com/Microsoft/vcpkg.git vendor/vcpkg
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create virtual environment
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install wheel setuptools # setuptools needed for Python >=3.12
python -m pip install -r requirements.txt
- name: Bootstrap vcpkg
run: ${{ env.VCPKG_ROOT }}/bootstrap-vcpkg.sh -disableMetrics
- name: Install vcpkg dependencies
run: |
${{ env.VCPKG_ROOT }}/vcpkg install
- name: Build extension
run: |
source .venv/bin/activate
python automations/my_automator.py setup dev-env
export ARCH=$(uname -m)
python -m build
pip install dist/*.whl
- name: Run pytest
run: |
source .venv/bin/activate
pip install pytest
cd tests/
pytest
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: PyMOL-wheel-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/*.whl