Skip to content

Commit

Permalink
Disable stuff to test upload on my fork.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidt0x committed Nov 26, 2024
1 parent fa8643c commit f56a7c2
Showing 1 changed file with 97 additions and 90 deletions.
187 changes: 97 additions & 90 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: wheels and conda

on:
workflow_dispatch:
release:
types:
- published
pull_request:
paths:
- .github/workflows/cd.yml
push:

#on:
# workflow_dispatch:
# release:
# types:
# - published
# pull_request:
# paths:
# - .github/workflows/cd.yml

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -35,66 +39,66 @@ jobs:
name: cibw-sdist
path: dist/*.tar.gz

build_wheels:
name: Wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
fail-fast: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Use intel mpi on windows
- uses: mpi4py/setup-mpi@v1
if: ${{ contains(matrix.os, 'windows') }}
with:
mpi: msmpi

# Else, use the default for the OS and setup-mpi action
- uses: mpi4py/setup-mpi@v1
if: ${{ !contains(matrix.os, 'windows') }}

- name: Checkout LLVM on macOS
if: runner.os == 'macOS'
uses: actions/checkout@v4
with:
repository: llvm/llvm-project
ref: release/18.x
path: llvm-project

- name: Build OpenMP on macOS
if: runner.os == 'macOS'
env:
MACOSX_DEPLOYMENT_TARGET: "10.9"
working-directory: llvm-project
run: |
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$(brew --prefix) \
-DCMAKE_INSTALL_NAME_DIR=$(brew --prefix)/lib \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLIBOMP_INSTALL_ALIASES=OFF \
-S openmp \
-B build
cmake --build build --parallel
cmake --install build
- uses: actions/setup-python@v5

- name: Install cibuildwheel
run: python -m pip install cibuildwheel

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
# build_wheels:
# name: Wheel on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest, macos-13, macos-14]
# fail-fast: true
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# # Use intel mpi on windows
# - uses: mpi4py/setup-mpi@v1
# if: ${{ contains(matrix.os, 'windows') }}
# with:
# mpi: msmpi
#
# # Else, use the default for the OS and setup-mpi action
# - uses: mpi4py/setup-mpi@v1
# if: ${{ !contains(matrix.os, 'windows') }}
#
# - name: Checkout LLVM on macOS
# if: runner.os == 'macOS'
# uses: actions/checkout@v4
# with:
# repository: llvm/llvm-project
# ref: release/18.x
# path: llvm-project
#
# - name: Build OpenMP on macOS
# if: runner.os == 'macOS'
# env:
# MACOSX_DEPLOYMENT_TARGET: "10.9"
# working-directory: llvm-project
# run: |
# cmake \
# -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_INSTALL_PREFIX=$(brew --prefix) \
# -DCMAKE_INSTALL_NAME_DIR=$(brew --prefix)/lib \
# -DCMAKE_C_COMPILER=clang \
# -DCMAKE_CXX_COMPILER=clang++ \
# -DLIBOMP_INSTALL_ALIASES=OFF \
# -S openmp \
# -B build
# cmake --build build --parallel
# cmake --install build
#
# - uses: actions/setup-python@v5
#
# - name: Install cibuildwheel
# run: python -m pip install cibuildwheel
#
# - name: Build wheels
# run: python -m cibuildwheel --output-dir wheelhouse
#
# - uses: actions/upload-artifact@v4
# with:
# name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
# path: ./wheelhouse/*.whl

build_conda:
name: Conda on ${{ matrix.os }} with Python ${{ matrix.python-version }}
Expand All @@ -104,8 +108,10 @@ jobs:
shell: bash -leo pipefail {0}
strategy:
matrix:
os: [ ubuntu-latest, macos-13, macos-latest ]
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
# os: [ ubuntu-latest, macos-13, macos-latest ]
# python-version: [ '3.9', '3.10', '3.11', '3.12' ]
os: [ ubuntu-latest ]
python-version: [ '3.11']
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -152,31 +158,32 @@ jobs:
name: conda-package-${{ matrix.os }}-${{ matrix.python-version }}
path: conda-package

publish_pypi:
name: Publish to PyPI
needs: [ build_wheels, build_conda, make_sdist ]
environment:
name: pypi
url: https://pypi.org/p/brainiak
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- name: List files in artifact(s)
run: ls -l dist

- uses: pypa/gh-action-pypi-publish@release/v1
# publish_pypi:
# name: Publish to PyPI
# needs: [ build_wheels, build_conda, make_sdist ]
# environment:
# name: pypi
# url: https://pypi.org/p/brainiak
# permissions:
# id-token: write
# runs-on: ubuntu-latest
# if: github.event_name == 'release' && github.event.action == 'published'
# steps:
# - uses: actions/download-artifact@v4
# with:
# pattern: cibw-*
# path: dist
# merge-multiple: true
#
# - name: List files in artifact(s)
# run: ls -l dist
#
# - uses: pypa/gh-action-pypi-publish@release/v1

publish_conda:
name: Publish to Anaconda
needs: [ build_conda, build_wheels, make_sdist ]
# needs: [ build_conda, build_wheels, make_sdist ]
needs: [ build_conda, make_sdist ]
environment: anaconda
permissions:
id-token: write
Expand Down

0 comments on commit f56a7c2

Please sign in to comment.