瀏覽代碼

Add commands to test feature combinations

Using the cargo-hack command, which now gets installed in the Vagrant environment, there's now an easy way to make sure exa can be built and test with all combinations of features.

There have been times in the past where exa has failed to build without the git feature, and I've just never noticed. This should put a stop to that.
Benjamin Sago 5 年之前
父節點
當前提交
ee898bef8d
共有 2 個文件被更改,包括 9 次插入0 次删除
  1. 8 0
      Justfile
  2. 1 0
      Vagrantfile

+ 8 - 0
Justfile

@@ -10,6 +10,10 @@ all-release: build-release test-release
 @build-release:
     cargo build --release --verbose
 
+# compiles the exa binary with every combination of feature flags
+build-features:
+    cargo hack build --feature-powerset
+
 
 # runs unit tests
 @test:
@@ -19,6 +23,10 @@ all-release: build-release test-release
 @test-release:
     cargo test --release --all --verbose
 
+# runs unit tests with every combination of feature flags
+test-features:
+    cargo hack test --feature-powerset --lib -- --quiet
+
 
 # prints versions of the necessary build tools
 @versions:

+ 1 - 0
Vagrantfile

@@ -55,6 +55,7 @@ Vagrant.configure(2) do |config|
       else
         set -xe
         curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+        cargo install cargo-hack
       fi
     EOF