Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in State class doc + conda CI update #544

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
jobs:
- job: osx
pool:
vmImage: macOS-12
vmImage: macOS-13
strategy:
matrix:
osx_64_:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ c_compiler:
c_compiler_version:
- '13'
cdt_name:
- cos7
- conda
channel_sources:
- conda-forge
channel_targets:
Expand All @@ -15,7 +15,7 @@ cxx_compiler:
cxx_compiler_version:
- '13'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
- quay.io/condaforge/linux-anvil-x86_64:alma9
hdf5:
- 1.14.3
linux_clang_version:
Expand Down
8 changes: 4 additions & 4 deletions .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MACOSX_DEPLOYMENT_TARGET:
- '11.1'
- '14.5'
MACOSX_SDK_VERSION:
- '11.1'
- '14.5'
boost:
- '1.78'
c_compiler:
- clang
c_compiler_version:
- '17'
- '18'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '17'
- '18'
hdf5:
- 1.14.3
macos_machine:
Expand Down
8 changes: 4 additions & 4 deletions .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MACOSX_DEPLOYMENT_TARGET:
- '11.1'
- '14.5'
MACOSX_SDK_VERSION:
- '11.1'
- '14.5'
boost:
- '1.78'
c_compiler:
- clang
c_compiler_version:
- '17'
- '18'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '17'
- '18'
hdf5:
- 1.14.3
macos_machine:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
environment:
- CONFIG: "linux_64_"
- UPLOAD_PACKAGES: "False"
DOCKER_IMAGE: "quay.io/condaforge/linux-anvil-cos7-x86_64"
DOCKER_IMAGE: "quay.io/condaforge/linux-anvil-x86_64:alma9"
steps:
- checkout
- run:
Expand Down
16 changes: 9 additions & 7 deletions .scripts/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,20 @@ pkgs_dirs:
solver: libmamba

CONDARC
mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S)
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"
export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1

mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"

# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"

source run_conda_forge_build_setup



# make the build number clobber
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"

Expand Down Expand Up @@ -71,8 +73,8 @@ else
--extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}"
( startgroup "Inspecting artifacts" ) 2> /dev/null

# inspect_artifacts was only added in conda-forge-ci-setup 4.6.0
command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0"
# inspect_artifacts was only added in conda-forge-ci-setup 4.9.4
command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4"

( endgroup "Inspecting artifacts" ) 2> /dev/null

Expand Down
45 changes: 28 additions & 17 deletions .scripts/run_osx_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,39 @@ source .scripts/logging_utils.sh
set -xe

MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3}
MINIFORGE_HOME=${MINIFORGE_HOME%/} # remove trailing slash

( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null

MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download"
MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh"
curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}"
rm -rf ${MINIFORGE_HOME}
bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME}

( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null
( startgroup "Provisioning base env with micromamba" ) 2> /dev/null
MICROMAMBA_VERSION="1.5.10-0"
if [[ "$(uname -m)" == "arm64" ]]; then
osx_arch="osx-arm64"
else
osx_arch="osx-64"
fi
MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}"
MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)"
echo "Downloading micromamba ${MICROMAMBA_VERSION}"
micromamba_exe="$(mktemp -d)/micromamba"
curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}"
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"
echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}"
mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}"
echo "Cleaning up micromamba"
rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true
( endgroup "Provisioning base env with micromamba" ) 2> /dev/null

( startgroup "Configuring conda" ) 2> /dev/null

source ${MINIFORGE_HOME}/etc/profile.d/conda.sh
echo "Activating environment"
source "${MINIFORGE_HOME}/etc/profile.d/conda.sh"
conda activate base
export CONDA_SOLVER="libmamba"
export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1

mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \
pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"




Expand Down Expand Up @@ -84,8 +95,8 @@ else

( startgroup "Inspecting artifacts" ) 2> /dev/null

# inspect_artifacts was only added in conda-forge-ci-setup 4.6.0
command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0"
# inspect_artifacts was only added in conda-forge-ci-setup 4.9.4
command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./conda.recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4"

( endgroup "Inspecting artifacts" ) 2> /dev/null

Expand Down
29 changes: 27 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,30 @@
# update the conda-forge.yml and/or the recipe/meta.yaml.
# -*- mode: yaml -*-

jobs:
- template: ./.azure-pipelines/azure-pipelines-osx.yml
stages:
- stage: Check
jobs:
- job: Skip
pool:
vmImage: 'ubuntu-22.04'
variables:
DECODE_PERCENTS: 'false'
RET: 'true'
steps:
- checkout: self
fetchDepth: '2'
- bash: |
git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "`
echo "##vso[task.setvariable variable=log]$git_log"
displayName: Obtain commit message
- bash: echo "##vso[task.setvariable variable=RET]false"
condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]')))
displayName: Skip build?
- bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET"
name: result
displayName: Export result
- stage: Build
condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true'))
dependsOn: Check
jobs:
- template: ./.azure-pipelines/azure-pipelines-osx.yml
2 changes: 1 addition & 1 deletion conda.recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
macos_machine: # [osx]
- arm64-apple-darwin20.0.0 # [osx and arm64]
MACOSX_DEPLOYMENT_TARGET: # [osx]
- 11.1 # [osx]
- 14.5 # [osx]

# linux_clang_version is not a part of zip_keys
# from conda-forge, if you want to, you can
Expand Down
2 changes: 1 addition & 1 deletion sparta/sparta/simulation/State.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace sparta
* only value at a time.
*
* State classes take two template parameters: the Enum type (enum
* class or just standard enum) and the anticapted maximum number
* class or just standard enum) and the anticipated maximum number
* of markers that will be requested -- default is 13. Because
* the State class is in the critical path for most performance
* modeling applications, use of STL types is discouraged.
Expand Down