Merge pull request #13 from maxiv-science/condabuild-for-windows #136
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
name: Python Package using Conda | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 # Increased timeout limit | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-version: latest | |
- name: Install conda-build | |
shell: bash -l {0} | |
run: conda install conda-build setuptools_scm boa git | |
- name: build package | |
shell: bash -l {0} | |
run: | | |
export SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm) | |
echo "Version: " | |
echo $SETUPTOOLS_SCM_PRETEND_VERSION | |
conda mambabuild $GITHUB_WORKSPACE/conda-recipe --output-folder=$GITHUB_WORKSPACE | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: package-${{ github.sha }} | |
path: ${{ github.workspace }}/**/azint*.bz2 | |
build-win: | |
runs-on: windows-latest | |
timeout-minutes: 30 # Increased timeout limit | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-version: latest | |
- name: Install conda-build | |
shell: pwsh # Use PowerShell shell | |
run: conda install conda-build setuptools_scm boa git | |
- name: build package | |
shell: pwsh | |
run: | | |
$env:SETUPTOOLS_SCM_PRETEND_VERSION = $(python -m setuptools_scm) | |
Write-Host "Version: $env:SETUPTOOLS_SCM_PRETEND_VERSION" | |
conda mambabuild "$env:GITHUB_WORKSPACE/conda-recipe" --output-folder="$env:GITHUB_WORKSPACE" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: package-${{ github.sha }} | |
path: ${{ github.workspace }}/**/azint*.bz2 | |
build-mac-arm: | |
runs-on: macos-14 | |
timeout-minutes: 30 # Increased timeout limit | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
- name: Install conda-build | |
shell: bash -l {0} | |
run: conda install conda-build setuptools_scm boa git | |
- name: build package | |
shell: bash -l {0} | |
run: | | |
export SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm) | |
echo "Version: " | |
echo $SETUPTOOLS_SCM_PRETEND_VERSION | |
conda mambabuild $GITHUB_WORKSPACE/conda-recipe --output-folder=$GITHUB_WORKSPACE | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: package-${{ github.sha }} | |
path: ${{ github.workspace }}/**/azint*.bz2 |