summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-06-23 13:37:14 +0300
committerChristian Duerr <contact@christianduerr.com>2020-06-23 11:13:14 +0000
commite4e0218edef0c0401649ce80562eacb6820e213e (patch)
tree6a0d49243ed2ddf82e16533fb575a896fb78e066
parent43c0ad6ea9d2467ccf867a310c4f1e30f5b627c6 (diff)
downloadalacritty-e4e0218edef0c0401649ce80562eacb6820e213e.tar.gz
alacritty-e4e0218edef0c0401649ce80562eacb6820e213e.zip
Run rustfmt on sr.ht
This should provide more clear feedback whether rustfmt job is failed or not.
-rw-r--r--.builds/rustfmt.yml10
-rw-r--r--.travis.yml4
-rwxr-xr-xci/install.sh5
-rwxr-xr-xci/script.sh6
4 files changed, 10 insertions, 15 deletions
diff --git a/.builds/rustfmt.yml b/.builds/rustfmt.yml
new file mode 100644
index 00000000..fe863e47
--- /dev/null
+++ b/.builds/rustfmt.yml
@@ -0,0 +1,10 @@
+image: archlinux
+sources:
+ - https://github.com/alacritty/alacritty
+tasks:
+ - rustup: |
+ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly --profile minimal
+ $HOME/.cargo/bin/rustup component add rustfmt
+ - rustfmt: |
+ cd alacritty
+ $HOME/.cargo/bin/cargo fmt -- --check
diff --git a/.travis.yml b/.travis.yml
index 504b4a50..1d55f0ba 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,10 +36,6 @@ matrix:
os: windows
env: CLIPPY=true
rust: 1.41.0-x86_64-pc-windows-msvc
- - name: "Rustfmt"
- os: linux
- env: RUSTFMT=true
- rust: nightly
- name: "Windows 1.41.0"
os: windows
rust: 1.41.0-x86_64-pc-windows-msvc
diff --git a/ci/install.sh b/ci/install.sh
index ccbe3728..ad62a190 100755
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -4,8 +4,3 @@
if [ "$CLIPPY" == "true" ]; then
rustup component add clippy
fi
-
-# Add rustfmt for format validation
-if [ "$RUSTFMT" == "true" ]; then
- rustup component add rustfmt
-fi
diff --git a/ci/script.sh b/ci/script.sh
index 87dc872f..cc4656ae 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -6,12 +6,6 @@ if [ "$CLIPPY" == "true" ]; then
exit
fi
-# Run clippy rustfmt
-if [ "$RUSTFMT" == "true" ]; then
- cargo fmt -- --check
- exit
-fi
-
# Run test in release mode if a tag is present, to produce an optimized binary
if [ -n "$TRAVIS_TAG" ]; then
# Build separately so we generate an 'alacritty' binary without -HASH appended