Skip to content

split and modify mmg conda YAML#98

Merged
chemiskyy merged 7 commits intomainfrom
update_mmg_conda
Mar 8, 2026
Merged

split and modify mmg conda YAML#98
chemiskyy merged 7 commits intomainfrom
update_mmg_conda

Conversation

@chemiskyy
Copy link
Member

No description provided.

@kmarchais
Copy link
Member

I understand that the previous single file was not ideal but I am wondering if it doesn't impact the maintainability to have four different files for this.

Maybe we could refactor the single file to be more maintainable?
Here is an example generated by a LLM.

name: Create conda package for mmg

on:
  workflow_dispatch:

jobs:
  build_and_upload:
    name: Build on ${{ matrix.os }} (${{ matrix.conda_platform }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            conda_platform: linux-64
          - os: macos-13
            conda_platform: osx-64
          - os: macos-latest
            conda_platform: osx-arm64
          - os: windows-latest
            conda_platform: win-64

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Miniconda
        uses: conda-incubator/setup-miniconda@v3
        with:
          miniconda-version: "latest"
          activate-environment: packaging

      - name: Install dependencies and login to Anaconda
        run: |
          conda install python=3.9 conda-build anaconda-client --yes --quiet
          anaconda logout
          anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}

      - name: Build conda package
        run: |
          conda-build mmg.recipe -c conda-forge -c set3mah --output-folder .

      - name: Upload conda package
        run: |
          anaconda upload ${{ matrix.conda_platform }}/*.tar.bz2 --force

@chemiskyy
Copy link
Member Author

You are right we can generate a matrix, I will update the file accordingly

chemiskyy and others added 5 commits February 3, 2026 22:54
Remove separate OS-specific packaging workflows and replace them with a single matrix-based mmg-packaging.yml. Deleted mmg-osx-arm64.yml, mmg-packaging-linux.yml, mmg-packaging-osx-64.yml, and mmg-windows.yml and added matrix entries for Linux, macOS x64, macOS ARM64, and Windows. Unified Conda setup (setup-miniconda@v3), conditional CONDA_SUBDIR configuration, dependency installation, conda-build invocation, and artifact upload using ANACONDA_API_TOKEN and matrix.subdir to reduce duplication and centralize packaging logic.
Unify and modernize GitHub Actions for conda packaging across projects. Replace per-OS jobs with a matrix-based build job (Linux/macOS/Windows) and standardize matrix keys (runner, conda_platform). Switch setup-miniconda inputs to miniforge-version, enable auto-update-conda and libmamba solver. Use bash shells for build steps, set conda to not auto-upload (anaconda_upload no), build .conda packages with conda-build, and upload artifacts non-interactively via anaconda-client using ANACONDA_API_TOKEN. Also updated secret names and simplified steps to avoid interactive anaconda login.
Copy link
Member

@kmarchais kmarchais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I updated the version of actions/checkout to v6.

@chemiskyy chemiskyy merged commit d4178a5 into main Mar 8, 2026
32 checks passed
@chemiskyy chemiskyy deleted the update_mmg_conda branch March 8, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants