Skip to content

Commit

Permalink
Test specifying per-platform whether to do a conda build
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjbillington committed Apr 7, 2023
1 parent 305aea4 commit 818f624
Showing 1 changed file with 30 additions and 23 deletions.
53 changes: 30 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Build and Release
on:
push:
branches:
- master
- maintenance/*
# - master
# - maintenance/*
- conditionalconda
create:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
Expand Down Expand Up @@ -37,25 +38,29 @@ jobs:
strategy:
matrix:
include:
- { os: ubuntu-latest, python: '3.10', arch: x64 }
- { os: ubuntu-latest, python: '3.9', arch: x64 }
- { os: ubuntu-latest, python: '3.8', arch: x64 }
- { os: ubuntu-latest, python: '3.7', arch: x64 }

- { os: macos-10.15, python: '3.10', arch: x64 }
- { os: macos-10.15, python: '3.9', arch: x64 }
- { os: macos-10.15, python: '3.8', arch: x64 }
- { os: macos-10.15, python: '3.7', 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 }
- { os: windows-latest, python: '3.7', arch: x64 }

- { os: windows-latest, python: '3.10', arch: x86 }
- { os: windows-latest, python: '3.9', arch: x86 }
- { os: windows-latest, python: '3.8', arch: x86 }
- { os: windows-latest, python: '3.7', arch: x86 }
- { os: ubuntu-latest, python: '3.11', arch: x64, conda: true}
- { os: ubuntu-latest, python: '3.10', arch: x64, conda: true }
- { os: ubuntu-latest, python: '3.9', arch: x64, conda: true }
- { os: ubuntu-latest, python: '3.8', arch: x64, conda: true }
- { os: ubuntu-latest, python: '3.7', arch: x64, conda: true }

- { os: macos-10.15, python: '3.11', arch: x64, conda: true }
- { os: macos-10.15, python: '3.10', arch: x64, conda: true }
- { os: macos-10.15, python: '3.9', arch: x64, conda: true }
- { os: macos-10.15, python: '3.8', arch: x64, conda: true }
- { os: macos-10.15, python: '3.7', arch: x64, conda: true }

- { os: windows-latest, python: '3.11', arch: x64, conda: true }
- { os: windows-latest, python: '3.10', arch: x64, conda: true }
- { os: windows-latest, python: '3.9', arch: x64, conda: true }
- { os: windows-latest, python: '3.8', arch: x64, conda: true }
- { os: windows-latest, python: '3.7', arch: x64, conda: true }

- { os: windows-latest, python: '3.11', arch: x86, conda: false } # conda not yet available
- { os: windows-latest, python: '3.10', arch: x86, conda: true }
- { os: windows-latest, python: '3.9', arch: x86, conda: true }
- { os: windows-latest, python: '3.8', arch: x86, conda: true }
- { os: windows-latest, python: '3.7', arch: x86, conda: true }

if: github.repository == 'rpanderson/workflow-sandbox' && (github.event_name != 'create' || github.event.ref_type != 'branch')
steps:
Expand Down Expand Up @@ -95,6 +100,7 @@ jobs:
path: ./dist

- name: Set Variables for Conda Build
if: matrix.conda
shell: bash
run: |
if [ $NOARCH == true ]; then
Expand All @@ -105,6 +111,7 @@ jobs:
echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
- name: Install Miniconda
if: matrix.conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
Expand All @@ -119,14 +126,14 @@ jobs:
xcode-version: 11.7

- name: Conda package (Unix)
if: runner.os != 'Windows'
if: (matrix.conda && runner.os != 'Windows')
shell: bash -l {0}
run: |
conda install -c labscript-suite setuptools-conda
setuptools-conda build $CONDA_BUILD_ARGS .
- name: Conda Package (Windows)
if: runner.os == 'Windows'
if: (matrix.conda && runner.os == 'Windows')
shell: cmd /C CALL {0}
run: |
conda install -c labscript-suite setuptools-conda && ^
Expand Down

0 comments on commit 818f624

Please sign in to comment.