Fix mpich install command. #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pypi: | |
env: | |
IGNORE_CONDA: true | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-latest] | |
python-version: ["3.9", "3.10", "3.11"] | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: mpi4py/setup-mpi@v1 | |
- run: | | |
python3 -m pip install -U pip | |
- if: ${{ contains(matrix.os, 'ubuntu') }} | |
run: | | |
./pr-check.sh | |
- if: ${{ contains(matrix.os, 'macos') }} | |
run: | | |
brew install libomp llvm | |
export CLANG_PREFIX=$(brew --prefix llvm) | |
export OMP_PREFIX=$(brew --prefix libomp) | |
export CC=$CLANG_PREFIX/bin/clang | |
export CXX=$CLANG_PREFIX/bin/clang++ | |
export LDFLAGS="-L$CLANG_PREFIX/lib | |
-Wl,-rpath,$CLANG_PREFIX/lib $LDFLAGS -L$OMP_PREFIX/lib" | |
export CPPFLAGS="-I$CLANG_PREFIX/include $CPPFLAGS -I$OMP_PREFIX/include" | |
./pr-check.sh | |
# - uses: codecov/codecov-action@v1 | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# os: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
os: [ubuntu-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v5 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.19.0 | |
- 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 | |
conda: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ['3.9', '3.10', '3.11'] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- if: ${{ contains(matrix.os, 'macos') }} | |
uses: conda-incubator/setup-miniconda@v3 | |
- name: Setup micromamba and boa | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-name: test-env | |
create-args: >- | |
python=${{ matrix.python-version }} | |
boa | |
- name: Build and test package | |
id: build-package | |
run: | | |
export CONDA_HOME=$CONDA | |
conda install conda-build | |
out_dir="${{ matrix.os }}-build" | |
.conda/bin/build ${{ matrix.python-version }} $out_dir | |
echo "PACKAGE_PATH=${out_dir}" >> "$GITHUB_OUTPUT" | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ steps.build-package.outputs.PACKAGE_PATH }} | |
publish_conda: | |
needs: [conda, pypi] | |
name: Publish to Anaconda | |
environment: anaconda | |
permissions: | |
id-token: write | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: ${{ steps.build-package.outputs.PACKAGE_PATH }} | |
- name: List files in artifact | |
run: find ${{ steps.build-package.outputs.PACKAGE_PATH }} -type f -name "*.tar.bz2" | |
- name: Upload to Anaconda | |
run: | | |
export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }} | |
find ${{ steps.build-package.outputs.PACKAGE_PATH }} -type f -name "*.tar.bz2" -exec echo "anaconda upload {}" \; | |
dist: | |
name: Distribution build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: hynek/build-and-inspect-python-package@v1 | |
publish_pypi: | |
name: Publish to PyPI | |
needs: [dist, pypi, conda] | |
environment: | |
name: pypi | |
url: https://pypi.org/p/brainiak | |
permissions: | |
id-token: write | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: Packages | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 |