Skip to content

Commit

Permalink
Add linux (#11)
Browse files Browse the repository at this point in the history
* add linux build

* MNT: Re-rendered with conda-build 3.18.9, conda-smithy 3.6.12, and conda-forge-pinning 2020.03.10

* ..

* ..
  • Loading branch information
wolfv authored Mar 13, 2020
1 parent 1ff1e3b commit be8f87d
Show file tree
Hide file tree
Showing 14 changed files with 566 additions and 32 deletions.
32 changes: 32 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .ci_support/linux_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
boost_cpp:
- '1.72'
c_compiler:
- gcc
c_compiler_version:
- '7'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
curl:
- '7.64'
cxx_compiler:
- gxx
cxx_compiler_version:
- '7'
docker_image:
- condaforge/linux-anvil-comp7
libcurl:
- '7.64'
libprotobuf:
- '3.11'
libuuid:
- 2.32.1
pin_run_as_build:
boost-cpp:
max_pin: x.x.x
curl:
max_pin: x
libcurl:
max_pin: x
libuuid:
max_pin: x
qt:
max_pin: x.x
qt:
- '5.12'
6 changes: 6 additions & 0 deletions .ci_support/win_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ channel_targets:
- conda-forge main
curl:
- '7.64'
libcurl:
- '7.64'
libprotobuf:
- '3.11'
pin_run_as_build:
boost-cpp:
max_pin: x.x.x
curl:
max_pin: x
libcurl:
max_pin: x
qt:
max_pin: x.x
qt:
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions .scripts/build_steps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here
# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.

set -xeuo pipefail
export PYTHONUNBUFFERED=1
export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}"
export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}"
export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support"
export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml"

cat >~/.condarc <<CONDARC
conda-build:
root-dir: ${FEEDSTOCK_ROOT}/build_artifacts
CONDARC

conda install --yes --quiet conda-forge-ci-setup=2 conda-build -c conda-forge

# 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}"

conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
--clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"

if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then
upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
fi

touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}"
75 changes: 75 additions & 0 deletions .scripts/run_docker_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env bash

# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here
# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.

set -xeo pipefail

THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )"
PROVIDER_DIR="$(basename $THISDIR)"

FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe"

docker info

# In order for the conda-build process in the container to write to the mounted
# volumes, we need to run with the same id as the host machine, which is
# normally the owner of the mounted volumes, or at least has write permission
export HOST_USER_ID=$(id -u)
# Check if docker-machine is being used (normally on OSX) and get the uid from
# the VM
if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then
export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u)
fi

ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts"

if [ -z "$CONFIG" ]; then
set +x
FILES=`ls .ci_support/linux_*`
CONFIGS=""
for file in $FILES; do
CONFIGS="${CONFIGS}'${file:12:-5}' or ";
done
echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}"
exit 1
fi

if [ -z "${DOCKER_IMAGE}" ]; then
SHYAML_INSTALLED="$(shyaml -h || echo NO)"
if [ "${SHYAML_INSTALLED}" == "NO" ]; then
echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7"
DOCKER_IMAGE="condaforge/linux-anvil-comp7"
else
DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )"
fi
fi

mkdir -p "$ARTIFACTS"
DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}"
rm -f "$DONE_CANARY"

if [ -z "${CI}" ]; then
DOCKER_RUN_ARGS="-it "
fi

export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}"
docker run ${DOCKER_RUN_ARGS} \
-v "${RECIPE_ROOT}":/home/conda/recipe_root:ro,z \
-v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \
-e CONFIG \
-e BINSTAR_TOKEN \
-e HOST_USER_ID \
-e UPLOAD_PACKAGES \
-e GIT_BRANCH \
-e UPLOAD_ON_BRANCH \
-e CI \
$DOCKER_IMAGE \
bash \
/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh

# verify that the end of the script was reached
test -f "$DONE_CANARY"
14 changes: 8 additions & 6 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions azure-pipelines.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions recipe/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source "${CONDA_PREFIX}/share/gazebo/setup.sh"
20 changes: 13 additions & 7 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

mkdir build
cd build

Expand All @@ -7,10 +6,17 @@ cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=$PREFIX/lib \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON \
-DBoost_NO_BOOST_CMAKE=ON \
-DBoost_DEBUG=ON
-DCMAKE_INSTALL_LIBDIR=lib \
-DBoost_NO_BOOST_CMAKE=OFF \
-DBoost_DEBUG=OFF

cmake --build . --config $BUILD_TYPE -- -j$CPU_COUNT
cmake --build . --config $BUILD_TYPE --target install

cmake --build . --config Release -- -j$CPU_COUNT
cmake --build . --config Release --target install
# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d.
# This will allow them to be run on environment activation.
for CHANGE in "activate" "deactivate"
do
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh"
done
5 changes: 5 additions & 0 deletions recipe/deactivate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
unset GAZEBO_MASTER_URI
unset GAZEBO_MODEL_DATABASE_URI
unset GAZEBO_RESOURCE_PATH
unset GAZEBO_PLUGIN_PATH
unset GAZEBO_MODEL_PATH
Loading

1 comment on commit be8f87d

@conda-forge-linter
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! This is the friendly automated conda-forge-webservice.

I updated the Github team because of this commit.

  • @wolfv was added to this feedstock maintenance team.

You should get push access to this feedstock and CI services.

Feel free to join the community chat room.

NOTE: Please make sure to not push to the repository directly.
Use branches in your fork for any changes and send a PR.
More details here

Please sign in to comment.