Skip to content

Commit

Permalink
Good verison.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Ciobanu committed Feb 28, 2024
1 parent 021dea9 commit 0c7ee10
Showing 1 changed file with 60 additions and 67 deletions.
127 changes: 60 additions & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
name: CI

#on: [push, pull_request]
on: [workflow_dispatch, push]
on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]

#test:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# #os: [ubuntu-latest, macos-latest, windows-latest]
# #python-version: ["3.9", "3.10", "3.11", "3.12"]
# os: [macos-14]
# #python-version: ["3.9", "3.10", "3.11", "3.12"]
# python-version: ["3.11"]

# steps:
# - uses: actions/checkout@v4
steps:
- uses: actions/checkout@v4

# - name: Setup Conda Environment
# uses: conda-incubator/setup-miniconda@v2
# with:
# miniforge-variant: Mambaforge
# miniforge-version: latest
# use-mamba: true
# python-version: ${{ matrix.python-version }}
# environment-file: ci/environment.yaml
# activate-environment: test-environment
- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: ci/environment.yaml
activate-environment: test-environment

# - name: Run tests
# shell: bash -l {0}
# run: |
# pip install -e .
# python selftest.py
- name: Run tests
shell: bash -l {0}
run: |
pip install -e .
python selftest.py
build:
name: "Build wheels on ${{ matrix.os }} ${{ matrix.cibw_archs }}"
Expand All @@ -41,18 +36,16 @@ jobs:
fail-fast: false
matrix:
include:
#- os: windows-2019
# cibw_archs: "AMD64 ARM64"
#- os: macos-12
# cibw_archs: "x86_64"
#- os: macos-13
# cibw_archs: "arm64"
- os: macos-14
cibw_archs: "x86_64 arm64"
#- os: "ubuntu-20.04"
# cibw_archs: "aarch64"
#- os: "ubuntu-20.04"
# cibw_archs: "x86_64"
- os: windows-2019
cibw_archs: "AMD64 ARM64"
- os: macos-11
cibw_archs: "x86_64"
- os: macos-14 # The macos-14 runner is arm64, while up until macos-13 the runners are x86_64.
cibw_archs: "arm64"
- os: "ubuntu-20.04"
cibw_archs: "aarch64"
- os: "ubuntu-20.04"
cibw_archs: "x86_64"

steps:
- uses: actions/checkout@v4
Expand All @@ -64,7 +57,7 @@ jobs:
platforms: all

# See discussion here: https://github.com/actions/runner-images/issues/9256
- name: Maker sure pipx is installed for the arm64 macOS for which it is not installed by default.
- name: Maker sure pipx is installed for the arm64 macOS runners.
if: runner.os == 'macOS' && runner.arch == 'ARM64'
run: |
brew install pipx
Expand All @@ -87,29 +80,29 @@ jobs:
name: wheelhouse
path: "./wheelhouse/*.whl"

# publish:
# runs-on: ubuntu-latest
# needs:
# - build
# steps:
# - uses: actions/checkout@v4
#
# - uses: actions/setup-python@v4
#
# - name: sdist
# run: |
# python -m pip install -U build pip
# python -m build -s
#
# - name: download
# uses: actions/download-artifact@v3
# with:
# name: wheelhouse
# path: dist
#
# - name: Publish package to PyPI
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# uses: pypa/[email protected]
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}
publish:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4

- name: sdist
run: |
python -m pip install -U build pip
python -m build -s
- name: download
uses: actions/download-artifact@v3
with:
name: wheelhouse
path: dist

- name: Publish package to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}

0 comments on commit 0c7ee10

Please sign in to comment.