2019-03-23 23:50:09 +00:00
|
|
|
run_with_build_env_vars: &run_with_build_env_vars
|
|
|
|
environment:
|
2019-03-23 23:58:10 +00:00
|
|
|
LLVM_SYS_70_PREFIX: /home/circleci/project/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/
|
2019-03-23 23:50:09 +00:00
|
|
|
|
|
|
|
run_install_dependencies: &run_install_dependencies
|
|
|
|
run:
|
|
|
|
name: install dependencies
|
|
|
|
command: |
|
|
|
|
sudo apt-get install -y cmake
|
|
|
|
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
|
|
|
|
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
|
|
|
|
|
2018-11-05 17:03:09 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2019-04-12 18:08:20 +00:00
|
|
|
changelog:
|
|
|
|
docker:
|
|
|
|
- image: docker:stable-git
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
2019-04-12 18:11:33 +00:00
|
|
|
command: ! git diff --exit-code CHANGELOG.md
|
2019-04-12 18:08:20 +00:00
|
|
|
|
2018-11-17 18:43:05 +00:00
|
|
|
# Job used for testing
|
2019-01-18 19:27:16 +00:00
|
|
|
lint:
|
|
|
|
docker:
|
|
|
|
- image: circleci/rust:latest
|
2019-03-23 23:50:09 +00:00
|
|
|
<<: *run_with_build_env_vars
|
2019-01-18 19:27:16 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-07-09 21:36:57 +00:00
|
|
|
- run:
|
|
|
|
name: "Pull Submodules"
|
|
|
|
command: |
|
|
|
|
git submodule update --init
|
2019-01-18 19:33:25 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-04-11 18:51:28 +00:00
|
|
|
- v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2019-03-23 23:50:09 +00:00
|
|
|
- <<: *run_install_dependencies
|
2019-01-18 19:33:25 +00:00
|
|
|
- run:
|
|
|
|
name: Install lint deps
|
|
|
|
command: |
|
2019-03-19 17:33:23 +00:00
|
|
|
git config --global --unset url."ssh://git@github.com".insteadOf || true
|
2019-07-06 03:22:40 +00:00
|
|
|
# rustup toolchain install nightly-2019-06-10
|
|
|
|
# rustup default nightly-2019-06-10
|
2019-07-06 01:57:30 +00:00
|
|
|
rustup component add rustfmt
|
|
|
|
rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
|
2019-01-18 19:59:31 +00:00
|
|
|
- run:
|
|
|
|
name: Execute lints
|
2019-03-05 22:54:44 +00:00
|
|
|
command: |
|
2019-07-06 01:57:30 +00:00
|
|
|
cargo fmt --all -- --check
|
2019-01-18 19:33:25 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- /usr/local/cargo/registry
|
|
|
|
- target/debug/.fingerprint
|
|
|
|
- target/debug/build
|
|
|
|
- target/debug/deps
|
2019-04-11 18:51:28 +00:00
|
|
|
key: v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2019-03-23 23:50:09 +00:00
|
|
|
|
2019-07-06 01:57:30 +00:00
|
|
|
test-stable:
|
2018-11-17 18:43:05 +00:00
|
|
|
docker:
|
|
|
|
- image: circleci/rust:latest
|
2019-03-25 01:19:23 +00:00
|
|
|
<<: *run_with_build_env_vars
|
2018-11-17 18:43:05 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-07-09 21:36:57 +00:00
|
|
|
- run:
|
|
|
|
name: "Pull Submodules"
|
|
|
|
command: |
|
|
|
|
git submodule update --init
|
2018-11-17 18:43:05 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-04-11 18:51:28 +00:00
|
|
|
- v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2019-03-25 01:19:23 +00:00
|
|
|
- <<: *run_install_dependencies
|
2019-03-06 20:44:19 +00:00
|
|
|
- run:
|
2019-07-06 02:00:52 +00:00
|
|
|
name: Test everything (except singlepass)
|
|
|
|
command: |
|
|
|
|
make cranelift
|
|
|
|
make llvm
|
|
|
|
make test-rest
|
2019-07-06 01:57:30 +00:00
|
|
|
- run:
|
|
|
|
name: Release
|
2019-07-06 03:13:48 +00:00
|
|
|
command: make release-fast
|
2019-03-06 20:44:19 +00:00
|
|
|
- run:
|
|
|
|
name: Integration Tests
|
2019-03-25 01:19:23 +00:00
|
|
|
command: make integration-tests
|
2019-07-06 01:57:30 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- /usr/local/cargo/registry
|
2019-07-06 02:00:52 +00:00
|
|
|
- target/release/.fingerprint
|
|
|
|
- target/release/build
|
|
|
|
- target/release/deps
|
2019-07-06 01:57:30 +00:00
|
|
|
key: v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
|
|
|
|
|
|
test:
|
|
|
|
docker:
|
|
|
|
- image: circleci/rust:latest
|
|
|
|
<<: *run_with_build_env_vars
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-07-09 21:36:57 +00:00
|
|
|
- run:
|
|
|
|
name: "Pull Submodules"
|
|
|
|
command: |
|
|
|
|
git submodule update --init
|
2019-07-06 01:57:30 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v8-test-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
|
|
- <<: *run_install_dependencies
|
2019-07-06 03:13:48 +00:00
|
|
|
- run: rustup default nightly-2019-06-10
|
2019-07-06 01:57:30 +00:00
|
|
|
- run:
|
|
|
|
name: Tests
|
|
|
|
command: make test
|
|
|
|
- run:
|
|
|
|
name: Debug flag checked
|
|
|
|
command: |
|
|
|
|
cargo check --features "debug" --release
|
2019-07-06 01:36:34 +00:00
|
|
|
- run:
|
|
|
|
name: Release
|
2019-07-06 03:13:48 +00:00
|
|
|
command: make release-fast
|
2019-07-06 01:57:30 +00:00
|
|
|
- run:
|
|
|
|
name: Integration Tests
|
|
|
|
command: make integration-tests
|
2018-11-17 18:43:05 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- /usr/local/cargo/registry
|
2019-07-06 02:00:52 +00:00
|
|
|
- target/release/.fingerprint
|
|
|
|
- target/release/build
|
|
|
|
- target/release/deps
|
2019-07-06 01:57:30 +00:00
|
|
|
key: v8-test-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2018-11-17 18:43:05 +00:00
|
|
|
|
2019-01-01 20:12:48 +00:00
|
|
|
test-macos:
|
|
|
|
macos:
|
|
|
|
xcode: "9.0"
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-07-09 21:36:57 +00:00
|
|
|
- run:
|
|
|
|
name: "Pull Submodules"
|
|
|
|
command: |
|
|
|
|
git submodule update --init
|
2019-05-15 17:41:44 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-07-06 01:57:30 +00:00
|
|
|
- v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2019-01-09 23:23:22 +00:00
|
|
|
- run:
|
2019-01-18 19:33:25 +00:00
|
|
|
name: Install crate dependencies
|
2019-01-09 23:23:22 +00:00
|
|
|
command: |
|
2019-01-23 05:32:06 +00:00
|
|
|
# Installing cmake outside of brew to improve speed
|
|
|
|
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"
|
2019-03-05 21:32:02 +00:00
|
|
|
# Installing LLVM outside of brew
|
|
|
|
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz
|
|
|
|
tar xf clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz
|
2019-01-01 20:12:48 +00:00
|
|
|
- run:
|
|
|
|
name: Install Rust
|
|
|
|
command: |
|
2019-07-06 03:13:48 +00:00
|
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2019-06-10
|
2019-01-01 20:12:48 +00:00
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
2019-07-06 01:57:30 +00:00
|
|
|
cargo --version
|
2019-01-01 20:12:48 +00:00
|
|
|
- run:
|
2019-03-06 20:44:19 +00:00
|
|
|
name: Tests
|
2019-01-01 20:12:48 +00:00
|
|
|
command: |
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
2019-01-23 05:32:06 +00:00
|
|
|
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
|
2019-03-05 22:54:44 +00:00
|
|
|
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/"
|
2019-01-01 20:12:48 +00:00
|
|
|
# We increase the ulimit for fixing cargo unclosed files in mac
|
|
|
|
ulimit -n 8000
|
|
|
|
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
|
|
|
|
make test
|
2019-07-06 01:57:30 +00:00
|
|
|
- run:
|
|
|
|
name: Release
|
|
|
|
command: |
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
2019-07-06 03:13:48 +00:00
|
|
|
make release-fast
|
2019-01-14 04:56:59 +00:00
|
|
|
- run:
|
2019-07-06 01:36:34 +00:00
|
|
|
name: Integration Tests
|
2019-03-06 20:44:19 +00:00
|
|
|
command: |
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
|
|
|
|
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/"
|
2019-07-06 01:36:34 +00:00
|
|
|
make integration-tests
|
2019-05-15 17:41:44 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- ~/.cargo/registry/
|
|
|
|
- target/release/.fingerprint
|
|
|
|
- target/release/build
|
|
|
|
- target/release/deps
|
2019-07-06 01:57:30 +00:00
|
|
|
key: v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2019-01-01 20:12:48 +00:00
|
|
|
|
2018-11-17 18:43:05 +00:00
|
|
|
test-and-build:
|
2018-11-05 17:03:09 +00:00
|
|
|
docker:
|
2018-11-05 17:10:34 +00:00
|
|
|
- image: circleci/rust:latest
|
2018-11-05 17:03:09 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-07-09 21:36:57 +00:00
|
|
|
- run:
|
|
|
|
name: "Pull Submodules"
|
|
|
|
command: |
|
|
|
|
git submodule update --init
|
2019-04-11 22:07:19 +00:00
|
|
|
- run:
|
|
|
|
name: "Pull dependencies"
|
|
|
|
command: |
|
2019-04-23 20:04:12 +00:00
|
|
|
git submodule init
|
2019-05-16 21:23:43 +00:00
|
|
|
git submodule update
|
2018-11-05 17:03:09 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-04-11 18:51:28 +00:00
|
|
|
- v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2019-03-17 19:42:20 +00:00
|
|
|
- run:
|
2019-01-18 19:27:16 +00:00
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
|
|
|
sudo apt-get install -y cmake
|
2019-03-05 21:32:02 +00:00
|
|
|
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
|
|
|
|
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
|
2019-07-06 03:13:48 +00:00
|
|
|
- run: rustup default nightly-2019-06-10
|
2018-11-23 18:35:41 +00:00
|
|
|
- run:
|
2019-07-06 01:36:34 +00:00
|
|
|
name: Tests
|
2019-03-06 20:44:19 +00:00
|
|
|
command: |
|
|
|
|
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
|
2019-07-06 01:36:34 +00:00
|
|
|
make test
|
2019-03-06 20:44:19 +00:00
|
|
|
- run:
|
|
|
|
name: Release Build
|
2018-11-13 18:28:50 +00:00
|
|
|
command: |
|
2019-03-05 22:54:44 +00:00
|
|
|
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
|
2019-07-06 01:36:34 +00:00
|
|
|
make release
|
2019-07-06 01:57:30 +00:00
|
|
|
cargo build --release --manifest-path wapm-cli/Cargo.toml --features telemetry
|
2018-11-13 18:28:50 +00:00
|
|
|
mkdir -p artifacts
|
2018-11-13 18:51:04 +00:00
|
|
|
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
|
2018-12-04 02:57:26 +00:00
|
|
|
# GIT_VERSION=$(git describe --exact-match --tags)
|
2018-11-13 18:51:04 +00:00
|
|
|
echo "${VERSION}" >> artifacts/version
|
2018-12-04 02:57:26 +00:00
|
|
|
echo "${CIRCLE_TAG}" >> artifacts/git_version
|
2019-04-11 22:00:02 +00:00
|
|
|
make build-install
|
|
|
|
cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh)
|
2019-05-28 22:04:51 +00:00
|
|
|
- run:
|
|
|
|
name: Dynamic library
|
|
|
|
command: |
|
2019-07-06 01:57:30 +00:00
|
|
|
cargo build --release --manifest-path lib/runtime-c-api/Cargo.toml
|
2019-05-28 22:04:51 +00:00
|
|
|
cp target/release/libwasmer_runtime_c_api.so ./artifacts
|
2018-11-13 18:28:50 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- artifacts
|
2018-11-05 17:03:09 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- /usr/local/cargo/registry
|
2018-11-13 19:36:04 +00:00
|
|
|
- target/release/.fingerprint
|
2018-11-13 18:28:50 +00:00
|
|
|
- target/release/build
|
|
|
|
- target/release/deps
|
2019-04-11 22:07:19 +00:00
|
|
|
- wapm-cli/target/release/.fingerprint
|
|
|
|
- wapm-cli/target/release/build
|
|
|
|
- wapm-cli/target/release/deps
|
2019-04-11 18:51:28 +00:00
|
|
|
key: v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2018-11-13 18:28:50 +00:00
|
|
|
|
2018-11-17 18:43:05 +00:00
|
|
|
test-and-build-macos:
|
2018-11-13 19:36:04 +00:00
|
|
|
macos:
|
|
|
|
xcode: "9.0"
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-04-11 22:07:19 +00:00
|
|
|
- run:
|
|
|
|
name: "Pull dependencies"
|
|
|
|
command: |
|
2019-04-23 20:04:12 +00:00
|
|
|
git submodule init
|
2019-05-18 07:38:31 +00:00
|
|
|
git submodule update
|
2018-11-13 19:36:04 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-04-11 18:51:28 +00:00
|
|
|
- v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2019-01-09 23:23:22 +00:00
|
|
|
- run:
|
2019-01-18 19:33:25 +00:00
|
|
|
name: Install crate dependencies
|
2019-01-09 23:23:22 +00:00
|
|
|
command: |
|
2019-01-23 05:32:06 +00:00
|
|
|
# Installing cmake outside of brew to improve speed
|
|
|
|
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"
|
2019-03-05 21:32:02 +00:00
|
|
|
# Installing LLVM outside of brew
|
|
|
|
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz
|
|
|
|
tar xf clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz
|
2018-11-13 19:36:04 +00:00
|
|
|
- run:
|
2018-11-15 21:30:00 +00:00
|
|
|
name: Install Rust
|
2018-11-13 19:53:27 +00:00
|
|
|
command: |
|
2019-07-06 03:13:48 +00:00
|
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2019-06-10
|
2018-11-13 19:53:27 +00:00
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
2019-07-06 01:57:30 +00:00
|
|
|
cargo --version
|
2018-11-13 19:36:04 +00:00
|
|
|
- run:
|
2019-03-06 20:44:19 +00:00
|
|
|
name: Tests
|
2018-11-13 20:12:02 +00:00
|
|
|
command: |
|
2019-01-23 05:32:06 +00:00
|
|
|
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
|
2018-11-13 19:53:27 +00:00
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
2019-03-05 22:54:44 +00:00
|
|
|
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/"
|
2018-12-28 12:59:55 +00:00
|
|
|
# We increase the ulimit for fixing cargo unclosed files in mac
|
|
|
|
ulimit -n 8000
|
|
|
|
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
|
2019-07-06 01:36:34 +00:00
|
|
|
|
2018-11-13 19:53:27 +00:00
|
|
|
make test
|
2019-03-06 20:44:19 +00:00
|
|
|
- run:
|
|
|
|
name: Release Build
|
2018-11-13 19:36:04 +00:00
|
|
|
command: |
|
2019-01-23 05:32:06 +00:00
|
|
|
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
|
2018-11-13 19:53:27 +00:00
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
2019-03-05 22:54:44 +00:00
|
|
|
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/"
|
2019-07-06 01:36:34 +00:00
|
|
|
make release
|
2019-07-06 01:57:30 +00:00
|
|
|
cargo build --release --manifest-path wapm-cli/Cargo.toml --features telemetry
|
2018-11-13 19:36:04 +00:00
|
|
|
mkdir -p artifacts
|
2019-04-11 22:00:02 +00:00
|
|
|
make build-install
|
|
|
|
cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh)
|
2018-11-13 20:12:02 +00:00
|
|
|
# VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
|
|
|
|
# echo "${VERSION}" >> artifacts/version
|
2019-05-28 22:04:51 +00:00
|
|
|
- run:
|
2019-05-29 14:04:07 +00:00
|
|
|
name: Generate dynamic library for the runtime C API
|
2019-05-28 22:04:51 +00:00
|
|
|
command: |
|
2019-05-28 22:31:19 +00:00
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
2019-07-06 01:57:30 +00:00
|
|
|
cargo build --release --manifest-path lib/runtime-c-api/Cargo.toml
|
2019-05-29 14:04:07 +00:00
|
|
|
install_name_tool -id "@rpath/libwasmer_runtime_c_api.dylib" target/release/libwasmer_runtime_c_api.dylib
|
2019-05-28 22:04:51 +00:00
|
|
|
cp target/release/libwasmer_runtime_c_api.dylib ./artifacts
|
2018-11-13 19:36:04 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- artifacts
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
2019-01-23 05:40:42 +00:00
|
|
|
- ~/.cargo/registry/
|
2018-11-13 19:36:04 +00:00
|
|
|
- target/release/.fingerprint
|
|
|
|
- target/release/build
|
|
|
|
- target/release/deps
|
2019-04-11 22:07:19 +00:00
|
|
|
- wapm-cli/target/release/.fingerprint
|
|
|
|
- wapm-cli/target/release/build
|
|
|
|
- wapm-cli/target/release/deps
|
2019-07-06 17:41:45 +00:00
|
|
|
key: v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
|
2018-11-13 18:28:50 +00:00
|
|
|
|
|
|
|
publish-github-release:
|
|
|
|
docker:
|
|
|
|
- image: cibuilds/github
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: .
|
|
|
|
- run:
|
|
|
|
name: "Publish Release on GitHub"
|
|
|
|
command: |
|
|
|
|
# go get github.com/tcnksm/ghr
|
|
|
|
# VERSION=$(git log -1 --pretty=%B)
|
2018-11-23 18:35:41 +00:00
|
|
|
# VERSION=$(./artifacts/ --version)
|
2018-11-13 18:51:04 +00:00
|
|
|
VERSION=$(cat ./artifacts/version)
|
2018-12-04 02:19:03 +00:00
|
|
|
# VERSION_TAG=${CIRCLE_TAG}
|
2018-12-04 02:53:48 +00:00
|
|
|
VERSION_TAG=$(cat ./artifacts/git_version)
|
2018-12-05 23:15:12 +00:00
|
|
|
rm ./artifacts/version
|
|
|
|
rm ./artifacts/git_version
|
2018-12-04 02:53:48 +00:00
|
|
|
# VERSION_TAG=$(git describe --exact-match --tags)
|
2018-12-04 03:04:25 +00:00
|
|
|
#if [ "$VERSION" == "$VERSION_TAG" ]; then
|
|
|
|
# echo "Versions match, publishing to Github"
|
2019-05-29 08:03:51 +00:00
|
|
|
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${VERSION} ./artifacts/ || true
|
2018-12-04 03:04:25 +00:00
|
|
|
#else
|
|
|
|
# echo "Versions don't match. Wasmer output version (wasmer --version) is ${VERSION} while Git tag is ${VERSION_TAG}"
|
|
|
|
# exit 1
|
|
|
|
#fi
|
2019-03-17 19:42:20 +00:00
|
|
|
trigger-benchmark-build:
|
|
|
|
docker:
|
2019-03-19 00:56:48 +00:00
|
|
|
- image: circleci/rust:latest
|
2019-03-17 19:42:20 +00:00
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: "Trigger Benchmark Build"
|
|
|
|
command: |
|
|
|
|
if [[ -z "${CIRCLE_API_USER_TOKEN}" ]]; then
|
|
|
|
echo "CIRCLE_API_USER_TOKEN environment variable not set"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "Triggering benchmark build"
|
|
|
|
curl -u ${CIRCLE_API_USER_TOKEN} \
|
|
|
|
-d build_parameters[CIRCLE_JOB]=bench \
|
|
|
|
https://circleci.com/api/v1.1/project/github/wasmerio/wasmer-bench/tree/master
|
|
|
|
fi
|
2018-11-13 18:28:50 +00:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
main:
|
|
|
|
jobs:
|
2019-04-12 18:10:55 +00:00
|
|
|
- changelog
|
2019-03-24 23:38:45 +00:00
|
|
|
- lint
|
2018-11-17 18:43:05 +00:00
|
|
|
- test:
|
2019-03-08 23:08:28 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- trying
|
|
|
|
- staging
|
2019-01-01 20:12:48 +00:00
|
|
|
- test-macos:
|
2019-03-08 23:08:28 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- trying
|
|
|
|
- staging
|
2018-11-17 18:43:05 +00:00
|
|
|
- test-and-build:
|
2019-03-08 23:08:28 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
2019-03-12 17:07:23 +00:00
|
|
|
- master
|
2018-11-17 18:43:05 +00:00
|
|
|
- test-and-build-macos:
|
2019-03-08 23:08:28 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
2019-03-12 17:07:23 +00:00
|
|
|
- master
|
2019-07-06 01:57:30 +00:00
|
|
|
- test-stable:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- trying
|
|
|
|
- staging
|
2018-11-13 18:28:50 +00:00
|
|
|
- publish-github-release:
|
|
|
|
requires:
|
2019-01-18 19:27:16 +00:00
|
|
|
- lint
|
2018-11-17 18:43:05 +00:00
|
|
|
- test-and-build
|
|
|
|
- test-and-build-macos
|
2018-11-23 18:35:41 +00:00
|
|
|
filters:
|
2019-01-18 19:43:53 +00:00
|
|
|
branches:
|
|
|
|
only: master
|
2019-04-23 00:25:00 +00:00
|
|
|
- trigger-benchmark-build:
|
|
|
|
requires:
|
|
|
|
- test-and-build
|
|
|
|
- lint
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: master
|