Update GHA XI #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-13, macos-14] | |
python-version: ["3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Ubuntu | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update -y && sudo apt-get install git build-essential libxmu-dev libxi-dev libgl-dev libglew-dev libpng-dev libfreetype6-dev libxml2-dev libmsgpack-dev libglm-dev libnetcdf-dev autoconf perl perl-openssl-defaults -y | |
- name: Setup IPC::cmd perl for Ubuntu | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt install cpanminus | |
cpanm IPC::Cmd | |
- 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 cibuildwheel | |
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) | |
cibuildwheel . | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PyMOL-wheel-${{ matrix.os }}-${{ matrix.python-version }} | |
path: ./wheelhouse/*.whl |