Skip to content

Update mopac & mopactools versions #6

Update mopac & mopactools versions

Update mopac & mopactools versions #6

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
MOPAC_VERSION: 23.2.1
jobs:
build-src:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build package
shell: bash
run: |
pip install build
python -m build
- name: Save wheel artifacts
uses: actions/upload-artifact@v4
with:
name: src-tarball
path: dist/*.gz
build-wheel:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
include:
- osname: mac
platform: macosx-10.13-universal2
arc: zip
lib: dylib
libdir: lib
util: unzip
os: macos-13
- osname: linux
platform: manylinux_2_17_x86_64
arc: tar.gz
lib: so*
libdir: lib
util: "tar -xvzf"
os: ubuntu-latest
- osname: win
platform: win-amd64
arc: zip
lib: dll
libdir: bin
util: unzip
os: windows-latest
steps:
- uses: actions/checkout@v4
- name: Download the shared library from GitHub Release
shell: bash
run: |
curl -OL https://github.com/openmopac/mopac/releases/download/v${{ env.MOPAC_VERSION }}/mopac-${{ env.MOPAC_VERSION }}-${{ matrix.osname }}.${{ matrix.arc }}
${{ matrix.util }} mopac-${{ env.MOPAC_VERSION }}-${{ matrix.osname }}.${{ matrix.arc }}
mkdir src/mopactools/lib
mv mopac-${{ env.MOPAC_VERSION }}-${{ matrix.osname }}/${{ matrix.libdir }}/*.${{ matrix.lib }} src/mopactools/lib
ls src/mopactools/lib
- name: Build package
shell: bash
run: |
pip install build
python -m build -C--build-option=--plat-name=${{ matrix.platform }}
- name: Run tests
shell: bash
run: |
pip install .
pip install pytest
pytest
# I'll do this by hand for now...
# - name: Deploy to PyPI
# shell: bash
# run: |
# pip install twine==6.0.1
# python -m twine upload --repository testpypi dist/*.whl
- name: Save wheel artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-wheel
path: dist/*.whl
merge:
runs-on: ubuntu-latest
needs: [build-src, build-wheel]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: mopactools-wheel
delete-merged: true