From ef44e7295e9593d6b245f36f53c5a24867f0d82e Mon Sep 17 00:00:00 2001 From: Windel Bouwman Date: Sat, 6 Jul 2019 12:32:53 +0200 Subject: [PATCH 1/2] Trial to improve travis config. --- .travis.yml | 97 ++++++++++++++++++++++------------------------------- 1 file changed, 40 insertions(+), 57 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc9afe7d8e..3a33a23a23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,3 @@ -language: rust -rust: stable -cache: cargo matrix: fast_finish: true @@ -12,6 +9,10 @@ matrix: script: - cargo build --verbose --all - cargo test --verbose --all + env: + # Prevention of cache corruption. + # See: https://docs.travis-ci.com/user/caching/#caches-and-build-matrices + - JOBCACHE=1 # To test the snippets, we use Travis' Python environment (because # installing rust ourselves is a lot easier than installing Python) @@ -19,16 +20,14 @@ matrix: language: python python: 3.6 cache: - pip: true - # Because we're using the Python Travis environment, we can't use - # the built-in cargo cacher - directories: - - /home/travis/.cargo - - target + - pip + - cargo env: + - JOBCACHE=2 - TRAVIS_RUST_VERSION=stable - CODE_COVERAGE=false script: tests/.travis-runner.sh + - name: rustfmt language: rust rust: stable @@ -42,6 +41,9 @@ matrix: # creates.) - echo > parser/src/python.rs - cargo fmt --all -- --check + env: + - JOBCACHE=3 + - name: publish documentation language: rust rust: stable @@ -50,7 +52,17 @@ matrix: - cargo doc --no-deps --all if: branch = release env: - - DEPLOY_DOC=true + - JOBCACHE=4 + deploy: + - provider: pages + repo: RustPython/website + target-branch: master + local-dir: target/doc + skip-cleanup: true + # Set in the settings page of your repository, as a secure variable + github-token: $WEBSITE_GITHUB_TOKEN + keep-history: true + - name: WASM online demo language: rust rust: stable @@ -65,42 +77,38 @@ matrix: - npm run dist if: branch = release env: - - DEPLOY_DEMO=true - - name: cargo-clippy - language: rust - rust: stable - cache: cargo - before_script: - - rustup component add clippy - script: - - cargo clippy + - JOBCACHE=5 + deploy: + - provider: pages + repo: RustPython/demo + target-branch: master + local-dir: wasm/demo/dist + skip-cleanup: true + # Set in the settings page of your repository, as a secure variable + github-token: $WEBSITE_GITHUB_TOKEN + keep-history: true + - name: Code Coverage language: python python: 3.6 cache: - pip: true - # Because we're using the Python Travis environment, we can't use - # the built-in cargo cacher - directories: - - /home/travis/.cargo - - target + - pip + - cargo script: - tests/.travis-runner.sh # Only do code coverage on master via a cron job. if: branch = master AND type = cron env: + - JOBCACHE=6 - TRAVIS_RUST_VERSION=nightly - CODE_COVERAGE=true + - name: test WASM language: python python: 3.6 cache: - pip: true - # Because we're using the Python Travis environment, we can't use - # the built-in cargo cacher - directories: - - /home/travis/.cargo - - target + - pip + - cargo addons: firefox: latest install: @@ -109,30 +117,5 @@ matrix: script: - wasm/tests/.travis-runner.sh env: + - JOBCACHE=7 - TRAVIS_RUST_VERSION=stable - allow_failures: - - name: cargo-clippy - -deploy: - - provider: pages - repo: RustPython/website - target-branch: master - local-dir: target/doc - skip-cleanup: true - # Set in the settings page of your repository, as a secure variable - github-token: $WEBSITE_GITHUB_TOKEN - keep-history: true - on: - branch: release - condition: $DEPLOY_DOC = true - - provider: pages - repo: RustPython/demo - target-branch: master - local-dir: wasm/demo/dist - skip-cleanup: true - # Set in the settings page of your repository, as a secure variable - github-token: $WEBSITE_GITHUB_TOKEN - keep-history: true - on: - branch: release - condition: $DEPLOY_DEMO = true From f68b064224ec3f1748d8d070fe59ce396384cc29 Mon Sep 17 00:00:00 2001 From: Windel Bouwman Date: Sat, 6 Jul 2019 13:13:35 +0200 Subject: [PATCH 2/2] Stick to python3.6 for now. --- .travis.yml | 11 +++-------- azure-pipelines.yml | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a33a23a23..92f5608752 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ matrix: fast_finish: true include: - - name: rust unittests and doctests + - name: Run rust tests language: rust rust: stable cache: cargo @@ -28,18 +28,13 @@ matrix: - CODE_COVERAGE=false script: tests/.travis-runner.sh - - name: rustfmt + - name: Check rust code style with rustfmt language: rust rust: stable cache: cargo before_script: - - rustup component add rustfmt-preview + - rustup component add rustfmt script: - # Code references the generated python.rs, so put something in - # place to make `cargo fmt` happy. (We use `echo` rather than - # `touch` because rustfmt complains about the empty file touch - # creates.) - - echo > parser/src/python.rs - cargo fmt --all -- --check env: - JOBCACHE=3 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ee8889c035..7271390c80 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,8 +8,8 @@ jobs: vmImage: 'vs2017-win2016' strategy: matrix: - Python37: - python.version: '3.7' + Python36: + python.version: '3.6' maxParallel: 10 steps: