From 368772c659e7517b0b9243ce78961fa74ccc7bf3 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 1 May 2025 11:11:23 -0700 Subject: [PATCH 01/10] Don't use mamba It is deprecated by setup-miniconda Signed-off-by: liamhuber --- cached-miniforge/action.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cached-miniforge/action.yml b/cached-miniforge/action.yml index c003b37..fe57ff4 100644 --- a/cached-miniforge/action.yml +++ b/cached-miniforge/action.yml @@ -42,10 +42,6 @@ inputs: description: 'conda-incubator/setup-miniconda argument' default: strict required: false - miniforge-use-mamba: - description: 'conda-incubator/setup-miniconda argument' - default: 'true' - required: false miniforge-condarc-file: description: 'conda-incubator/setup-miniconda argument, BUT we change the default to resolve https://github.com/conda-incubator/setup-miniconda/issues/207' default: '.condarc' @@ -131,7 +127,6 @@ runs: condarc-file: ${{ inputs.miniforge-condarc-file }} # TODO: Use channels once setup-miniconda is fixed channel-priority: ${{ inputs.miniforge-channel-priority }} activate-environment: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} - use-mamba: ${{ inputs.miniforge-use-mamba }} - name: Load cached environment if: inputs.use-cache == 'true' && steps.look-for-cache.outputs.cache-hit == 'true' uses: actions/cache/restore@v4 @@ -149,7 +144,6 @@ runs: condarc-file: ${{ inputs.miniforge-condarc-file }} # TODO: Use channels once setup-miniconda is fixed channel-priority: ${{ inputs.miniforge-channel-priority }} activate-environment: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} - use-mamba: ${{ inputs.miniforge-use-mamba }} environment-file: ${{ env.WRITE_ENVIRONMENT_OUTPUT_ENV_FILE }} - name: Cache new env if: inputs.use-cache == 'true' && steps.look-for-cache.outputs.cache-hit != 'true' From ce9b21da67cc019149dd41a886157f1b1fb10a47 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 1 May 2025 11:15:35 -0700 Subject: [PATCH 02/10] Don't mention mamba Signed-off-by: liamhuber --- .github/workflows/pyproject-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pyproject-release.yml b/.github/workflows/pyproject-release.yml index 25a1db3..eac66f6 100644 --- a/.github/workflows/pyproject-release.yml +++ b/.github/workflows/pyproject-release.yml @@ -14,7 +14,7 @@ on: inputs: python-version: type: string - description: 'Cached mamba python versions' + description: 'Cached python versions' default: '3.12' required: false env-files: From 6d26ba0291ff87eaba7f02b644239f5603f85822 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 1 May 2025 11:24:57 -0700 Subject: [PATCH 03/10] Patch sed command for osx Signed-off-by: liamhuber --- .support/update_actions_tag.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.support/update_actions_tag.sh b/.support/update_actions_tag.sh index 445ce00..d925346 100755 --- a/.support/update_actions_tag.sh +++ b/.support/update_actions_tag.sh @@ -12,5 +12,11 @@ # Set default value for $1 if not provided PATTERN=${1:-$(git rev-parse --abbrev-ref HEAD)} -# Recursive search and replace -find . -type f \( -name "*.yml" -o -name "*.md" \) -exec sed -i 's/\(pyiron\/actions\/[^@]*\)@[^*]*/\1@'"$PATTERN"'/g' {} + \ No newline at end of file +# Check if we're on macOS or Linux and use appropriate sed syntax +if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS version + find . -type f \( -name "*.yml" -o -name "*.md" \) -exec sed -i '' 's/\(pyiron\/actions\/[^@]*\)@[^*]*/\1@'"$PATTERN"'/g' {} + +else + # Linux version (and others) + find . -type f \( -name "*.yml" -o -name "*.md" \) -exec sed -i 's/\(pyiron\/actions\/[^@]*\)@[^*]*/\1@'"$PATTERN"'/g' {} + +fi \ No newline at end of file From 0ba6eb8606b9e6afc67c755290fec7a65cb4d456 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 1 May 2025 11:25:10 -0700 Subject: [PATCH 04/10] Internally target branch Signed-off-by: liamhuber --- .github/workflows/dependabot-pr.yml | 2 +- .github/workflows/pr-labeled.yml | 4 ++-- .github/workflows/push-pull.yml | 22 +++++++++++----------- .github/workflows/pyproject-release.yml | 4 ++-- .github/workflows/tests-and-coverage.yml | 4 ++-- README.md | 2 +- build-docs/action.yml | 4 ++-- build-notebooks/action.yml | 4 ++-- cached-miniforge/action.yml | 2 +- pip-check/action.yml | 2 +- unit-tests/action.yml | 4 ++-- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/dependabot-pr.yml b/.github/workflows/dependabot-pr.yml index bae6443..2ff14dd 100644 --- a/.github/workflows/dependabot-pr.yml +++ b/.github/workflows/dependabot-pr.yml @@ -25,7 +25,7 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR fetch-depth: 0 # otherwise, you will fail to push refs to dest repo token: ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }} - - uses: pyiron/actions/update-env-files@v3.3.2 + - uses: pyiron/actions/update-env-files@use_miniconda - name: UpdateDependabotPR commit run: | git config --local user.email "pyiron@mpie.de" diff --git a/.github/workflows/pr-labeled.yml b/.github/workflows/pr-labeled.yml index 27c0cdf..50beaa9 100644 --- a/.github/workflows/pr-labeled.yml +++ b/.github/workflows/pr-labeled.yml @@ -48,10 +48,10 @@ jobs: tests-and-coverage: if: contains(github.event.pull_request.labels.*.name, 'run_coverage') - uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@v3.3.2 + uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@use_miniconda secrets: inherit code-ql: if: contains(github.event.pull_request.labels.*.name, 'run_CodeQL') - uses: pyiron/actions/.github/workflows/codeql.yml@v3.3.2 + uses: pyiron/actions/.github/workflows/codeql.yml@use_miniconda secrets: inherit diff --git a/.github/workflows/push-pull.yml b/.github/workflows/push-pull.yml index 4902b99..e6a22b8 100644 --- a/.github/workflows/push-pull.yml +++ b/.github/workflows/push-pull.yml @@ -197,11 +197,11 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR fetch-depth: 0 # otherwise, you will fail to push refs to dest repo if: ${{ inputs.do-commit-updated-env }} - - uses: pyiron/actions/write-docs-env@v3.3.2 + - uses: pyiron/actions/write-docs-env@use_miniconda with: env-files: ${{ inputs.docs-env-files }} if: ${{ inputs.do-commit-updated-env }} - - uses: pyiron/actions/write-environment@v3.3.2 + - uses: pyiron/actions/write-environment@use_miniconda with: env-files: ${{ inputs.notebooks-env-files }} output-env-file: .binder/environment.yml @@ -228,7 +228,7 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/build-docs@v3.3.2 + - uses: pyiron/actions/build-docs@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.docs-env-files }} @@ -239,7 +239,7 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/build-notebooks@v3.3.2 + - uses: pyiron/actions/build-notebooks@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.notebooks-env-files }} @@ -276,11 +276,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/add-to-python-path@v3.3.2 + - uses: pyiron/actions/add-to-python-path@use_miniconda if: inputs.extra-python-paths != '' with: path-dirs: ${{ inputs.extra-python-paths }} - - uses: pyiron/actions/unit-tests@v3.3.2 + - uses: pyiron/actions/unit-tests@use_miniconda with: python-version: ${{ matrix.python-version }} env-files: ${{ inputs.tests-env-files }} @@ -291,7 +291,7 @@ jobs: coveralls-and-codacy: needs: commit-updated-env if: ${{ inputs.do-coveralls || inputs.do-codacy }} - uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@v3.3.2 + uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@use_miniconda secrets: inherit with: tests-env-files: ${{ inputs.tests-env-files }} @@ -310,7 +310,7 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/unit-tests@v3.3.2 + - uses: pyiron/actions/unit-tests@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.tests-env-files }} @@ -323,11 +323,11 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/add-to-python-path@v3.3.2 + - uses: pyiron/actions/add-to-python-path@use_miniconda if: inputs.extra-python-paths != '' with: path-dirs: ${{ inputs.extra-python-paths }} - - uses: pyiron/actions/unit-tests@v3.3.2 + - uses: pyiron/actions/unit-tests@use_miniconda with: python-version: ${{ inputs.alternate-tests-python-version }} env-files: ${{ inputs.alternate-tests-env-files }} @@ -341,7 +341,7 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/pip-check@v3.3.2 + - uses: pyiron/actions/pip-check@use_miniconda with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/pyproject-release.yml b/.github/workflows/pyproject-release.yml index eac66f6..8080116 100644 --- a/.github/workflows/pyproject-release.yml +++ b/.github/workflows/pyproject-release.yml @@ -83,11 +83,11 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/cached-miniforge@v3.3.2 + - uses: pyiron/actions/cached-miniforge@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.env-files }} - - uses: pyiron/actions/update-pyproject-dependencies@v3.3.2 + - uses: pyiron/actions/update-pyproject-dependencies@use_miniconda with: input-toml: ${{ inputs.input-toml }} lower-bound-yaml: ${{ inputs.lower-bound-yaml }} diff --git a/.github/workflows/tests-and-coverage.yml b/.github/workflows/tests-and-coverage.yml index b21f77d..37cc6f5 100644 --- a/.github/workflows/tests-and-coverage.yml +++ b/.github/workflows/tests-and-coverage.yml @@ -64,11 +64,11 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/add-to-python-path@v3.3.2 + - uses: pyiron/actions/add-to-python-path@use_miniconda if: inputs.extra-python-paths != '' with: path-dirs: ${{ inputs.extra-python-paths }} - - uses: pyiron/actions/unit-tests@v3.3.2 + - uses: pyiron/actions/unit-tests@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.tests-env-files }} diff --git a/README.md b/README.md index a7fda2a..4060107 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ on: jobs: pyiron: - uses: pyiron/actions/.github/workflows/push-pull.yml@v3.3.2 + uses: pyiron/actions/.github/workflows/push-pull.yml@use_miniconda secrets: inherit ``` diff --git a/build-docs/action.yml b/build-docs/action.yml index bd859f6..5b4edf2 100644 --- a/build-docs/action.yml +++ b/build-docs/action.yml @@ -21,11 +21,11 @@ inputs: runs: using: 'composite' steps: - - uses: pyiron/actions/cached-miniforge@v3.3.2 + - uses: pyiron/actions/cached-miniforge@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.standard-docs-env-file }} ${{ inputs.env-files }} - - uses: pyiron/actions/pyiron-config@v3.3.2 + - uses: pyiron/actions/pyiron-config@use_miniconda - name: Build sphinx documentation shell: bash -l {0} run: | diff --git a/build-notebooks/action.yml b/build-notebooks/action.yml index 41fcdbb..ce0c3bb 100644 --- a/build-notebooks/action.yml +++ b/build-notebooks/action.yml @@ -28,11 +28,11 @@ inputs: runs: using: 'composite' steps: - - uses: pyiron/actions/cached-miniforge@v3.3.2 + - uses: pyiron/actions/cached-miniforge@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.standard-notebooks-env-file }} ${{ inputs.env-files }} - - uses: pyiron/actions/pyiron-config@v3.3.2 + - uses: pyiron/actions/pyiron-config@use_miniconda - name: Build notebooks shell: bash -l {0} run: $GITHUB_ACTION_PATH/../.support/build_notebooks.sh ${{ inputs.notebooks-dir }} ${{ inputs.exclusion-file }} ${{ inputs.kernel }} diff --git a/cached-miniforge/action.yml b/cached-miniforge/action.yml index fe57ff4..49f5cfa 100644 --- a/cached-miniforge/action.yml +++ b/cached-miniforge/action.yml @@ -67,7 +67,7 @@ inputs: runs: using: "composite" steps: - - uses: pyiron/actions/write-environment@v3.3.2 + - uses: pyiron/actions/write-environment@use_miniconda with: env-files: ${{ inputs.env-files }} - name: Env name backwards compatibility patch diff --git a/pip-check/action.yml b/pip-check/action.yml index d2e5e08..cd09caf 100644 --- a/pip-check/action.yml +++ b/pip-check/action.yml @@ -13,7 +13,7 @@ inputs: runs: using: 'composite' steps: - - uses: pyiron/actions/cached-miniforge@v3.3.2 + - uses: pyiron/actions/cached-miniforge@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.env-files }} diff --git a/unit-tests/action.yml b/unit-tests/action.yml index 4358fbb..6e4d0d3 100644 --- a/unit-tests/action.yml +++ b/unit-tests/action.yml @@ -35,11 +35,11 @@ inputs: runs: using: 'composite' steps: - - uses: pyiron/actions/cached-miniforge@v3.3.2 + - uses: pyiron/actions/cached-miniforge@use_miniconda with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.standard-unittests-env-file }} ${{ inputs.coveralls-codacy-env-file }} ${{ inputs.env-files }} - - uses: pyiron/actions/pyiron-config@v3.3.2 + - uses: pyiron/actions/pyiron-config@use_miniconda - name: Test shell: bash -l {0} run: | From 9bd94572b0945f90a10f789cb13c928e14aa706f Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 1 May 2025 12:04:51 -0700 Subject: [PATCH 05/10] Use new upstream defaults removal Signed-off-by: liamhuber --- cached-miniforge/action.yml | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/cached-miniforge/action.yml b/cached-miniforge/action.yml index 49f5cfa..0186106 100644 --- a/cached-miniforge/action.yml +++ b/cached-miniforge/action.yml @@ -36,15 +36,14 @@ inputs: miniforge-channels: description: 'conda-incubator/setup-miniconda argument' default: conda-forge - # default: conda-forge,nodefaults # TODO: Use nodefaults directly once setup-miniconda is fixed required: false miniforge-channel-priority: description: 'conda-incubator/setup-miniconda argument' default: strict required: false - miniforge-condarc-file: - description: 'conda-incubator/setup-miniconda argument, BUT we change the default to resolve https://github.com/conda-incubator/setup-miniconda/issues/207' - default: '.condarc' + miniforge-conda-remove-defaults: + description: 'conda-incubator/setup-miniconda argument' + default: 'true' required: false miniforge-activate-environment: description: 'DEPRECATED. Use env-path and include a path instead. If provided, will be used as the new env-path with cached-miniforge/ prepended as the path.' @@ -102,29 +101,14 @@ runs: path: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} key: ${{ steps.cache-info.outputs.CASH_KEY }} lookup-only: true - - name: Prepopulate condarc - # To resolve: https://github.com/conda-incubator/setup-miniconda/issues/207 - # Because conda behaves like this: https://github.com/conda/conda/issues/12356 - # And now using `default` can cost money: https://www.anaconda.com/blog/is-conda-free - # Only necessary until conda-incubator/setup-miniconda is fixed: https://github.com/conda-incubator/setup-miniconda/pull/364 - shell: bash -l {0} - run: | - echo "channels:" > "${{ inputs.miniforge-condarc-file }}" - IFS=',' read -ra CHANNELS <<< "${{ inputs.miniforge-channels }}" - for channel in "${CHANNELS[@]}"; do - channel=$(echo "$channel" | xargs) - echo "- $channel" >> "${{ inputs.miniforge-condarc-file }}" - done - echo "Prepopulated condarc file ${{ inputs.miniforge-condarc-file }}:" - cat ${{ inputs.miniforge-condarc-file }} - name: Install using cached env if: inputs.use-cache == 'true' && steps.look-for-cache.outputs.cache-hit == 'true' uses: conda-incubator/setup-miniconda@v3 with: miniforge-variant: ${{ inputs.miniforge-variant }} miniforge-version: ${{ inputs.miniforge-version }} - # channels: ${{ inputs.miniforge-channels }} - condarc-file: ${{ inputs.miniforge-condarc-file }} # TODO: Use channels once setup-miniconda is fixed + channels: ${{ inputs.miniforge-channels }} + conda-remove-defaults: $${ miniforge-conda-remove-defaults }} channel-priority: ${{ inputs.miniforge-channel-priority }} activate-environment: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} - name: Load cached environment @@ -140,8 +124,8 @@ runs: python-version: ${{ inputs.python-version }} miniforge-variant: ${{ inputs.miniforge-variant }} miniforge-version: ${{ inputs.miniforge-version }} - # channels: ${{ inputs.miniforge-channels }} - condarc-file: ${{ inputs.miniforge-condarc-file }} # TODO: Use channels once setup-miniconda is fixed + channels: ${{ inputs.miniforge-channels }} + conda-remove-defaults: $${ miniforge-conda-remove-defaults }} channel-priority: ${{ inputs.miniforge-channel-priority }} activate-environment: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} environment-file: ${{ env.WRITE_ENVIRONMENT_OUTPUT_ENV_FILE }} From 725180b9cee33198a0e3c130a145bd32da8a4f73 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 1 May 2025 13:18:21 -0700 Subject: [PATCH 06/10] Scope input variable before use Signed-off-by: liamhuber --- cached-miniforge/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cached-miniforge/action.yml b/cached-miniforge/action.yml index 0186106..ff0db51 100644 --- a/cached-miniforge/action.yml +++ b/cached-miniforge/action.yml @@ -125,7 +125,7 @@ runs: miniforge-variant: ${{ inputs.miniforge-variant }} miniforge-version: ${{ inputs.miniforge-version }} channels: ${{ inputs.miniforge-channels }} - conda-remove-defaults: $${ miniforge-conda-remove-defaults }} + conda-remove-defaults: $${ inputs.miniforge-conda-remove-defaults }} channel-priority: ${{ inputs.miniforge-channel-priority }} activate-environment: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} environment-file: ${{ env.WRITE_ENVIRONMENT_OUTPUT_ENV_FILE }} From 9549cac43f6d0e553558b78f241e6e938be7966f Mon Sep 17 00:00:00 2001 From: liamhuber Date: Fri, 2 May 2025 06:24:27 -0700 Subject: [PATCH 07/10] Localize the env paths This should fix the unittests side of https://github.com/pyiron/pyiron_workflow/issues/634 Signed-off-by: liamhuber --- cached-miniforge/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cached-miniforge/action.yml b/cached-miniforge/action.yml index ff0db51..8ecb960 100644 --- a/cached-miniforge/action.yml +++ b/cached-miniforge/action.yml @@ -19,7 +19,7 @@ inputs: required: false env-path: description: 'A full path to the environment, used for miniconda activate-environment and cache path' - default: 'cached-miniforge/my-env' + default: './cached-miniforge/my-env' required: false local-code-directory: description: 'The location containing the code under development; targeted by pip install. If an empty string, local code will not be pip-installed at all!' @@ -46,7 +46,7 @@ inputs: default: 'true' required: false miniforge-activate-environment: - description: 'DEPRECATED. Use env-path and include a path instead. If provided, will be used as the new env-path with cached-miniforge/ prepended as the path.' + description: 'DEPRECATED. Use env-path and include a path instead. If provided, will be used as the new env-path with ./cached-miniforge/ prepended as the path.' default: '' required: false pip-install-versioneer: @@ -77,7 +77,7 @@ runs: if [ -z "${{ inputs.miniforge-activate-environment }}" ]; then env_path=${{ inputs.env-path }} else - env_path=cached-miniforge/${{ inputs.miniforge-activate-environment }} + env_path=./cached-miniforge/${{ inputs.miniforge-activate-environment }} fi echo env-path=${env_path} >> $GITHUB_OUTPUT - name: Calculate cache label info From 47a898afc18eb58d70a9778a75fe1b2b0e5cdd64 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Fri, 2 May 2025 06:33:05 -0700 Subject: [PATCH 08/10] Remove the backwards compatible env input argument Signed-off-by: liamhuber --- cached-miniforge/action.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/cached-miniforge/action.yml b/cached-miniforge/action.yml index 8ecb960..3488240 100644 --- a/cached-miniforge/action.yml +++ b/cached-miniforge/action.yml @@ -45,10 +45,6 @@ inputs: description: 'conda-incubator/setup-miniconda argument' default: 'true' required: false - miniforge-activate-environment: - description: 'DEPRECATED. Use env-path and include a path instead. If provided, will be used as the new env-path with ./cached-miniforge/ prepended as the path.' - default: '' - required: false pip-install-versioneer: description: 'Pip-install versioneer[toml]' default: 'true' @@ -69,17 +65,6 @@ runs: - uses: pyiron/actions/write-environment@use_miniconda with: env-files: ${{ inputs.env-files }} - - name: Env name backwards compatibility patch - # Can be replaced with direct usage of `inputs.env-path` after a major version bump - id: env-path-backwards-compatibility - shell: bash -l {0} - run: | - if [ -z "${{ inputs.miniforge-activate-environment }}" ]; then - env_path=${{ inputs.env-path }} - else - env_path=./cached-miniforge/${{ inputs.miniforge-activate-environment }} - fi - echo env-path=${env_path} >> $GITHUB_OUTPUT - name: Calculate cache label info if: inputs.use-cache == 'true' id: cache-info From c5feb2f32afe68b3935123ce463145135c592571 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Fri, 2 May 2025 06:42:17 -0700 Subject: [PATCH 09/10] Don't reference missing step output Just reference the input directly. Just a bug in the last commit, my bad. Signed-off-by: liamhuber --- cached-miniforge/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cached-miniforge/action.yml b/cached-miniforge/action.yml index 3488240..76508cf 100644 --- a/cached-miniforge/action.yml +++ b/cached-miniforge/action.yml @@ -72,7 +72,7 @@ runs: run: | pyversion_string=${{ inputs.python-version }} pyversion_string=${pyversion_string/\./-} - env_string=${{ steps.env-path-backwards-compatibility.outputs.env-path }} + env_string=${{ inputs.env-path }} env_string=${env_string//\//-} LABEL=${{ runner.os }}-${{ runner.arch }}-py-${pyversion_string}-${env_string} HASH=${{ hashFiles(env.WRITE_ENVIRONMENT_OUTPUT_ENV_FILE) }} @@ -83,7 +83,7 @@ runs: uses: actions/cache/restore@v4 id: look-for-cache with: - path: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} + path: ${{ inputs.env-path }} key: ${{ steps.cache-info.outputs.CASH_KEY }} lookup-only: true - name: Install using cached env @@ -95,12 +95,12 @@ runs: channels: ${{ inputs.miniforge-channels }} conda-remove-defaults: $${ miniforge-conda-remove-defaults }} channel-priority: ${{ inputs.miniforge-channel-priority }} - activate-environment: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} + activate-environment: ${{ inputs.env-path }} - name: Load cached environment if: inputs.use-cache == 'true' && steps.look-for-cache.outputs.cache-hit == 'true' uses: actions/cache/restore@v4 with: - path: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} + path: ${{ inputs.env-path }} key: ${{ steps.cache-info.outputs.CASH_KEY }} - name: Build environment from file if: inputs.use-cache != 'true' || steps.look-for-cache.outputs.cache-hit != 'true' @@ -112,14 +112,14 @@ runs: channels: ${{ inputs.miniforge-channels }} conda-remove-defaults: $${ inputs.miniforge-conda-remove-defaults }} channel-priority: ${{ inputs.miniforge-channel-priority }} - activate-environment: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} + activate-environment: ${{ inputs.env-path }} environment-file: ${{ env.WRITE_ENVIRONMENT_OUTPUT_ENV_FILE }} - name: Cache new env if: inputs.use-cache == 'true' && steps.look-for-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v4 id: cache-env with: - path: ${{ steps.env-path-backwards-compatibility.outputs.env-path }} + path: ${{ inputs.env-path }} key: ${{ steps.cache-info.outputs.CASH_KEY }} - name: Display env info shell: bash -l {0} From ea0b68f05ba16cd26ce71ff4792979492b1fa366 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Wed, 7 May 2025 09:47:09 -0700 Subject: [PATCH 10/10] Target the subsequent tag Per https://github.com/pyiron/actions/issues/142#issuecomment-2859228443 Signed-off-by: liamhuber --- .github/workflows/dependabot-pr.yml | 2 +- .github/workflows/pr-labeled.yml | 4 ++-- .github/workflows/push-pull.yml | 22 +++++++++++----------- .github/workflows/pyproject-release.yml | 4 ++-- .github/workflows/tests-and-coverage.yml | 4 ++-- README.md | 2 +- build-docs/action.yml | 4 ++-- build-notebooks/action.yml | 4 ++-- cached-miniforge/action.yml | 2 +- pip-check/action.yml | 2 +- unit-tests/action.yml | 4 ++-- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/dependabot-pr.yml b/.github/workflows/dependabot-pr.yml index 2ff14dd..9cead0b 100644 --- a/.github/workflows/dependabot-pr.yml +++ b/.github/workflows/dependabot-pr.yml @@ -25,7 +25,7 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR fetch-depth: 0 # otherwise, you will fail to push refs to dest repo token: ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }} - - uses: pyiron/actions/update-env-files@use_miniconda + - uses: pyiron/actions/update-env-files@actions-4.0.0 - name: UpdateDependabotPR commit run: | git config --local user.email "pyiron@mpie.de" diff --git a/.github/workflows/pr-labeled.yml b/.github/workflows/pr-labeled.yml index 50beaa9..aa7d8c7 100644 --- a/.github/workflows/pr-labeled.yml +++ b/.github/workflows/pr-labeled.yml @@ -48,10 +48,10 @@ jobs: tests-and-coverage: if: contains(github.event.pull_request.labels.*.name, 'run_coverage') - uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@use_miniconda + uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@actions-4.0.0 secrets: inherit code-ql: if: contains(github.event.pull_request.labels.*.name, 'run_CodeQL') - uses: pyiron/actions/.github/workflows/codeql.yml@use_miniconda + uses: pyiron/actions/.github/workflows/codeql.yml@actions-4.0.0 secrets: inherit diff --git a/.github/workflows/push-pull.yml b/.github/workflows/push-pull.yml index e6a22b8..97140e4 100644 --- a/.github/workflows/push-pull.yml +++ b/.github/workflows/push-pull.yml @@ -197,11 +197,11 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR fetch-depth: 0 # otherwise, you will fail to push refs to dest repo if: ${{ inputs.do-commit-updated-env }} - - uses: pyiron/actions/write-docs-env@use_miniconda + - uses: pyiron/actions/write-docs-env@actions-4.0.0 with: env-files: ${{ inputs.docs-env-files }} if: ${{ inputs.do-commit-updated-env }} - - uses: pyiron/actions/write-environment@use_miniconda + - uses: pyiron/actions/write-environment@actions-4.0.0 with: env-files: ${{ inputs.notebooks-env-files }} output-env-file: .binder/environment.yml @@ -228,7 +228,7 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/build-docs@use_miniconda + - uses: pyiron/actions/build-docs@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.docs-env-files }} @@ -239,7 +239,7 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/build-notebooks@use_miniconda + - uses: pyiron/actions/build-notebooks@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.notebooks-env-files }} @@ -276,11 +276,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/add-to-python-path@use_miniconda + - uses: pyiron/actions/add-to-python-path@actions-4.0.0 if: inputs.extra-python-paths != '' with: path-dirs: ${{ inputs.extra-python-paths }} - - uses: pyiron/actions/unit-tests@use_miniconda + - uses: pyiron/actions/unit-tests@actions-4.0.0 with: python-version: ${{ matrix.python-version }} env-files: ${{ inputs.tests-env-files }} @@ -291,7 +291,7 @@ jobs: coveralls-and-codacy: needs: commit-updated-env if: ${{ inputs.do-coveralls || inputs.do-codacy }} - uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@use_miniconda + uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@actions-4.0.0 secrets: inherit with: tests-env-files: ${{ inputs.tests-env-files }} @@ -310,7 +310,7 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/unit-tests@use_miniconda + - uses: pyiron/actions/unit-tests@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.tests-env-files }} @@ -323,11 +323,11 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/add-to-python-path@use_miniconda + - uses: pyiron/actions/add-to-python-path@actions-4.0.0 if: inputs.extra-python-paths != '' with: path-dirs: ${{ inputs.extra-python-paths }} - - uses: pyiron/actions/unit-tests@use_miniconda + - uses: pyiron/actions/unit-tests@actions-4.0.0 with: python-version: ${{ inputs.alternate-tests-python-version }} env-files: ${{ inputs.alternate-tests-env-files }} @@ -341,7 +341,7 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/pip-check@use_miniconda + - uses: pyiron/actions/pip-check@actions-4.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/pyproject-release.yml b/.github/workflows/pyproject-release.yml index 8080116..279d3a2 100644 --- a/.github/workflows/pyproject-release.yml +++ b/.github/workflows/pyproject-release.yml @@ -83,11 +83,11 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/cached-miniforge@use_miniconda + - uses: pyiron/actions/cached-miniforge@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.env-files }} - - uses: pyiron/actions/update-pyproject-dependencies@use_miniconda + - uses: pyiron/actions/update-pyproject-dependencies@actions-4.0.0 with: input-toml: ${{ inputs.input-toml }} lower-bound-yaml: ${{ inputs.lower-bound-yaml }} diff --git a/.github/workflows/tests-and-coverage.yml b/.github/workflows/tests-and-coverage.yml index 37cc6f5..3eca009 100644 --- a/.github/workflows/tests-and-coverage.yml +++ b/.github/workflows/tests-and-coverage.yml @@ -64,11 +64,11 @@ jobs: runs-on: ${{ inputs.runner }} steps: - uses: actions/checkout@v4 - - uses: pyiron/actions/add-to-python-path@use_miniconda + - uses: pyiron/actions/add-to-python-path@actions-4.0.0 if: inputs.extra-python-paths != '' with: path-dirs: ${{ inputs.extra-python-paths }} - - uses: pyiron/actions/unit-tests@use_miniconda + - uses: pyiron/actions/unit-tests@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.tests-env-files }} diff --git a/README.md b/README.md index 4060107..af382de 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ on: jobs: pyiron: - uses: pyiron/actions/.github/workflows/push-pull.yml@use_miniconda + uses: pyiron/actions/.github/workflows/push-pull.yml@actions-4.0.0 secrets: inherit ``` diff --git a/build-docs/action.yml b/build-docs/action.yml index 5b4edf2..0c17584 100644 --- a/build-docs/action.yml +++ b/build-docs/action.yml @@ -21,11 +21,11 @@ inputs: runs: using: 'composite' steps: - - uses: pyiron/actions/cached-miniforge@use_miniconda + - uses: pyiron/actions/cached-miniforge@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.standard-docs-env-file }} ${{ inputs.env-files }} - - uses: pyiron/actions/pyiron-config@use_miniconda + - uses: pyiron/actions/pyiron-config@actions-4.0.0 - name: Build sphinx documentation shell: bash -l {0} run: | diff --git a/build-notebooks/action.yml b/build-notebooks/action.yml index ce0c3bb..558db21 100644 --- a/build-notebooks/action.yml +++ b/build-notebooks/action.yml @@ -28,11 +28,11 @@ inputs: runs: using: 'composite' steps: - - uses: pyiron/actions/cached-miniforge@use_miniconda + - uses: pyiron/actions/cached-miniforge@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.standard-notebooks-env-file }} ${{ inputs.env-files }} - - uses: pyiron/actions/pyiron-config@use_miniconda + - uses: pyiron/actions/pyiron-config@actions-4.0.0 - name: Build notebooks shell: bash -l {0} run: $GITHUB_ACTION_PATH/../.support/build_notebooks.sh ${{ inputs.notebooks-dir }} ${{ inputs.exclusion-file }} ${{ inputs.kernel }} diff --git a/cached-miniforge/action.yml b/cached-miniforge/action.yml index 76508cf..dc9ac7c 100644 --- a/cached-miniforge/action.yml +++ b/cached-miniforge/action.yml @@ -62,7 +62,7 @@ inputs: runs: using: "composite" steps: - - uses: pyiron/actions/write-environment@use_miniconda + - uses: pyiron/actions/write-environment@actions-4.0.0 with: env-files: ${{ inputs.env-files }} - name: Calculate cache label info diff --git a/pip-check/action.yml b/pip-check/action.yml index cd09caf..66e019e 100644 --- a/pip-check/action.yml +++ b/pip-check/action.yml @@ -13,7 +13,7 @@ inputs: runs: using: 'composite' steps: - - uses: pyiron/actions/cached-miniforge@use_miniconda + - uses: pyiron/actions/cached-miniforge@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.env-files }} diff --git a/unit-tests/action.yml b/unit-tests/action.yml index 6e4d0d3..a7cc4a4 100644 --- a/unit-tests/action.yml +++ b/unit-tests/action.yml @@ -35,11 +35,11 @@ inputs: runs: using: 'composite' steps: - - uses: pyiron/actions/cached-miniforge@use_miniconda + - uses: pyiron/actions/cached-miniforge@actions-4.0.0 with: python-version: ${{ inputs.python-version }} env-files: ${{ inputs.standard-unittests-env-file }} ${{ inputs.coveralls-codacy-env-file }} ${{ inputs.env-files }} - - uses: pyiron/actions/pyiron-config@use_miniconda + - uses: pyiron/actions/pyiron-config@actions-4.0.0 - name: Test shell: bash -l {0} run: |