Skip to content

Commit

Permalink
CI: Clean up CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
brycx committed Oct 6, 2019
1 parent 4f70021 commit 1eb0b3b
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 202 deletions.
175 changes: 32 additions & 143 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,176 +11,65 @@ matrix:

include:
# -C opt-level = 0
- name: "stable + debug + -C opt-level = 0"
rust: stable
- name: "[DEBUG] stable + nightly && -C opt-level = 0"
env: 'OPT-LEVEL=0'
script:
- cargo clean
- sh run_benches_stable_debug.sh opt-level=0
- cargo test -- --nocapture
- sh run_benches_debug.sh opt-level=0 x86_64-unknown-linux-gnu

- name: "stable + release + -C opt-level = 0"
- name: "[RELEASE] stable + nightly + -C opt-level = 0"
rust: stable
env: 'OPT-LEVEL=0'
script:
- cargo clean
- sh run_benches_stable_release.sh opt-level=0
- cargo test -- --nocapture

- name: "nightly + debug + -C opt-level = 0"
rust: nightly
env: 'OPT-LEVEL=0'
script:
- cargo clean
- sh run_benches_nightly_debug.sh opt-level=0
- cargo test -- --nocapture

- name: "nightly + release + -C opt-level = 0"
rust: nightly
env: 'OPT-LEVEL=0'
script:
- cargo clean
- sh run_benches_nightly_release.sh opt-level=0
- cargo test -- --nocapture
- sh run_benches_release.sh opt-level=0 x86_64-unknown-linux-gnu

# -C opt-level = 1
- name: "stable + debug + -C opt-level = 1"
rust: stable
- name: "[DEBUG] stable + nightly && -C opt-level = 1"
env: 'BUILD=debug'
script:
- cargo clean
- sh run_benches_stable_debug.sh opt-level=1
- cargo test -- --nocapture

- name: "stable + release + -C opt-level = 1"
rust: stable
script:
- cargo clean
- sh run_benches_stable_release.sh opt-level=1
- cargo test -- --nocapture
- sh run_benches_debug.sh opt-level=1 x86_64-unknown-linux-gnu

- name: "nightly + debug + -C opt-level = 1"
rust: nightly
env: 'BUILD=debug'
- name: "[RELEASE] stable + nightly + -C opt-level = 1"
script:
- cargo clean
- sh run_benches_nightly_debug.sh opt-level=1
- cargo test -- --nocapture

- name: "nightly + release + -C opt-level = 1"
rust: nightly
- sh run_benches_release.sh opt-level=1 x86_64-unknown-linux-gnu

- name: "[RELEASE] stable + nightly && -C opt-level = 1"
os: osx
script:
- cargo clean
- sh run_benches_nightly_release.sh opt-level=1
- cargo test -- --nocapture
- sh run_benches_release.sh opt-level=1 x86_64-apple-darwin

# -C opt-level = 2
- name: "stable + debug + -C opt-level = 2"
rust: stable
- name: "[DEBUG] stable + nightly && -C opt-level = 2"
env: 'BUILD=debug'
script:
- cargo clean
- sh run_benches_stable_debug.sh opt-level=2
- cargo test -- --nocapture

- name: "stable + release + -C opt-level = 2"
rust: stable
script:
- cargo clean
- sh run_benches_stable_release.sh opt-level=2
- cargo test -- --nocapture
- sh run_benches_debug.sh opt-level=2 x86_64-unknown-linux-gnu

- name: "nightly + debug + -C opt-level = 2"
rust: nightly
env: 'BUILD=debug'
- name: "[RELEASE] stable + nightly + -C opt-level = 2"
script:
- cargo clean
- sh run_benches_nightly_debug.sh opt-level=2
- cargo test -- --nocapture

- name: "nightly + release + -C opt-level = 2"
rust: nightly
- sh run_benches_release.sh opt-level=2 x86_64-unknown-linux-gnu

- name: "[RELEASE] stable + nightly && -C opt-level = 2"
os: osx
script:
- cargo clean
- sh run_benches_nightly_release.sh opt-level=2
- cargo test -- --nocapture
- sh run_benches_release.sh opt-level=2 x86_64-apple-darwin

# -C opt-level = 3
- name: "stable + debug + -C opt-level = 3"
rust: stable
- name: "[DEBUG] stable + nightly && -C opt-level = 3"
env: 'BUILD=debug'
script:
- cargo clean
- sh run_benches_stable_debug.sh opt-level=3
- cargo test -- --nocapture
- sh run_benches_debug.sh opt-level=3 x86_64-unknown-linux-gnu

- name: "stable + release + -C opt-level = 3"
rust: stable
script:
- cargo clean
- sh run_benches_stable_release.sh opt-level=3
- cargo test -- --nocapture

- name: "nightly + debug + -C opt-level = 3"
rust: nightly
env: 'BUILD=debug'
script:
- cargo clean
- sh run_benches_nightly_debug.sh opt-level=3
- cargo test -- --nocapture

- name: "nightly + release + -C opt-level = 3"
rust: nightly
- name: "[RELEASE] stable + nightly + -C opt-level = 3"
script:
- cargo clean
- sh run_benches_nightly_release.sh opt-level=3
- cargo test -- --nocapture

# OSX
- name: "OSX: stable + release + -C opt-level = 3"
os: osx
rust: stable
script:
- cargo clean
- sh run_benches_stable_release.sh opt-level=3
- cargo test -- --nocapture

- name: "OSX: nightly + release + -C opt-level = 3"
os: osx
rust: nightly
script:
- cargo clean
- sh run_benches_nightly_release.sh opt-level=3
- cargo test -- --nocapture

- name: "OSX: stable + release + -C opt-level = 2"
os: osx
rust: stable
script:
- cargo clean
- sh run_benches_stable_release.sh opt-level=2
- cargo test -- --nocapture

- name: "OSX: nightly + release + -C opt-level = 2"
os: osx
rust: nightly
script:
- cargo clean
- sh run_benches_nightly_release.sh opt-level=2
- cargo test -- --nocapture
- sh run_benches_release.sh opt-level=3 x86_64-unknown-linux-gnu

- name: "OSX: stable + release + -C opt-level = 1"
- name: "[RELEASE] stable + nightly && -C opt-level = 3"
os: osx
rust: stable
script:
- cargo clean
- sh run_benches_stable_release.sh opt-level=1
- cargo test -- --nocapture
- sh run_benches_release.sh opt-level=3 x86_64-apple-darwin

- name: "OSX: nightly + release + -C opt-level = 1"
os: osx
rust: nightly
script:
- cargo clean
- sh run_benches_nightly_release.sh opt-level=1
- cargo test -- --nocapture
install:
- rustup toolchain install nightly
- rustup toolchain install stable-x86_64-unknown-linux-gnu
- rustup toolchain install nightly-x86_64-unknown-linux-gnu
- rustup toolchain install stable-x86_64-apple-darwin
- rustup toolchain install nightly-x86_64-apple-darwin
37 changes: 6 additions & 31 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,22 @@ image: Visual Studio 2017

environment:
matrix:
# MSVC Rust stable
- TARGET: i686-pc-windows-msvc
RUST_VERSION: stable
- TARGET: x86_64-pc-windows-msvc
RUST_VERSION: stable
# MSVC Rust nightly
- TARGET: i686-pc-windows-msvc
RUST_VERSION: nightly
- TARGET: x86_64-pc-windows-msvc
RUST_VERSION: nightly

install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
- rustup-init.exe -y --default-host %TARGET% --default-toolchain stable
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- rustc -Vv
- cargo -V
- rustup toolchain install nightly
- rustup toolchain install stable-%TARGET%
- rustup toolchain install nightly-%TARGET%

test_script:
- if [%RUST_VERSION%]==[stable] (
cargo clean &&
sh run_benches_stable_release.sh opt-level=1 &&
cargo test -- --nocapture &&
cargo clean &&
sh run_benches_stable_release.sh opt-level=2 &&
cargo test -- --nocapture &&
cargo clean &&
sh run_benches_stable_release.sh opt-level=3 &&
cargo test -- --nocapture
)
- if [%RUST_VERSION%]==[nightly] (
cargo clean &&
sh run_benches_nightly_release.sh opt-level=1 &&
cargo test -- --nocapture &&
cargo clean &&
sh run_benches_nightly_release.sh opt-level=2 &&
cargo test -- --nocapture &&
cargo clean &&
sh run_benches_nightly_release.sh opt-level=3 &&
cargo test -- --nocapture
)
- sh run_benches_debug.sh opt-level=1 %TARGET%
- sh run_benches_stable_release.sh opt-level=2 %TARGET%

cache:
- C:\Users\appveyor\.cargo\registry
Expand Down
11 changes: 11 additions & 0 deletions run_benches_debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# stable
cargo clean;
mkdir bench-results;
RUSTFLAGS="-C $1" cargo run --bin ct_benches --target $2 > bench-results/ct_benches.txt;
cargo test -- --nocapture;

# nightly
cargo clean;
mkdir bench-results;
RUSTFLAGS="-C $1" cargo +nightly run --bin ct_benches --target $2 > bench-results/ct_benches.txt;
cargo test -- --nocapture;
7 changes: 0 additions & 7 deletions run_benches_nightly_debug.sh

This file was deleted.

7 changes: 0 additions & 7 deletions run_benches_nightly_release.sh

This file was deleted.

11 changes: 11 additions & 0 deletions run_benches_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# stable
cargo clean;
mkdir bench-results;
RUSTFLAGS="-C $1" cargo run --release --bin ct_benches --target $2 > bench-results/ct_benches.txt;
cargo test -- --nocapture;

# nightly
cargo clean;
mkdir bench-results;
RUSTFLAGS="-C $1" cargo +nightly run --release --bin ct_benches --target $2 > bench-results/ct_benches.txt;
cargo test -- --nocapture;
7 changes: 0 additions & 7 deletions run_benches_stable_debug.sh

This file was deleted.

7 changes: 0 additions & 7 deletions run_benches_stable_release.sh

This file was deleted.

0 comments on commit 1eb0b3b

Please sign in to comment.