Skip to content

Commit

Permalink
Sync the relevant bits with latest workflow-sandbox. Split build matr…
Browse files Browse the repository at this point in the history
…ix up again

This is less efficient, but otherwise easier to deal with - we can more
clearly see which Python versions are a problem on GitHub
  • Loading branch information
chrisjbillington committed Nov 28, 2024
1 parent 99868d0 commit 6d04acb
Showing 1 changed file with 43 additions and 17 deletions.
60 changes: 43 additions & 17 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ name: Build and Release
on:
push:
branches:
# - master
#- master
- workflow-test
create:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
pull_request:

env:
SCM_LOCAL_SCHEME: no-local-version
Expand All @@ -21,20 +19,43 @@ jobs:
strategy:
matrix:
include:
- { os: ubuntu-latest, pythons: '3.13,3.12,3.11,3.10,3.9,3.8', arch: x64 }
- { os: windows-latest, pythons: '3.13,3.12,3.11,3.10,3.9,3.8', arch: x64 }
- { os: macos-13, pythons: '3.13,3.12,3.11,3.10,3.9,3.8', arch: x64 }
- { os: macos-latest, pythons: '3.13,3.12,3.11,3.10,3.9,3.8', arch: arm64 }
- { os: ubuntu-latest, python: '3.13', arch: x64 }
- { os: ubuntu-latest, python: '3.12', arch: x64 }
- { os: ubuntu-latest, python: '3.11', arch: x64 }
- { os: ubuntu-latest, python: '3.10', arch: x64 }
- { os: ubuntu-latest, python: '3.9', arch: x64 }
- { os: ubuntu-latest, python: '3.8', arch: x64 }

if: github.repository == 'chrisjbillington/setuptools-conda' && (github.event_name != 'create' || github.event.ref_type != 'branch')
- { os: macos-13, python: '3.13', arch: x64 }
- { os: macos-13, python: '3.12', arch: x64 }
- { os: macos-13, python: '3.11', arch: x64 }
- { os: macos-13, python: '3.10', arch: x64 }
- { os: macos-13, python: '3.9', arch: x64 }
- { os: macos-13, python: '3.8', arch: x64 }

- { os: macos-latest, python: '3.13', arch: arm64 }
- { os: macos-latest, python: '3.12', arch: arm64 }
- { os: macos-latest, python: '3.11', arch: arm64 }
- { os: macos-latest, python: '3.10', arch: arm64 }
- { os: macos-latest, python: '3.9', arch: arm64 }

- { os: windows-latest, python: '3.13', arch: x64 }
- { os: windows-latest, python: '3.12', arch: x64 }
- { os: windows-latest, python: '3.11', arch: x64 }
- { os: windows-latest, python: '3.10', arch: x64 }
- { os: windows-latest, python: '3.9', arch: x64 }
- { os: windows-latest, python: '3.8', arch: x64 }


if: github.repository == 'chrisjbillington/setuptools-conda'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Ignore Tags
if: github.event.ref_type != 'tag'
if: github.event.ref_type == 'push' && contains(github.ref, '/tags')
run: git tag -d $(git tag --points-at HEAD)

- name: Install Miniconda
Expand All @@ -50,17 +71,17 @@ jobs:
- name: Conda package (Unix)
if: runner.os != 'Windows'
shell: bash -l {0}
run: python -m setuptools_conda --pythons=${{ matrix.pythons }} build .
run: python -m setuptools_conda --pythons=${{ matrix.python }} build .

- name: Conda Package (Windows)
if: runner.os == 'Windows'
shell: cmd /C CALL {0}
run: python -m setuptools_conda --pythons=${{ matrix.pythons }} build .
run: python -m setuptools_conda --pythons=${{ matrix.python }} build .

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: conda_packages
name: conda_packages-${{ matrix.os }}-py${{ matrix.python }}-${{ matrix.arch }}
path: ./conda_packages

# release:
Expand All @@ -74,18 +95,23 @@ jobs:
# with:
# name: conda_packages
# path: ./conda_packages
# merge-multiple: true

# - name: Install Miniconda
# uses: conda-incubator/setup-miniconda@v2
# uses: conda-incubator/setup-miniconda@v3
# with:
# auto-update-conda: true
# miniforge-version: "latest"
# conda-remove-defaults: true
# auto-activate-base: true
# activate-environment: ""

# - name: Install Anaconda cloud client
# shell: bash -l {0}
# run: conda install anaconda-client

# - name: Publish to Anaconda test label
# if: github.event.ref_type != 'tag'
# if: contains(github.ref, '/tags')
# shell: bash -l {0}
# run: |
# anaconda \
Expand All @@ -97,7 +123,7 @@ jobs:

# - name: Publish to Anaconda main label
# shell: bash -l {0}
# if: github.event.ref_type == 'tag'
# if: contains(github.ref, '/tags')
# run: |
# anaconda \
# --token ${{ secrets.ANACONDA_API_TOKEN }} \
Expand Down

0 comments on commit 6d04acb

Please sign in to comment.