From 51d13669024822f431a13c2dcf0ad0b7e1ab2007 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 20 Feb 2019 13:49:34 +0530 Subject: [PATCH] Add a script to profile docs with CI (#7540) Merge pull request 7540 --- .travis.yml | 5 ++++- appveyor.yml | 4 +++- script/profile-docs | 10 ++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 script/profile-docs diff --git a/.travis.yml b/.travis.yml index cfb0c8a0..1613d3b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -bundler_args: --without benchmark:site:development +bundler_args: --without benchmark:development script: script/cibuild cache: bundler language: ruby @@ -18,6 +18,9 @@ matrix: - rvm: *ruby1 env: TEST_SUITE=default-site name: "🏠️ Default Site" + - rvm: *ruby1 + env: TEST_SUITE=profile-docs + name: "Profile Docs" exclude: - rvm: *jruby env: TEST_SUITE=cucumber diff --git a/appveyor.yml b/appveyor.yml index b1f03c31..79688444 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,7 @@ branches: build: off environment: - BUNDLE_WITHOUT: "benchmark:site:development" + BUNDLE_WITHOUT: "benchmark:development" matrix: - RUBY_FOLDER_VER: "26" TEST_SUITE: "test" @@ -19,6 +19,8 @@ environment: TEST_SUITE: "cucumber" - RUBY_FOLDER_VER: "26" TEST_SUITE: "default-site" + - RUBY_FOLDER_VER: "26" + TEST_SUITE: "profile-docs" - RUBY_FOLDER_VER: "25" TEST_SUITE: "test" - RUBY_FOLDER_VER: "24" diff --git a/script/profile-docs b/script/profile-docs new file mode 100755 index 00000000..23478267 --- /dev/null +++ b/script/profile-docs @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# +# Build Jekyll's Documentation site in 'debug' mode and outputs the site's profile stats. +# Helps detecting *hard* breaking-changes (`jekyll build` aborts) and optimizations +# in the `build` process. +# +# Usage: bash script/profile-docs + +SOURCE_DIR=$PWD/docs +bundle exec jekyll build -s $SOURCE_DIR -d $SOURCE_DIR/_site --profile --trace --verbose