Skip to content

try reinstalling gcc on mac #105

try reinstalling gcc on mac

try reinstalling gcc on mac #105

Workflow file for this run

name: Run tests
on:
push:
release:
workflow_dispatch:
jobs:
test_ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install numpy
pip install scipy
pip install Cython
- name: Install
run: |
pip install .
- name: Run tests
run: |
pip install pytest
pytest -v
test_macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: awvwgk/setup-fortran@main
id: setup-fortran
with:
compiler: gcc
version: 12
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install numpy
pip install scipy
pip install Cython
# - name: Provide gfortran
# run: |
# ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
- name: Install
run: |
pip install .
- name: Run tests
run: |
pip install pytest
pytest -v
test_windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: intel
version: '2023.2'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install numpy
pip install scipy
pip install Cython
- name: Install
run: |
pip install .
- name: Run tests
run: |
pip install pytest
pytest -v
conda_build_ubuntu:
name: Conda Build (Python ${{matrix.python-version}})
needs: [test_ubuntu]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Config Conda
shell: bash -l {0}
run: |
conda install --channel conda-forge conda-build anaconda-client conda-verify
conda config --add channels conda-forge
conda config --add channels underworldcode
conda config --set anaconda_upload no
- name: Config Conda For Upload
if: github.event_name == 'release'
shell: bash -l {0}
run: conda config --set anaconda_upload yes
- name: Upload new Packages
if: github.event_name == 'release'
shell: bash -l {0}
run: |
anaconda login --hostname github-actions-${{ matrix.os }}-$RANDOM --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build --channel conda-forge --user geo-down-under conda
anaconda logout
conda_build_macos:
name: Conda Build (Python ${{matrix.python-version}})
needs: [test_macos]
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Config Conda
shell: bash -l {0}
run: |
conda install --channel conda-forge conda-build anaconda-client conda-verify
conda config --add channels conda-forge
conda config --add channels underworldcode
conda config --set anaconda_upload no
- name: Config Conda For Upload
if: github.event_name == 'release'
shell: bash -l {0}
run: conda config --set anaconda_upload yes
- name: Upload new Packages
if: github.event_name == 'release'
shell: bash -l {0}
run: |
anaconda login --hostname github-actions-${{ matrix.os }}-$RANDOM --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build --channel conda-forge --user geo-down-under conda
anaconda logout
conda_build_windows:
name: Conda Build (Python ${{matrix.python-version}} ${{ matrix.os }})
needs: [test_windows]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Config Conda
shell: bash -l {0}
run: |
conda install --channel conda-forge conda-build anaconda-client conda-verify
conda config --add channels conda-forge
conda config --add channels underworldcode
conda config --set anaconda_upload no
- name: Config Conda For Upload
if: github.event_name == 'release'
shell: bash -l {0}
run: conda config --set anaconda_upload yes
- name: Upload new Packages
if: github.event_name == 'release'
shell: bash -l {0}
run: |
anaconda login --hostname github-actions-${{ matrix.os }}-$RANDOM --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build --channel conda-forge --user geo-down-under conda
anaconda logout
pypi_windows:
name: Build windows PYPI package
runs-on: windows_latest
needs: test_windows
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install numpy
pip install scipy
pip install Cython
pip install meson
pip install build
- name: Provide gfortran
run: |
ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
- name: Package for Pypi
run: |
python -m build
- name: Upload to Pypi
run: |
python -m twine upload dist/* -r pypi --skip-existing
pypi_macos:
name: Build macos PYPI package
runs-on: macos-latest
needs: test_macos
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: awvwgk/setup-fortran@main
id: setup-fortran
with:
compiler: gcc
version: 12
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install numpy
pip install scipy
pip install Cython
pip install meson
pip install build
# - name: Provide gfortran
# run: |
# ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
- name: Package for Pypi
run: |
python -m build
- name: Upload to Pypi
run: |
python -m twine upload dist/* -r pypi --skip-existing
manylinux:
name: Build manylinux PYPI package
needs: test_ubuntu
runs-on: ubuntu-latest
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools twine wheel
pip install numpy
pip install scipy
pip install Cython
pip install meson
pip install build
- name: Build manylinux Python wheels
uses: RalfG/python-wheels-manylinux-build@v0.7.1
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312'
pip-wheel-args: '--no-deps'
build-requirements: 'cython numpy meson build setuptools'
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload *-manylinux*.whl --skip-existing