From 55dc5cf622d1125d9c6bb4fcd17bba746115e51c Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 21 Sep 2020 19:32:25 +0530 Subject: [PATCH 1/4] Profile plugin using a third-party repo --- .github/workflows/actions/memprof.rb | 14 +++++++ .github/workflows/third-party.yml | 61 ++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 .github/workflows/actions/memprof.rb create mode 100644 .github/workflows/third-party.yml diff --git a/.github/workflows/actions/memprof.rb b/.github/workflows/actions/memprof.rb new file mode 100644 index 00000000..45143d8b --- /dev/null +++ b/.github/workflows/actions/memprof.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +require 'jekyll' +require 'memory_profiler' + +MemoryProfiler.report(allow_files: 'lib/jekyll-seo-tag') do + Jekyll::PluginManager.require_from_bundler + Jekyll::Commands::Build.process({ + "source" => File.expand_path(ARGV[0]), + "destination" => File.expand_path("#{ARGV[0]}/_site"), + "disable_disk_cache" => true, + }) + puts '' +end.pretty_print(scale_bytes: true, normalize_paths: true) diff --git a/.github/workflows/third-party.yml b/.github/workflows/third-party.yml new file mode 100644 index 00000000..e450e8a0 --- /dev/null +++ b/.github/workflows/third-party.yml @@ -0,0 +1,61 @@ +name: Third-Party Repository Profiling + +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build_n_profile: + if: "!contains(github.event.commits[0].message, '[ci skip]')" + runs-on: 'ubuntu-latest' + steps: + - name: Checkout Jekyll SEO Tag + uses: actions/checkout@v2 + with: + fetch-depth: 5 + path: jekyll-seo-tag + - name: Checkout Third-Party Repository (WITHOUT SEO Tag) + uses: actions/checkout@v2 + with: + repository: ashmaroli/tomjoht.github.io + ref: 'no-seo-tag' + path: alpha-sandbox + - name: Checkout Same Third-Party Repository (WITH SEO Tag) + uses: actions/checkout@v2 + with: + repository: ashmaroli/tomjoht.github.io + ref: 'seo-tag' + path: sandbox + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + - name: Set up Dependencies Cache + uses: actions/cache@v1 + with: + path: sandbox/vendor/bundle + key: ubuntu-latest-gems- + restore-keys: | + ubuntu-latest-gems- + - name: Set up Dependencies + run: | + gem update --system --no-document + gem update bundler --no-document + bundle config gemfile sandbox/Gemfile + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - name: Run Jekyll Build (WITHOUT SEO Tag) 3 times + run: | + bundle exec jekyll build -s alpha-sandbox -d alpha-sandbox/_site --trace + bundle exec jekyll build -s alpha-sandbox -d alpha-sandbox/_site --trace + bundle exec jekyll build -s alpha-sandbox -d alpha-sandbox/_site --trace + - name: Run Jekyll Build (WITH SEO Tag) 3 times + run: | + bundle exec jekyll build -s sandbox -d sandbox/_site --trace + bundle exec jekyll build -s sandbox -d sandbox/_site --trace + bundle exec jekyll build -s sandbox -d sandbox/_site --trace + - name: Memory Analysis of Jekyll Build (WITH SEO Tag) + run: bundle exec ruby jekyll-seo-tag/.github/workflows/actions/memprof.rb sandbox From bddb251c5c42c41742c397095977f7da5978896a Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 21 Sep 2020 19:43:31 +0530 Subject: [PATCH 2/4] Temporarily trigger workflow on all branches --- .github/workflows/third-party.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/third-party.yml b/.github/workflows/third-party.yml index e450e8a0..819061e6 100644 --- a/.github/workflows/third-party.yml +++ b/.github/workflows/third-party.yml @@ -1,12 +1,6 @@ name: Third-Party Repository Profiling -on: - push: - branches: - - master - pull_request: - branches: - - master +on: [push, pull_request] jobs: build_n_profile: if: "!contains(github.event.commits[0].message, '[ci skip]')" From 2418098c792049e638c5aae71b468a68d78c012d Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 24 Sep 2020 17:52:02 +0530 Subject: [PATCH 3/4] Empty commit to trigger workflow From 0fd668b6e4b32b2f1b96e50632719c77836bf9e2 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 24 Sep 2020 17:59:00 +0530 Subject: [PATCH 4/4] Revert "Temporarily trigger workflow on all branches" This reverts commit bddb251c5c42c41742c397095977f7da5978896a. --- .github/workflows/third-party.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/third-party.yml b/.github/workflows/third-party.yml index 819061e6..e450e8a0 100644 --- a/.github/workflows/third-party.yml +++ b/.github/workflows/third-party.yml @@ -1,6 +1,12 @@ name: Third-Party Repository Profiling -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: build_n_profile: if: "!contains(github.event.commits[0].message, '[ci skip]')"