@@ -108,6 +108,14 @@ jobs:
108108 channels : conda-forge
109109 python-version : ${{ matrix.python }}
110110
111+ - name : Update conda
112+ run : |
113+ conda update -n base --all
114+
115+ - name : Install conda build
116+ run : |
117+ conda install -n base -y conda-build
118+
111119 - name : Cache conda packages
112120 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
113121 env :
@@ -126,9 +134,12 @@ jobs:
126134 echo "CONDA_BLD=$CONDA\\conda-bld\\win-64\\" >> "$GITHUB_ENV"
127135 echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE\\" >> "$GITHUB_ENV"
128136
129- - name : Install conda build
137+ - name : Show Conda info
138+ run : |
139+ conda info --all
140+
141+ - name : List base environment packages
130142 run : |
131- conda install -n base -y conda-build
132143 conda list -n base
133144
134145 - name : Build conda package
@@ -301,3 +312,153 @@ jobs:
301312 run : |
302313 conda activate ${{ env.TEST_ENV_NAME }}
303314 pytest -v --pyargs ${{ env.MODULE_NAME }}
315+
316+ build_osx :
317+ runs-on : macos-26-intel
318+
319+ strategy :
320+ matrix :
321+ python : ['3.10', '3.11', '3.12', '3.13', '3.14']
322+
323+ steps :
324+ - name : Cancel Previous Runs
325+ uses : styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
326+ with :
327+ access_token : ${{ github.token }}
328+
329+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
330+ with :
331+ fetch-depth : 0
332+
333+ - uses : conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
334+ with :
335+ miniforge-version : latest
336+ activate-environment : build
337+ channels : conda-forge
338+ python-version : ${{ matrix.python }}
339+
340+ - name : Cache conda packages
341+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
342+ env :
343+ CACHE_NUMBER : 0 # Increase to reset cache
344+ with :
345+ path : /Users/runner/conda_pkgs_dir
346+ key :
347+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
348+ restore-keys : |
349+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
350+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
351+
352+ - name : Install conda-build
353+ shell : bash -el {0}
354+ run : |
355+ conda install -n base -y conda-build
356+ conda list -n base
357+
358+ - name : Store conda paths as envs
359+ shell : bash -el {0}
360+ run : |
361+ echo "CONDA_BLD=$CONDA/conda-bld/osx-64/" >> "$GITHUB_ENV"
362+ echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE/" >> "$GITHUB_ENV"
363+
364+ - name : Build conda package
365+ shell : bash -el {0}
366+ run : |
367+ CHANNELS=(-c conda-forge -c conda-forge/label/python_rc --override-channels)
368+ VERSIONS=(--python "${{ matrix.python }}")
369+ TEST=(--no-test)
370+
371+ conda build \
372+ "${TEST[@]}" \
373+ "${VERSIONS[@]}" \
374+ "${CHANNELS[@]}" \
375+ conda-recipe-cf
376+
377+ - name : Upload artifact
378+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
379+ with :
380+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
381+ path : ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda
382+
383+ - name : Upload wheels artifact
384+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
385+ with :
386+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
387+ path : ${{ env.WHEELS_OUTPUT_FOLDER }}mkl_service-*.whl
388+
389+ test_osx :
390+ needs : build_osx
391+ runs-on : ${{ matrix.runner }}
392+
393+ strategy :
394+ matrix :
395+ python : ['3.10', '3.11', '3.12', '3.13', '3.14']
396+ experimental : [false]
397+ runner : [macos-26-intel]
398+ continue-on-error : ${{ matrix.experimental }}
399+ env :
400+ CHANNELS : -c conda-forge -c conda-forge/label/python_rc --override-channels
401+
402+ steps :
403+ - name : Download artifact
404+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
405+ with :
406+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
407+
408+ - uses : conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
409+ with :
410+ miniforge-version : latest
411+ channels : conda-forge
412+ activate-environment : base
413+
414+ - name : Install conda-index
415+ shell : bash -el {0}
416+ run : conda install -n base -y conda-index
417+
418+ - name : Create conda channel
419+ shell : bash -el {0}
420+ run : |
421+ mkdir -p "$GITHUB_WORKSPACE/channel/osx-64"
422+ conda index "$GITHUB_WORKSPACE/channel" || exit 1
423+ mv "${PACKAGE_NAME}"-*.conda "$GITHUB_WORKSPACE/channel/osx-64" || exit 1
424+ conda index "$GITHUB_WORKSPACE/channel" || exit 1
425+ # Test channel
426+ conda search "$PACKAGE_NAME" -c "$GITHUB_WORKSPACE/channel" --override-channels --info --json > "$GITHUB_WORKSPACE/ver.json"
427+ cat ver.json
428+
429+ - name : Collect dependencies
430+ shell : bash -el {0}
431+ run : |
432+ CHANNELS=(-c "$GITHUB_WORKSPACE/channel" -c conda-forge -c conda-forge/label/python_rc --override-channels)
433+ PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")"
434+ export PACKAGE_VERSION
435+ conda create -n "${{ env.TEST_ENV_NAME }}" "$PACKAGE_NAME=$PACKAGE_VERSION" "python=${{ matrix.python }}" "${CHANNELS[@]}" --only-deps --dry-run > lockfile
436+ cat lockfile
437+
438+ - name : Cache conda packages
439+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
440+ env :
441+ CACHE_NUMBER : 0 # Increase to reset cache
442+ with :
443+ path : /Users/runner/conda_pkgs_dir
444+ key :
445+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
446+ restore-keys : |
447+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
448+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
449+
450+ - name : Install mkl-service
451+ shell : bash -el {0}
452+ run : |
453+ CHANNELS=(-c "$GITHUB_WORKSPACE/channel" -c conda-forge -c conda-forge/label/python_rc --override-channels)
454+ PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")"
455+ export PACKAGE_VERSION
456+ conda create -n "${{ env.TEST_ENV_NAME }}" "$PACKAGE_NAME=$PACKAGE_VERSION" pytest "python=${{ matrix.python }}" "${CHANNELS[@]}"
457+ # Test installed packages
458+ conda list -n "${{ env.TEST_ENV_NAME }}"
459+
460+ - name : Run tests
461+ shell : bash -el {0}
462+ run : |
463+ conda activate ${{ env.TEST_ENV_NAME }}
464+ pytest -vv --pyargs ${{ env.MODULE_NAME }}
0 commit comments