Conversation
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? 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
|
Member
Author
|
You are right we can generate a matrix, I will update the file accordingly |
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.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.