Skip to content

Commit

Permalink
Cleanup CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jan 18, 2019
1 parent c003fa3 commit 019f02e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 40 deletions.
61 changes: 23 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- checkout
- restore_cache:
keys:
- lint-{{ arch }}-{{ checksum "Cargo.lock" }}-2
- v5-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Install dependencies
command: |
Expand All @@ -29,7 +29,7 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: lint-{{ arch }}-{{ checksum "Cargo.lock" }}-2
key: v5-lint-{{ arch }}-{{ checksum "Cargo.lock" }}

test:
docker:
Expand All @@ -38,7 +38,7 @@ jobs:
- checkout
- restore_cache:
keys:
- v4-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Install dependencies
command: |
Expand All @@ -52,7 +52,7 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v4-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}

test-macos:
macos:
Expand All @@ -61,14 +61,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v4-cargo-cache-darwin-{{ arch }}-brew-3
# - run:
# name: Install CMAKE
# command: |
# curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
# tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
- v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v5-cargo-cache-darwin-{{ arch }}
- run:
name: Update Brew
command: brew update || true
Expand All @@ -80,8 +74,7 @@ jobs:
- save_cache:
paths:
- /usr/local/Homebrew
# - /usr/local/Cellar
key: v4-cargo-cache-darwin-{{ arch }}-brew-3
key: v5-cargo-cache-darwin-{{ arch }}
- run:
name: Install Rust
command: |
Expand All @@ -91,7 +84,6 @@ jobs:
- run:
name: Execute tests
command: |
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
# We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000
Expand All @@ -100,9 +92,8 @@ jobs:
- run:
name: Execute integration tests
command: |
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
./integration_tests/nginx/test.sh
make integration-tests
- save_cache:
paths:
- /usr/local/cargo/registry
Expand All @@ -112,7 +103,7 @@ jobs:
- target/release/.fingerprint
- target/release/build
- target/release/deps
key: v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}

test-and-build:
docker:
Expand All @@ -121,7 +112,7 @@ jobs:
- checkout
- restore_cache:
keys:
- v4-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- v5-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Install dependencies
command: |
Expand Down Expand Up @@ -155,7 +146,7 @@ jobs:
- target/release/build
- target/release/deps
- /usr/local/Homebrew
key: v4-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v5-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}

test-and-build-macos:
macos:
Expand All @@ -164,14 +155,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v4-cargo-cache-darwin-{{ arch }}-brew-3
# - run:
# name: Install CMAKE
# command: |
# curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
# tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
- v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v5-cargo-cache-darwin-{{ arch }}
- run:
name: Update Brew
command: brew update || true
Expand All @@ -183,8 +168,7 @@ jobs:
- save_cache:
paths:
- /usr/local/Homebrew
# - /usr/local/Cellar
key: v4-cargo-cache-darwin-{{ arch }}-brew-3
key: v5-cargo-cache-darwin-{{ arch }}
- run:
name: Install Rust
command: |
Expand All @@ -194,7 +178,6 @@ jobs:
- run:
name: Execute tests
command: |
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
# We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000
Expand All @@ -203,7 +186,6 @@ jobs:
- run:
name: Make release build
command: |
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
make release
mkdir -p artifacts
Expand All @@ -223,7 +205,7 @@ jobs:
- target/release/.fingerprint
- target/release/build
- target/release/deps
key: v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}

test-rust-nightly:
docker:
Expand All @@ -232,10 +214,13 @@ jobs:
- checkout
- restore_cache:
keys:
- v4-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly
- run: sudo apt-get install -y cmake
- run: sudo apt-get install texinfo
- run: sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9
- v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly
- run:
name: Install dependencies
command: |
sudo apt-get install -y cmake
sudo apt-get install texinfo
sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9
- run: rustup default nightly
- run: make test
- save_cache:
Expand All @@ -244,7 +229,7 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v4-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly
key: v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly

publish-github-release:
docker:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ build:
install:
cargo install --path .

integration-tests: release
echo "Running Integration Tests"
# Commented for now until we fix emscripten
# ./integration_tests/nginx/test.sh

lint:
cargo fmt --all -- --check
cargo clippy --all
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ you can run:
make spectests
```

You can also run integration tests with:

```sh
make integration-tests
```


## Roadmap

Wasmer is an open project guided by strong principles, aiming to be modular, flexible and fast. It is open to the community to help set its direction.
Expand Down
2 changes: 0 additions & 2 deletions integration_tests/nginx/test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#! /bin/bash

# Build the release and run nginx
make release
nohup ./target/release/wasmer run examples/nginx/nginx.wasm -- -p integration_tests/nginx/ -c nginx.conf &
sleep 3s

Expand Down

0 comments on commit 019f02e

Please sign in to comment.