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

Linux - Conan prev-prev is allowed to fail #77

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
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
29 changes: 19 additions & 10 deletions .ci/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
import sys
import tempfile
import uuid
import re
from collections import OrderedDict
from contextlib import contextmanager
from packaging import version
from subprocess import PIPE

import colorama
from conans.client.tools.scm import Git
Expand All @@ -29,7 +31,7 @@ def is_appveyor():

def appveyor_image():
return os.getenv("APPVEYOR_BUILD_WORKER_IMAGE","")


@contextmanager
def chdir(dir_path):
Expand Down Expand Up @@ -93,7 +95,7 @@ def get_build_list():
build = [it for it in files if "build.py" in it]
if not build:
build = [it for it in files if os.path.basename(it) == script]

if build:
builds.append(os.path.join(root, build[0]))
dirs[:] = []
Expand Down Expand Up @@ -182,21 +184,26 @@ def run_scripts(scripts):
with chdir(os.path.dirname(script)):
print_build(script)
build_script = [sys.executable, abspath] if abspath.endswith(".py") else abspath

# Need to initialize the cache with default files if they are not already there
try:
subprocess.call(['conan', 'install', 'foobar/foobar@conan/stable'], env=env,
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except:
pass

with ensure_python_environment_preserved():
with ensure_cache_preserved():
result = subprocess.call(build_script, env=env)

results[script] = result
if result != 0 and FAIL_FAST:
break
process = subprocess.run(build_script, env=env, stdout=PIPE, stderr=PIPE)

results[script] = process.returncode
if process.returncode != 0:
if re.search(r'Current Conan version \(.*\) does not satisfy the defined one'
, process.stderr.decode()):
results[script] = "skip"
elif FAIL_FAST:
break

return results


Expand All @@ -213,12 +220,14 @@ def print_results(results):
def get_result_message(result):
if result == 0:
return colorama.Fore.GREEN + "SUCCESS" + colorama.Style.RESET_ALL
elif result == "skip":
return colorama.Fore.YELLOW + "SKIP" + colorama.Style.RESET_ALL
return colorama.Fore.RED + "FAILURE" + colorama.Style.RESET_ALL


def validate_results(results):
for value in results.values():
if value != 0:
if value != 0 and value != "skip":
sys.exit(value)


Expand Down
6 changes: 3 additions & 3 deletions .ci/travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set -e
set -x

if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew install openssl readline
brew update || brew update
brew outdated pyenv || brew upgrade pyenv
brew install pyenv-virtualenv
brew install openssl readline

if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
Expand Down Expand Up @@ -47,4 +47,4 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
pyenv activate conan

python --version
fi
fi
4 changes: 4 additions & 0 deletions .ci/travis/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tox
tox-venv
tox-travis
requests
51 changes: 15 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
sudo: false
language: python
dist: trusty

jobs:
fast_finish: true
include:

# Macos is slow, only if everything has passed
- stage: Macos - All Conan versions
name: Conan develop - Python 3.8
language: generic
os: osx
osx_image: xcode12
env: PYVER=py38 TOXENV=py38-conandev
- name: Conan Current - Python 3.8
language: generic
os: osx
osx_image: xcode12
env: PYVER=py38 TOXENV=py38-conancurrent

- stage: Linux - Conan develop
name: Python 3.5
python: 3.5
Expand Down Expand Up @@ -47,41 +56,11 @@ jobs:
env: TOXENV=py38-conanprevprev
dist: xenial

# Macos is slow, only if everything has passed
- stage: Macos - All Conan versions
name: Conan develop - Python 3.8
language: generic
os: osx
osx_image: xcode10
env: PYVER=py38 TOXENV=py38-conandev
- name: Conan Current - Python 3.5
language: generic
os: osx
osx_image: xcode10
env: PYVER=py35 TOXENV=py35-conancurrent
- name: Conan Current - Python 3.8
language: generic
os: osx
osx_image: xcode10
env: PYVER=py38 TOXENV=py38-conancurrent

before_install:
- ./.ci/travis/before_install.sh

install:
- |
if [[ "$(uname -s)" == 'Darwin' ]]; then
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
pyenv activate conan;
fi
- pip install --upgrade pip
- pip install tox tox-venv tox-travis requests
- pip install -r .ci/travis/requirements.txt

script:
- |
if [[ "$(uname -s)" == 'Darwin' ]]; then
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
pyenv activate conan
fi
- python .ci/last_conan_version.py
- tox
- travis_wait 30 tox -v
Empty file modified features/integrate_build_system/build.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion libraries/dear-imgui/basic/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ mkdir build
pushd build

export CONAN_SYSREQUIRES_MODE=enabled
conan install ..
conan install .. --build=missing
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
2 changes: 1 addition & 1 deletion libraries/folly/basic/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rm -rf build
mkdir build
pushd build

conan install ..
conan install .. --build=missing
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .

Expand Down
2 changes: 1 addition & 1 deletion libraries/protobuf/serialization/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rm -rf build
mkdir build
pushd build

conan install ..
conan install .. --build=missing
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .

Expand Down