changeset 76:b2214096af30

Switch CI to Travis
author Lewin Bormann <lbo@spheniscida.de>
date Mon, 17 Feb 2020 20:51:07 +0100
parents 1e01c3c381cf
children 744048393750
files .travis.yml README.md bitbucket-pipelines.yml
diffstat 3 files changed, 37 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.travis.yml	Mon Feb 17 20:51:07 2020 +0100
@@ -0,0 +1,33 @@
+os:
+  - linux
+  - osx
+dist: bionic
+sudo: false
+
+language: rust
+rust:
+  - stable
+  - nightly
+
+stages:
+  - name: test
+  - name: lint
+
+install: true
+
+# Default script is the "test" stage
+script: 
+  - cargo build
+  - cargo test
+
+jobs:
+  include:
+    - stage: lint
+      if: os = linux
+      rust: stable
+      install:
+        - rustup component add rustfmt
+      script:
+        - cargo fmt --all -- --check
+
+cache: cargo
--- a/README.md	Mon Feb 17 20:41:41 2020 +0100
+++ b/README.md	Mon Feb 17 20:51:07 2020 +0100
@@ -1,9 +1,12 @@
 # rex
 
+[![Travis
+CI](https://api.travis-ci.org/dermesser/rex.svg?branch=master)](https://api.travis-ci.org/dermesser/rex)
+
 rex is a mere playground where I'm trying to write an engine for parsing,
 compiling and matching regular expressions.
 
-It's a bit slow right now.
+It's a bit slow right now, but generally works.
 
 Consider the code licensed under the MIT license.
 
--- a/bitbucket-pipelines.yml	Mon Feb 17 20:41:41 2020 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-image: rustlang/rust:nightly
-
-pipelines:
-    branches:
-        '*':
-            - step:
-                caches:
-                    - cargo
-                    - rust-target
-                script:
-                    - echo "Build project"                    ; cargo build --release
-                    - echo "Run unit tests"                   ; cargo test --lib --release -v --no-fail-fast -- --nocapture --test
-                    - echo "Run documentation tests"          ; cargo test --doc --release -v --no-fail-fast -- --nocapture --test
-definitions:
-  caches:
-    cargo: /usr/local/cargo # CARGO_HOME
-    rust-target: $BITBUCKET_CLONE_DIR/target
-