Skip to content

Commit

Permalink
Merge pull request #392 from sparcians/knutel/jerinjoy-clang-filesyst…
Browse files Browse the repository at this point in the history
…em-fix

jerinjoy branch: clang filesystem fix; MacOS CI upgrade
  • Loading branch information
Knute Lingaard authored Jan 31, 2023
2 parents 749c686 + be283f7 commit edc3b2a
Show file tree
Hide file tree
Showing 34 changed files with 243 additions and 232 deletions.
11 changes: 1 addition & 10 deletions .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-10.15
vmImage: macOS-11
strategy:
matrix:
osx_64_:
Expand Down Expand Up @@ -47,15 +47,6 @@ jobs:
displayName: Prepare conda build artifacts
condition: succeededOrFailed()
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
mergeTestResults: false # Unclear on impact of setting this true
failTaskOnFailedTests: true
publishRunAttachments: true # uploads xml files for possible inspection

- task: PublishPipelineArtifact@1
displayName: Store conda build artifacts
condition: not(eq(variables.BLD_ARTIFACT_PATH, ''))
Expand Down
14 changes: 7 additions & 7 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
boost:
- 1.74.0
- 1.78.0
boost_cpp:
- 1.74.0
- 1.78.0
c_compiler:
- gcc
c_compiler_version:
- '10'
- '11'
cdt_name:
- cos6
channel_sources:
Expand All @@ -15,11 +15,11 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '10'
- '11'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
hdf5:
- 1.10.6
- 1.12.2
linux_clang_version:
- '13'
numpy:
Expand All @@ -32,8 +32,6 @@ pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
sqlite:
max_pin: x
python:
- 3.8.* *_cpython
sqlite:
Expand All @@ -45,3 +43,5 @@ zip_keys:
- cxx_compiler_version
- - python
- numpy
zlib:
- '1.2'
20 changes: 8 additions & 12 deletions .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.13'
- '11.1'
boost:
- 1.74.0
- 1.78.0
boost_cpp:
- 1.74.0
- 1.78.0
c_compiler:
- clang
c_compiler_version:
- '12'
- '14'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '12'
- '14'
hdf5:
- 1.10.6
- 1.12.2
macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
- '10.13'
numpy:
- '1.19'
pin_run_as_build:
Expand All @@ -32,8 +30,6 @@ pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
sqlite:
max_pin: x
python:
- 3.8.* *_cpython
sqlite:
Expand All @@ -43,7 +39,7 @@ target_platform:
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- - macos_min_version
- MACOSX_DEPLOYMENT_TARGET
- - python
- numpy
zlib:
- '1.2'
21 changes: 6 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# This file was generated automatically from conda-smithy. To update this configuration,
# update the conda-forge.yml and/or the recipe/meta.yaml.
# -*- mode: yaml -*-
# -*- mode: jinja-yaml -*-

version: 2

jobs:
build_linux_64_:
working_directory: ~/test
machine:
image: ubuntu-2004:current
- image: ubuntu-2004:current
environment:
CONFIG: "linux_64_"
UPLOAD_PACKAGES: "False"
DOCKER_IMAGE: "quay.io/condaforge/linux-anvil-cos7-x86_64"
- CONFIG: "linux_64_"
- UPLOAD_PACKAGES: "False"
DOCKER_IMAGE: "quay.io/condaforge/linux-anvil-cos7-x86_64"
steps:
- checkout
- run:
Expand All @@ -36,13 +36,4 @@ workflows:
version: 2
build_and_test:
jobs:
- build_linux_64_:
# Knute says he only wants it to build for PR's
# That is accomplished by turning on "build only on pull requests"
# on https://app.circleci.com/settings/project/github/sparcians/map/advanced
# which still will build commits on master but we also add filters to ignore
# all branches here as suggested in https://discuss.circleci.com/t/only-build-pull-requests-not-every-branch/200/8
filters:
branches:
ignore: master

- build_linux_64_
19 changes: 19 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
status: {}
check_suite:
types:
- completed

jobs:
automerge-action:
runs-on: ubuntu-latest
name: automerge
steps:
- name: checkout
uses: actions/checkout@v3
- name: automerge-action
id: automerge-action
uses: conda-forge/automerge-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
rerendering_github_token: ${{ secrets.RERENDERING_GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions .github/workflows/webservices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on: repository_dispatch

jobs:
webservices:
runs-on: ubuntu-latest
name: webservices
steps:
- name: webservices
id: webservices
uses: conda-forge/webservices-dispatch-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
rerendering_github_token: ${{ secrets.RERENDERING_GITHUB_TOKEN }}
13 changes: 10 additions & 3 deletions .scripts/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml"
cat >~/.condarc <<CONDARC
conda-build:
root-dir: ${FEEDSTOCK_ROOT}/build_artifacts
root-dir: ${FEEDSTOCK_ROOT}/build_artifacts
pkgs_dirs:
- ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache
- /opt/conda/pkgs
CONDARC


mamba install --update-specs --yes --quiet --channel conda-forge \
conda-build pip boa conda-forge-ci-setup=3
conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12"
mamba update --update-specs --yes --quiet --channel conda-forge \
conda-build pip boa conda-forge-ci-setup=3
conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12"

# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
Expand All @@ -46,6 +49,10 @@ make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"

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

if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then
cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt"
fi

if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then
if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then
EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}"
Expand Down
9 changes: 6 additions & 3 deletions .scripts/run_osx_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME}
source ${MINIFORGE_HOME}/etc/profile.d/conda.sh
conda activate base

echo -e "\n\nInstalling ['conda-forge-ci-setup=3'] and conda-build."
mamba install --update-specs --quiet --yes --channel conda-forge \
conda-build pip boa conda-forge-ci-setup=3
conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12"
mamba update --update-specs --yes --quiet --channel conda-forge \
conda-build pip boa conda-forge-ci-setup=3
conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12"



Expand Down Expand Up @@ -57,6 +56,10 @@ echo -e "\n\nMaking the build clobber file"
make_build_number ./ ./conda.recipe ./.ci_support/${CONFIG}.yaml


if [[ -f LICENSE.txt ]]; then
cp LICENSE.txt "conda.recipe/recipe-scripts-license.txt"
fi

if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then
if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then
EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}"
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,18 @@ MAP is broken into two parts:
[![CircleCI](https://circleci.com/gh/sparcians/map.svg?style=svg)](https://circleci.com/gh/sparcians/map)
[![MacOS Build Status](https://dev.azure.com/sparcians/map/_apis/build/status/sparcians.map?branchName=master&label=MacOS)](https://dev.azure.com/sparcians/map/_build/latest?definitionId=1&branchName=master)
[![Documentation](https://github.com/sparcians/map/workflows/Documentation/badge.svg)](https://sparcians.github.io/map/)

## Updating Regression/Build Environments

CI files are generated when the command `conda smithy rerender` is run
inside a MAP clone. That command uses the following files to control
the generation of the CI-specific control files:

- `conda-forge.yml` - defines which platforms you want to support and some other higher-level things
- `conda.recipe/conda_build_config.yaml` - defines lists of values for variables that are used in meta.yaml
- `conda.recipe/meta.yaml` - uses variables (stuff inside {{ varname }} double curlies)

To update versions of OSes, edit the following file:
https://github.com/sparcians/map/blob/master/conda.recipe/conda_build_config.yaml
and then run `conda smithy rerender`. (Ensure `conda install
conda-smithy` into your conda installation for that command to exist).
4 changes: 2 additions & 2 deletions conda-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ skip_render:
- build-locally.py
- .github
provider:
linux: circle
osx: azure
linux_64: circle
osx_64: azure
win: None
linux_ppc64le: None
linux_aarch64: None
Expand Down
22 changes: 6 additions & 16 deletions conda.recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,13 @@
# override macos APK min version.
# conda-forge supports from 10.9 but we
# have code that needs 10.13.
# See https://sifive.atlassian.net/wiki/x/0IBBJw
# for details
macos_min_version: # [osx]
- 10.13 # [osx]
macos_machine: # [osx]
- arm64-apple-darwin20.0.0 # [osx and arm64]
MACOSX_DEPLOYMENT_TARGET: # [osx]
- 10.13 # [osx]

zip_keys: # [osx]
- # [osx]
- macos_min_version # [osx]
- MACOSX_DEPLOYMENT_TARGET # [osx]

- 11.1 # [osx]

# linux_clang_version is not a part of zip_keys
# from conda-forge, if you want to, you can
# from conda-forge, if you want to, you can
# easily matrix the linux builds using the same
# backend from gcc but adding new clang versions
# here
Expand Down Expand Up @@ -94,7 +86,7 @@ python_impl:
# cdt_name:
# - cos6
# - cos6
#
#

# conda-forge-pinnings-feedstock/recipe/conda_build_config.yaml
# uses c_compiler_version and cxx_compiler_version in a zip_keys
Expand All @@ -111,7 +103,7 @@ python_impl:
# list and keys can only be in one, so, we have to constrain fortran to be
# a matrix as well even though we don't use it.
#
# If we really want to define our own zip_keys, we can rerender with
# If we really want to define our own zip_keys, we can rerender with
# conda smithy rerender --exclusive-config <path to this file>
#
# and conda-smithy should just use our configuration
Expand All @@ -127,5 +119,3 @@ python_impl:
# - python
# - numpy
# - python_impl


1 change: 1 addition & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ requirements:
- hdf5
- python
- rapidjson
- zlib
run:
- matplotlib-base
- numpy
Expand Down
11 changes: 8 additions & 3 deletions sparta/cmake/sparta-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
################################################################################

# Find Boost
set (_BOOST_COMPONENTS filesystem date_time iostreams serialization timer program_options)
set (_BOOST_COMPONENTS date_time iostreams serialization timer program_options)
if (COMPILE_WITH_PYTHON)
list (APPEND _BOOST_COMPONENTS python)
find_package (Python COMPONENTS Interpreter Development)
Expand Down Expand Up @@ -70,14 +70,19 @@ message (STATUS "Using RapidJSON CPP ${RapidJSON_VERSION}")
find_package (SQLite3 3.19 REQUIRED)
message (STATUS "Using SQLite3 ${SQLite3_VERSION}")

# Find zlib
find_package(ZLIB REQUIRED)
message (STATUS "Using zlib ${ZLIB_VERSION_STRING}")
include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS})

# Find HDF5. Need to enable C language for HDF5 testing
enable_language (C)
find_package (HDF5 1.10 REQUIRED)

# Populate the Sparta_LIBS variable with the required libraries for
# basic Sparta linking
set (Sparta_LIBS sparta simdb ${HDF5_LIBRARIES} sqlite3 yaml-cpp z pthread
Boost::date_time Boost::filesystem Boost::iostreams Boost::serialization Boost::timer Boost::program_options)
set (Sparta_LIBS sparta simdb ${HDF5_LIBRARIES} sqlite3 yaml-cpp ZLIB::ZLIB pthread
Boost::date_time Boost::iostreams Boost::serialization Boost::timer Boost::program_options)

# On Linux we need to link against rt as well
if (NOT APPLE)
Expand Down
1 change: 0 additions & 1 deletion sparta/doc/sparta_docs/building.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
z
pthread
Boost::date_time
Boost::filesystem
Boost::iostreams
Boost::serialization
Boost::timer
Expand Down
Loading

0 comments on commit edc3b2a

Please sign in to comment.