From 9834abbe63d7b56a228b0d96abe14d69c7eaeae9 Mon Sep 17 00:00:00 2001 From: JM Rohwer Date: Thu, 14 Dec 2023 10:51:02 +0200 Subject: [PATCH] unify GH workflow file for Anaconda build, test with Py3.11 --- .github/workflows/build-conda-unix.yml | 43 ------------------- .../{build-conda-win.yml => build-conda.yml} | 24 ++++++++--- packaging/conda-unix/conda_build_config.yaml | 8 ++-- packaging/conda-win/conda_build_config.yaml | 4 +- 4 files changed, 23 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/build-conda-unix.yml rename .github/workflows/{build-conda-win.yml => build-conda.yml} (65%) diff --git a/.github/workflows/build-conda-unix.yml b/.github/workflows/build-conda-unix.yml deleted file mode 100644 index 7fe9720..0000000 --- a/.github/workflows/build-conda-unix.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: CI build Anaconda on Linux and macOS - -on: - workflow_dispatch: - release: - types: - - released - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: -# os: [ubuntu-latest, macos-12] - os: [macos-12] - name: Build Anaconda packages on ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4 - - name: Setup conda - uses: s-weigand/setup-conda@v1 - with: - update-conda: false - conda-channels: conda-forge - - - name: Prepare conda environment - run: | - conda install mamba boa conda-verify anaconda-client - mamba update --all - mkdir build_output - - - name: Build packages - run: conda mambabuild --no-anaconda-upload --output-folder ./build_output ./packaging/conda-unix - - - uses: actions/upload-artifact@v3 - with: - name: build_outputs - path: ./build_output/*/pysces*.tar.bz2 - - - name: Upload to anaconda.org - # to publish when a GitHub Release is created: - if: github.event_name == 'release' && github.event.action == 'released' - run: anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u pysces ./build_output/*/pysces*.tar.bz2 diff --git a/.github/workflows/build-conda-win.yml b/.github/workflows/build-conda.yml similarity index 65% rename from .github/workflows/build-conda-win.yml rename to .github/workflows/build-conda.yml index 3d5759f..b2559d1 100644 --- a/.github/workflows/build-conda-win.yml +++ b/.github/workflows/build-conda.yml @@ -1,4 +1,4 @@ -name: CI build Anaconda on Windows +name: CI build Anaconda on: workflow_dispatch: @@ -8,17 +8,22 @@ on: jobs: build: - runs-on: windows-latest - name: Build Anaconda packages on windows-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-12] + name: Build Anaconda packages on ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Install rtools MinGW compilers + - name: (windows) Install rtools MinGW compilers + if: matrix.os == 'windows-latest' run: | choco install rtools -y --no-progress --force --version=4.0.0.20220206 - - name: Add compiler path to PATH + - name: (windows) Add compiler path to PATH + if: matrix.os == 'windows-latest' uses: myci-actions/export-env-var-powershell@1 with: name: PATH @@ -36,9 +41,14 @@ jobs: mamba update --all mkdir build_output - - name: Build packages - run: conda mambabuild --no-anaconda-upload --output-folder ./build_output ./packaging/conda-win + - name: Build packages for ${{ matrix.os }} + if: matrix.os != 'windows-latest' + run: conda mambabuild --no-anaconda-upload --output-folder ./build_output ./packaging/conda-unix + - name: Build packages for ${{ matrix.os }} + if: matrix.os == 'windows-latest' + run: conda mambabuild --no-anaconda-upload --output-folder ./build_output ./packaging/conda-win + - uses: actions/upload-artifact@v3 with: name: build_outputs diff --git a/packaging/conda-unix/conda_build_config.yaml b/packaging/conda-unix/conda_build_config.yaml index 1061f18..eb27cd5 100644 --- a/packaging/conda-unix/conda_build_config.yaml +++ b/packaging/conda-unix/conda_build_config.yaml @@ -1,11 +1,11 @@ python: - - 3.9 - - 3.10 +# - 3.9 +# - 3.10 - 3.11 # - 3.12 numpy: - - 1.23 - - 1.23 +# - 1.23 +# - 1.23 - 1.23 # - 1.26 zip_keys: diff --git a/packaging/conda-win/conda_build_config.yaml b/packaging/conda-win/conda_build_config.yaml index f0651e6..863ab38 100644 --- a/packaging/conda-win/conda_build_config.yaml +++ b/packaging/conda-win/conda_build_config.yaml @@ -1,5 +1,5 @@ python: - - 3.9 - - 3.10 +# - 3.9 +# - 3.10 - 3.11 # - 3.12