From 9f3d9dd169e100a7d731f721ddb19b753af2acd4 Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Fri, 28 Mar 2025 09:48:57 +0100 Subject: [PATCH 1/2] split and modify mmg conda YAML --- .github/workflows/mmg-osx-arm64.yml | 43 ++++++++++++++++ .github/workflows/mmg-packaging-linux.yml | 35 +++++++++++++ .github/workflows/mmg-packaging-osx-64.yml | 43 ++++++++++++++++ .github/workflows/mmg-packaging.yml | 59 ---------------------- .github/workflows/mmg-windows.yml | 35 +++++++++++++ 5 files changed, 156 insertions(+), 59 deletions(-) create mode 100644 .github/workflows/mmg-osx-arm64.yml create mode 100644 .github/workflows/mmg-packaging-linux.yml create mode 100644 .github/workflows/mmg-packaging-osx-64.yml delete mode 100644 .github/workflows/mmg-packaging.yml create mode 100644 .github/workflows/mmg-windows.yml diff --git a/.github/workflows/mmg-osx-arm64.yml b/.github/workflows/mmg-osx-arm64.yml new file mode 100644 index 00000000..efbc475f --- /dev/null +++ b/.github/workflows/mmg-osx-arm64.yml @@ -0,0 +1,43 @@ +name: Conda packaging osx-arm64 + +on: + workflow_dispatch: + +jobs: + macos: + name: MacOS + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: "latest" + auto-update-conda: true + + - name: Configure Conda for osx-arm64 + shell: bash -l {0} + run: | + conda config --set subdir osx-arm64 + echo "CONDA_SUBDIR=osx-arm64" >> $GITHUB_ENV + + - name: Install Dependencies + shell: bash -l {0} + run: | + conda update --all + conda clean --all + conda install conda-build anaconda-client conda-verify + conda config --set anaconda_upload no + + - name: Build Package + shell: bash -l {0} + run: | + conda-build mmg.recipe -c set3mah -c conda-forge --no-test --output-folder . + + - name: Upload Conda Packages + shell: bash -l {0} + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} + run: | + anaconda upload osx-arm64/*.conda --force \ No newline at end of file diff --git a/.github/workflows/mmg-packaging-linux.yml b/.github/workflows/mmg-packaging-linux.yml new file mode 100644 index 00000000..97e9f31f --- /dev/null +++ b/.github/workflows/mmg-packaging-linux.yml @@ -0,0 +1,35 @@ +name: Create conda package for mmg + +on: + workflow_dispatch: + +jobs: + Linux: + name: Linux + runs-on: "ubuntu-latest" + steps: + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 + with: + miniconda-version: "latest" + auto-update-conda: true + + - name: Install Dependencies + shell: bash -l {0} + run: | + conda update --all + conda clean --all + conda install conda-build anaconda-client conda-verify + conda config --set anaconda_upload no + + - name: Build Package + shell: bash -l {0} + run: | + conda-build mmg.recipe -c set3mah -c conda-forge --no-test --output-folder . + + - name: Upload to Anaconda + shell: bash -l {0} + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} + run: | + anaconda upload linux-64/*.conda --force diff --git a/.github/workflows/mmg-packaging-osx-64.yml b/.github/workflows/mmg-packaging-osx-64.yml new file mode 100644 index 00000000..5fd56b2b --- /dev/null +++ b/.github/workflows/mmg-packaging-osx-64.yml @@ -0,0 +1,43 @@ +name: Conda packaging osx-x86-64 + +on: + workflow_dispatch: + +jobs: + macos: + name: MacOS + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: "latest" + auto-update-conda: true + + - name: Configure Conda for osx-64 + shell: bash -l {0} + run: | + conda config --set subdir osx-64 + echo "CONDA_SUBDIR=osx-64" >> $GITHUB_ENV + + - name: Install Dependencies + shell: bash -l {0} + run: | + conda update --all + conda clean --all + conda install conda-build anaconda-client conda-verify + conda config --set anaconda_upload no + + - name: Build Package + shell: bash -l {0} + run: | + conda-build mmg.recipe -c set3mah -c conda-forge --no-test --output-folder . + + - name: Upload Conda Packages + shell: bash -l {0} + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} + run: | + anaconda upload osx-64/*.conda --force diff --git a/.github/workflows/mmg-packaging.yml b/.github/workflows/mmg-packaging.yml deleted file mode 100644 index f92e6edd..00000000 --- a/.github/workflows/mmg-packaging.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Create conda package for mmg - -on: - workflow_dispatch: - -jobs: - Linux: - name: Linux - runs-on: "ubuntu-latest" - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - miniconda-version: "latest" - activate-environment: packaging - - name: Conda build for Linux - shell: bash -l {0} - run: | - conda install python=3.9 conda-build anaconda-client - anaconda logout - anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }} - conda-build mmg.recipe -c conda-forge -c set3mah --output-folder . - anaconda upload linux-64/*.tar.bz2 --force - - macos: - name: MacOS - runs-on: "macos-13" - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - miniconda-version: "latest" - activate-environment: packaging - - name: Conda build for MacOS - shell: bash -l {0} - run: | - conda install python=3.9 conda-build anaconda-client - anaconda logout - anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }} - conda-build mmg.recipe -c conda-forge -c set3mah --output-folder . - anaconda upload osx-64/*.tar.bz2 --force - - windows: - name: Windows - runs-on: "windows-latest" - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - miniconda-version: "latest" - activate-environment: packaging - - name: Conda build for Windows - shell: pwsh - run: | - conda install python=3.9 conda-build anaconda-client - anaconda logout - anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }} - conda-build mmg.recipe -c conda-forge -c set3mah --output-folder . - anaconda upload win-64/*.tar.bz2 --force diff --git a/.github/workflows/mmg-windows.yml b/.github/workflows/mmg-windows.yml new file mode 100644 index 00000000..3f1d4a0b --- /dev/null +++ b/.github/workflows/mmg-windows.yml @@ -0,0 +1,35 @@ +name: Conda packaging windows + +on: + workflow_dispatch: + +jobs: + windows: + name: Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: "latest" + + - name: Install Dependencies + shell: pwsh + run: | + conda update --all + conda clean --all + conda install conda-build anaconda-client conda-verify + conda config --set anaconda_upload no + + - name: Build Package + shell: pwsh + run: | + conda-build mmg.recipe -c set3mah -c conda-forge --no-test --output-folder . + + - name: Upload to Anaconda + shell: pwsh + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} + run: | + set ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }} + anaconda upload win-64/*.conda --force \ No newline at end of file From 423fb207beb7ac9a04ed27a125eebfc0331f6b2a Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Fri, 28 Mar 2025 10:17:27 +0100 Subject: [PATCH 2/2] ruff rules --- .github/workflows/mmg-osx-arm64.yml | 14 +++++++------- .github/workflows/mmg-packaging-linux.yml | 8 ++++---- .github/workflows/mmg-packaging-osx-64.yml | 12 ++++++------ .github/workflows/mmg-windows.yml | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/mmg-osx-arm64.yml b/.github/workflows/mmg-osx-arm64.yml index efbc475f..a30ad797 100644 --- a/.github/workflows/mmg-osx-arm64.yml +++ b/.github/workflows/mmg-osx-arm64.yml @@ -3,18 +3,18 @@ name: Conda packaging osx-arm64 on: workflow_dispatch: -jobs: +jobs: macos: name: MacOS runs-on: macos-latest steps: - uses: actions/checkout@v4 - + - uses: conda-incubator/setup-miniconda@v2 with: miniconda-version: "latest" - auto-update-conda: true + auto-update-conda: true - name: Configure Conda for osx-arm64 shell: bash -l {0} @@ -25,10 +25,10 @@ jobs: - name: Install Dependencies shell: bash -l {0} run: | - conda update --all - conda clean --all + conda update --all + conda clean --all conda install conda-build anaconda-client conda-verify - conda config --set anaconda_upload no + conda config --set anaconda_upload no - name: Build Package shell: bash -l {0} @@ -40,4 +40,4 @@ jobs: env: ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} run: | - anaconda upload osx-arm64/*.conda --force \ No newline at end of file + anaconda upload osx-arm64/*.conda --force diff --git a/.github/workflows/mmg-packaging-linux.yml b/.github/workflows/mmg-packaging-linux.yml index 97e9f31f..5eec3bd1 100644 --- a/.github/workflows/mmg-packaging-linux.yml +++ b/.github/workflows/mmg-packaging-linux.yml @@ -12,15 +12,15 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" - auto-update-conda: true + auto-update-conda: true - name: Install Dependencies shell: bash -l {0} run: | - conda update --all - conda clean --all + conda update --all + conda clean --all conda install conda-build anaconda-client conda-verify - conda config --set anaconda_upload no + conda config --set anaconda_upload no - name: Build Package shell: bash -l {0} diff --git a/.github/workflows/mmg-packaging-osx-64.yml b/.github/workflows/mmg-packaging-osx-64.yml index 5fd56b2b..0844d555 100644 --- a/.github/workflows/mmg-packaging-osx-64.yml +++ b/.github/workflows/mmg-packaging-osx-64.yml @@ -3,18 +3,18 @@ name: Conda packaging osx-x86-64 on: workflow_dispatch: -jobs: +jobs: macos: name: MacOS runs-on: macos-latest steps: - uses: actions/checkout@v4 - + - uses: conda-incubator/setup-miniconda@v2 with: miniconda-version: "latest" - auto-update-conda: true + auto-update-conda: true - name: Configure Conda for osx-64 shell: bash -l {0} @@ -25,10 +25,10 @@ jobs: - name: Install Dependencies shell: bash -l {0} run: | - conda update --all - conda clean --all + conda update --all + conda clean --all conda install conda-build anaconda-client conda-verify - conda config --set anaconda_upload no + conda config --set anaconda_upload no - name: Build Package shell: bash -l {0} diff --git a/.github/workflows/mmg-windows.yml b/.github/workflows/mmg-windows.yml index 3f1d4a0b..f395ba7c 100644 --- a/.github/workflows/mmg-windows.yml +++ b/.github/workflows/mmg-windows.yml @@ -16,15 +16,15 @@ jobs: - name: Install Dependencies shell: pwsh run: | - conda update --all - conda clean --all + conda update --all + conda clean --all conda install conda-build anaconda-client conda-verify - conda config --set anaconda_upload no + conda config --set anaconda_upload no - name: Build Package shell: pwsh run: | - conda-build mmg.recipe -c set3mah -c conda-forge --no-test --output-folder . + conda-build mmg.recipe -c set3mah -c conda-forge --no-test --output-folder . - name: Upload to Anaconda shell: pwsh @@ -32,4 +32,4 @@ jobs: ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} run: | set ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }} - anaconda upload win-64/*.conda --force \ No newline at end of file + anaconda upload win-64/*.conda --force