Skip to content
57 changes: 37 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,40 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.13']
os: [ubuntu-latest, macos-13, macos-14, windows-latest]

runs-on: ${{ matrix.os }}
steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Install python (MacOS)
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies (MacOS)
if: matrix.os == 'macos-latest'
- name: build GSL (MacOS-13)
if: matrix.os == 'macos-13'
run: |
wget https://mirror.ibcp.fr/pub/gnu/gsl/gsl-latest.tar.gz
tar -xvzf gsl-latest.tar.gz
cd gsl-2.8
./configure
make
sudo make install
cd ..
export PATH=/usr/local/bin:$PATH

- name: Install GSL (MacOS-14)
if: matrix.os == 'macos-14'
run: |
brew install gsl

- name: Install dependencies (MacOS)
if: matrix.os != 'windows-latest' && matrix.os != 'ubuntu-latest'
run: |
pip install twine
pip install wheel
pip install setuptools
Expand All @@ -33,16 +49,18 @@ jobs:
pip install diffpy.structure

- name: set up conda
if: matrix.os != 'macos-latest'

if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}

- name: Install dependencies (ubntu-latest, windows-latest)
if: matrix.os != 'macos-latest'
- name: Install dependencies (ubuntu-latest, windows-latest)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
run: |
conda install gsl -c conda-forge
pip install "numpy==1.21.0"
pip install twine
pip install wheel
pip install setuptools
Expand All @@ -56,7 +74,6 @@ jobs:

- name: Run tests
run: |
pip install numpy
python setup.py install
python conda-recipe/run_test.py

Expand All @@ -72,15 +89,15 @@ jobs:
tag: 0.0.2
body: This is an alpha build of the pdffit2 library (0.0.2)

- name: Checkout target repo
uses: actions/checkout@v4
env:
REPO: easyScience/pypi
REPO_PATH: pypi
with:
fetch-depth: 0
token: ${{ secrets.ES_TOKEN }}
repository: ${{ env.REPO }}
path: ${{ env.REPO_PATH }}
ref: "master" # temporarily, switch branch from master
# - name: Checkout target repo
# uses: actions/checkout@v4
# env:
# REPO: easyScience/pypi
# REPO_PATH: pypi
# with:
# fetch-depth: 0
# token: ${{ secrets.ES_TOKEN }}
# repository: ${{ env.REPO }}
# path: ${{ env.REPO_PATH }}
# ref: "master" # temporarily, switch branch from master

Loading