diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index ab5a161f..d1d3f47f 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -11,49 +11,75 @@ jobs: osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno: CONFIG: osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_build_typedebugchannel_targetscon_h5e478946 VMIMAGE: macOS-15 + build_workspace_dir: ~/miniforge3/conda-bld + store_build_artifacts: true + tools_install_dir: ~/miniforge3 + SHORT_CONFIG: osx_64_build_typedebugchannel_targetscon_h5e478946 osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: CONFIG: osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_build_typedebugchannel_targetscon_h116d3356 VMIMAGE: macOS-15 + build_workspace_dir: ~/miniforge3/conda-bld + store_build_artifacts: true + tools_install_dir: ~/miniforge3 + SHORT_CONFIG: osx_64_build_typedebugchannel_targetscon_h116d3356 osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: CONFIG: osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_build_typereleasechannel_targetsc_h425d4db0 VMIMAGE: macOS-15 + build_workspace_dir: ~/miniforge3/conda-bld + store_build_artifacts: true + tools_install_dir: ~/miniforge3 + SHORT_CONFIG: osx_64_build_typereleasechannel_targetsc_h425d4db0 osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: CONFIG: osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_build_typereleasechannel_targetsc_haa8f77b8 VMIMAGE: macOS-15 + build_workspace_dir: ~/miniforge3/conda-bld + store_build_artifacts: true + tools_install_dir: ~/miniforge3 + SHORT_CONFIG: osx_64_build_typereleasechannel_targetsc_haa8f77b8 osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno: CONFIG: osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15-arm64 + build_workspace_dir: ~/miniforge3/conda-bld + store_build_artifacts: true + tools_install_dir: ~/miniforge3 SHORT_CONFIG: osx_arm64_build_typedebugchannel_targets_h4a1f0d05 - VMIMAGE: macOS-15 osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: CONFIG: osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15-arm64 + build_workspace_dir: ~/miniforge3/conda-bld + store_build_artifacts: true + tools_install_dir: ~/miniforge3 SHORT_CONFIG: osx_arm64_build_typedebugchannel_targets_h49dbe0c1 - VMIMAGE: macOS-15 osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: CONFIG: osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15-arm64 + build_workspace_dir: ~/miniforge3/conda-bld + store_build_artifacts: true + tools_install_dir: ~/miniforge3 SHORT_CONFIG: osx_arm64_build_typereleasechannel_targe_h0d9a29af - VMIMAGE: macOS-15 osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: CONFIG: osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15-arm64 + build_workspace_dir: ~/miniforge3/conda-bld + store_build_artifacts: true + tools_install_dir: ~/miniforge3 SHORT_CONFIG: osx_arm64_build_typereleasechannel_targe_h92a1d5a6 - VMIMAGE: macOS-15 timeoutInMinutes: 360 variables: {} steps: # TODO: Fast finish on azure pipelines? - script: | + export MINIFORGE_HOME=$(tools_install_dir) + export CONDA_BLD_PATH=$(build_workspace_dir) export CI=azure export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) export remote_url=$(Build.Repository.Uri) @@ -72,21 +98,23 @@ jobs: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + - script: | + export MINIFORGE_HOME=$(tools_install_dir) + export CONDA_BLD_PATH=$(build_workspace_dir) export CI=azure export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - export CONDA_BLD_DIR=/Users/runner/miniforge3/conda-bld export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" - # Archive everything in CONDA_BLD_DIR except environments + # Archive everything in CONDA_BLD_PATH except environments export BLD_ARTIFACT_PREFIX=conda_artifacts if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then - # Archive the CONDA_BLD_DIR environments only when the job fails + # Archive the CONDA_BLD_PATH environments only when the job fails export ENV_ARTIFACT_PREFIX=conda_envs fi ./.scripts/create_conda_build_artifacts.sh displayName: Prepare conda build artifacts - condition: succeededOrFailed() + condition: and(succeededOrFailed(), eq(variables.store_build_artifacts, true)) - task: PublishPipelineArtifact@1 displayName: Store conda build artifacts diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index c8dc849a..96fe604a 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -11,15 +11,19 @@ jobs: win_64_freethreadingno: CONFIG: win_64_freethreadingno UPLOAD_PACKAGES: 'True' + build_workspace_dir: D:\\bld\\ + store_build_artifacts: true + tools_install_dir: D:\Miniforge SHORT_CONFIG: win_64_freethreadingno win_64_freethreadingyes: CONFIG: win_64_freethreadingyes UPLOAD_PACKAGES: 'True' + build_workspace_dir: D:\\bld\\ + store_build_artifacts: true + tools_install_dir: D:\Miniforge SHORT_CONFIG: win_64_freethreadingyes timeoutInMinutes: 360 variables: - CONDA_BLD_PATH: D:\\bld\\ - MINIFORGE_HOME: D:\Miniforge UPLOAD_TEMP: D:\\tmp steps: @@ -28,8 +32,8 @@ jobs: call ".scripts\run_win_build.bat" displayName: Run Windows build env: - MINIFORGE_HOME: $(MINIFORGE_HOME) - CONDA_BLD_PATH: $(CONDA_BLD_PATH) + MINIFORGE_HOME: $(tools_install_dir) + CONDA_BLD_PATH: $(build_workspace_dir) PYTHONUNBUFFERED: 1 CONFIG: $(CONFIG) CI: azure @@ -41,20 +45,21 @@ jobs: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + - script: | - set MINIFORGE_HOME=$(MINIFORGE_HOME) + set MINIFORGE_HOME=$(tools_install_dir) + set CONDA_BLD_PATH=$(build_workspace_dir) set CI=azure set CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) set FEEDSTOCK_NAME=$(build.Repository.Name) set ARTIFACT_STAGING_DIR=$(Build.ArtifactStagingDirectory) - set CONDA_BLD_DIR=$(CONDA_BLD_PATH) set BLD_ARTIFACT_PREFIX=conda_artifacts if "%AGENT_JOBSTATUS%" == "Failed" ( set ENV_ARTIFACT_PREFIX=conda_envs ) call ".scripts\create_conda_build_artifacts.bat" displayName: Prepare conda build artifacts - condition: succeededOrFailed() + condition: and(succeededOrFailed(), eq(variables.store_build_artifacts, true)) - task: PublishPipelineArtifact@1 displayName: Store conda build artifacts diff --git a/.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml b/.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml index 35a97233..368cb6bd 100644 --- a/.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml +++ b/.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml @@ -19,7 +19,7 @@ cxx_compiler: cxx_compiler_version: - '14' docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 +- quay.io/condaforge/linux-anvil-aarch64:alma9 expat: - '2' freethreading: diff --git a/.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml b/.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml index b806c0f6..224befc1 100644 --- a/.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml +++ b/.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml @@ -19,7 +19,7 @@ cxx_compiler: cxx_compiler_version: - '14' docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 +- quay.io/condaforge/linux-anvil-aarch64:alma9 expat: - '2' freethreading: diff --git a/.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml b/.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml index 9e32f337..d3785160 100644 --- a/.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml +++ b/.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml @@ -19,7 +19,7 @@ cxx_compiler: cxx_compiler_version: - '14' docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 +- quay.io/condaforge/linux-anvil-aarch64:alma9 expat: - '2' freethreading: diff --git a/.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml b/.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml index ec6ae1ba..048e23aa 100644 --- a/.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml +++ b/.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml @@ -19,7 +19,7 @@ cxx_compiler: cxx_compiler_version: - '14' docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 +- quay.io/condaforge/linux-anvil-aarch64:alma9 expat: - '2' freethreading: diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index f4645c5b..a09c673a 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -23,65 +23,125 @@ jobs: matrix: include: - CONFIG: linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_64_build_typedebugchannel_targetsc_h10d856d4 UPLOAD_PACKAGES: True os: ubuntu runs_on: ['ubuntu-latest'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_64_build_typedebugchannel_targetsc_hf83d9e2d UPLOAD_PACKAGES: True os: ubuntu runs_on: ['ubuntu-latest'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_64_build_typereleasechannel_target_h01f3c156 UPLOAD_PACKAGES: True os: ubuntu runs_on: ['ubuntu-latest'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_64_build_typereleasechannel_target_hf5ff4d16 UPLOAD_PACKAGES: True os: ubuntu runs_on: ['ubuntu-latest'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_aarch64_build_typedebugchannel_tar_hd2db0a21 UPLOAD_PACKAGES: True os: ubuntu - runs_on: ['ubuntu-latest'] - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + runs_on: ['ubuntu-24.04-arm'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_aarch64_build_typedebugchannel_tar_h51de9693 UPLOAD_PACKAGES: True os: ubuntu - runs_on: ['ubuntu-latest'] - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + runs_on: ['ubuntu-24.04-arm'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_aarch64_build_typereleasechannel_t_hccc48f4a UPLOAD_PACKAGES: True os: ubuntu - runs_on: ['ubuntu-latest'] - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + runs_on: ['ubuntu-24.04-arm'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_aarch64_build_typereleasechannel_t_h78d2c7f5 UPLOAD_PACKAGES: True os: ubuntu - runs_on: ['ubuntu-latest'] - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + runs_on: ['ubuntu-24.04-arm'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_ppc64le_build_typedebugchannel_tar_hac8bb296 UPLOAD_PACKAGES: True os: ubuntu runs_on: ['ubuntu-latest'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_ppc64le_build_typedebugchannel_tar_hb74ed675 UPLOAD_PACKAGES: True os: ubuntu runs_on: ['ubuntu-latest'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingno + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_ppc64le_build_typereleasechannel_t_h5454d1d5 UPLOAD_PACKAGES: True os: ubuntu runs_on: ['ubuntu-latest'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: - CONFIG: linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes + STORE_BUILD_ARTIFACTS: True + SHORT_CONFIG: linux_ppc64le_build_typereleasechannel_t_hed84b2c3 UPLOAD_PACKAGES: True os: ubuntu runs_on: ['ubuntu-latest'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + tools_install_dir: ~/miniforge3 + build_workspace_dir: build_artifacts + docker_run_args: steps: - name: Checkout code @@ -91,11 +151,13 @@ jobs: id: build-linux if: matrix.os == 'ubuntu' env: + MINIFORGE_HOME: ${{ matrix.tools_install_dir }} + CONDA_BLD_PATH: ${{ matrix.build_workspace_dir }} CONFIG: ${{ matrix.CONFIG }} UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }} CI: github_actions - CONDA_FORGE_DOCKER_RUN_ARGS: "${{ matrix.CONDA_FORGE_DOCKER_RUN_ARGS }}" + CONDA_FORGE_DOCKER_RUN_ARGS: "${{ matrix.docker_run_args }}" BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} @@ -115,6 +177,8 @@ jobs: else export IS_PR_BUILD="False" fi + export MINIFORGE_HOME="${MINIFORGE_HOME/#~/${HOME}}" + export CONDA_BLD_PATH="${CONDA_BLD_PATH/#~/${HOME}}" echo "::endgroup::" ./.scripts/run_docker_build.sh @@ -122,6 +186,8 @@ jobs: id: build-macos if: matrix.os == 'macos' env: + MINIFORGE_HOME: ${{ matrix.tools_install_dir }} + CONDA_BLD_PATH: ${{ matrix.build_workspace_dir }} CONFIG: ${{ matrix.CONFIG }} UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} CI: github_actions @@ -140,6 +206,8 @@ jobs: else export IS_PR_BUILD="False" fi + export MINIFORGE_HOME="${MINIFORGE_HOME/#~/${HOME}}" + export CONDA_BLD_PATH="${CONDA_BLD_PATH/#~/${HOME}}" ./.scripts/run_osx_build.sh - name: Build on windows @@ -152,14 +220,88 @@ jobs: set "sha=%GITHUB_SHA%" call ".scripts\run_win_build.bat" env: - # default value; make it explicit, as it needs to match with artefact - # generation below. Not configurable for now, can be revisited later - CONDA_BLD_DIR: C:\bld - MINIFORGE_HOME: ${{ contains(runner.arch, 'ARM') && 'C' || 'D' }}:\Miniforge + MINIFORGE_HOME: ${{ matrix.tools_install_dir }} + CONDA_BLD_PATH: ${{ matrix.build_workspace_dir }} PYTHONUNBUFFERED: 1 CONFIG: ${{ matrix.CONFIG }} CI: github_actions UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} - STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} \ No newline at end of file + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + + - name: Determine build outcome + # this is to merge the status of the linux/osx/win builds into + # something we can easily reuse during artefact generation + id: determine-status + if: ${{ always() }} + shell: bash + env: + OS: ${{ matrix.os }} + run: | + if [[ "$OS" == "ubuntu" ]]; then + STATUS=${{ steps.build-linux.outcome }} + elif [[ "$OS" == "macos" ]]; then + STATUS=${{ steps.build-macos.outcome }} + elif [[ "$OS" == "windows" ]]; then + STATUS=${{ steps.build-windows.outcome }} + fi + if [ -z "$STATUS" ]; then + # steps that never ran will have empty status + STATUS="cancelled" + fi + echo "status=$STATUS" >> $GITHUB_OUTPUT + + - name: Prepare conda build artifacts + continue-on-error: true + id: prepare-artifacts + shell: bash + # we do not want to trigger artefact creation if the build was cancelled + if: ${{ always() && steps.determine-status.outputs.status != 'cancelled' && matrix.STORE_BUILD_ARTIFACTS }} + env: + CONDA_BLD_PATH: ${{ matrix.build_workspace_dir }} + CI: github_actions + CONFIG: ${{ matrix.CONFIG }} + SHORT_CONFIG: ${{ matrix.SHORT_CONFIG }} + JOB_STATUS: ${{ steps.determine-status.outputs.status }} + OS: ${{ matrix.os }} + run: | + export MINIFORGE_HOME="${MINIFORGE_HOME/#~/${HOME}}" + export CONDA_BLD_PATH="${CONDA_BLD_PATH/#~/${HOME}}" + export CI_RUN_ID=$GITHUB_RUN_ID + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export ARTIFACT_STAGING_DIR="$GITHUB_WORKSPACE" + # Archive everything in CONDA_BLD_PATH except environments + # Archive the CONDA_BLD_PATH environments only when the job fails + # Use different prefix for successful and failed build artifacts + # so random failures don't prevent rebuilds from creating artifacts. + if [ $JOB_STATUS == "failure" ]; then + export BLD_ARTIFACT_PREFIX="conda_artifacts" + export ENV_ARTIFACT_PREFIX="conda_envs" + else + export BLD_ARTIFACT_PREFIX="conda_pkgs" + fi + if [ $OS == "windows" ]; then + pwsh -Command ". '.scripts/create_conda_build_artifacts.bat'" + else + ./.scripts/create_conda_build_artifacts.sh + fi + + - name: Store conda build artifacts + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + if: ${{ always() && steps.prepare-artifacts.outcome == 'success' }} + with: + name: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_NAME }} + path: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_PATH }} + retention-days: 14 + continue-on-error: true + + - name: Store conda build environment artifacts + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + # only relevant if build failed, see above + if: ${{ always() && steps.determine-status.outputs.status == 'failure' && steps.prepare-artifacts.outcome == 'success' }} + with: + name: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_NAME }} + path: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_PATH }} + retention-days: 14 + continue-on-error: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index 47b5408a..86a9c55b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Ignore all files and folders in root * !/conda-forge.yml +!.recipe_maintainers.json # Don't ignore any files/folders if the parent folder is 'un-ignored' # This also avoids warnings when adding an already-checked file with an ignored parent. diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 853faaab..afbbdb77 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -36,7 +36,7 @@ mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d- echo > /opt/conda/conda-meta/history micromamba install --root-prefix ~/.conda --prefix /opt/conda \ --yes --override-channels --channel conda-forge --strict-channel-priority \ - pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=26.3" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 # set up the condarc diff --git a/.scripts/create_conda_build_artifacts.bat b/.scripts/create_conda_build_artifacts.bat index 0bb6fc0b..6120712c 100755 --- a/.scripts/create_conda_build_artifacts.bat +++ b/.scripts/create_conda_build_artifacts.bat @@ -7,7 +7,7 @@ rem CI_RUN_ID (unique identifier for the CI job run) rem FEEDSTOCK_NAME rem CONFIG (build matrix configuration string) rem SHORT_CONFIG (uniquely-shortened configuration string) -rem CONDA_BLD_DIR (path to the conda-bld directory) +rem CONDA_BLD_PATH (path to the conda-bld directory) rem ARTIFACT_STAGING_DIR (use working directory if unset) rem BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) rem ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) @@ -20,7 +20,7 @@ rem ENV_ARTIFACT_NAME rem ENV_ARTIFACT_PATH rem Check that the conda-build directory exists -if not exist %CONDA_BLD_DIR% ( +if not exist %CONDA_BLD_PATH% ( echo conda-build directory does not exist exit 1 ) @@ -42,7 +42,7 @@ if defined BLD_ARTIFACT_PREFIX ( echo BLD_ARTIFACT_NAME: !BLD_ARTIFACT_NAME! set "BLD_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%BLD_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" - 7z a "!BLD_ARTIFACT_PATH!" "%CONDA_BLD_DIR%" -xr^^!.git/ -xr^^!_*_env*/ -xr^^!*_cache/ -bb + 7z a "!BLD_ARTIFACT_PATH!" "%CONDA_BLD_PATH%" -xr^^!.git/ -xr^^!_*_env*/ -xr^^!*_cache/ -bb if errorlevel 1 exit 1 echo BLD_ARTIFACT_PATH: !BLD_ARTIFACT_PATH! @@ -62,7 +62,7 @@ if defined ENV_ARTIFACT_PREFIX ( echo ENV_ARTIFACT_NAME: !ENV_ARTIFACT_NAME! set "ENV_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%ENV_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" - 7z a "!ENV_ARTIFACT_PATH!" -r "%CONDA_BLD_DIR%"/_*_env*/ -bb + 7z a "!ENV_ARTIFACT_PATH!" -r "%CONDA_BLD_PATH%"/_*_env*/ -bb if errorlevel 1 exit 1 echo ENV_ARTIFACT_PATH: !ENV_ARTIFACT_PATH! diff --git a/.scripts/create_conda_build_artifacts.sh b/.scripts/create_conda_build_artifacts.sh index 819c3b9c..1e3acc78 100755 --- a/.scripts/create_conda_build_artifacts.sh +++ b/.scripts/create_conda_build_artifacts.sh @@ -7,7 +7,7 @@ # FEEDSTOCK_NAME # CONFIG (build matrix configuration string) # SHORT_CONFIG (uniquely-shortened configuration string) -# CONDA_BLD_DIR (path to the conda-bld directory) +# CONDA_BLD_PATH (path to the conda-bld directory) # ARTIFACT_STAGING_DIR (use working directory if unset) # BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) # ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) @@ -26,7 +26,7 @@ source .scripts/logging_utils.sh set -e # Check that the conda-build directory exists -if [ ! -d "$CONDA_BLD_DIR" ]; then +if [ ! -d "$CONDA_BLD_PATH" ]; then echo "conda-build directory does not exist" exit 1 fi @@ -64,8 +64,8 @@ if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then ( startgroup "Archive conda build directory" ) 2> /dev/null # Try 7z and fall back to zip if it fails (for cross-platform use) - if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_DIR" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then - pushd "$CONDA_BLD_DIR" + if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_PATH" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then + pushd "$CONDA_BLD_PATH" zip -r -y -T "$BLD_ARTIFACT_PATH" . -x '*.git/*' '*_*_env*/*' '*_cache/*' popd fi @@ -92,8 +92,8 @@ if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then ( startgroup "Archive conda build environments" ) 2> /dev/null # Try 7z and fall back to zip if it fails (for cross-platform use) - if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_DIR"/'_*_env*/' -bb; then - pushd "$CONDA_BLD_DIR" + if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_PATH"/'_*_env*/' -bb; then + pushd "$CONDA_BLD_PATH" zip -r -y -T "$ENV_ARTIFACT_PATH" . -i '*_*_env*/*' popd fi diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index bac7141a..b0eda55c 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -26,7 +26,7 @@ chmod +x "${micromamba_exe}" echo "Creating environment" "${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ --channel conda-forge \ - pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=26.3" echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" echo "Cleaning up micromamba" @@ -73,7 +73,7 @@ if [[ "${OSX_SDK_DIR:-}" == "" ]]; then /usr/bin/sudo chown "${USER}" "${OSX_SDK_DIR}" fi else - if tmpf=$(mktemp -p "$OSX_SDK_DIR" tmp.XXXXXXXX 2>/dev/null); then + if tmpf=$(mktemp "$OSX_SDK_DIR"/tmp.XXXXXXXX 2>/dev/null); then rm -f "$tmpf" echo "OSX_SDK_DIR is writeable without sudo, continuing" else diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index 27c552b1..c07d98e6 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -31,7 +31,7 @@ if !errorlevel! neq 0 exit /b !errorlevel! echo Creating environment call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ --channel conda-forge ^ - pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=26.3" if !errorlevel! neq 0 exit /b !errorlevel! echo Removing %MAMBA_ROOT_PREFIX% del /S /Q "%MAMBA_ROOT_PREFIX%" >nul diff --git a/README.md b/README.md index 48d0ae38..dcf4795e 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,14 @@ Current build status ==================== -