Skip to content

Commit

Permalink
ci/bench: drop 11ty (#113)
Browse files Browse the repository at this point in the history
* ci: drop 11ty

* Update bench.sh
  • Loading branch information
polarhive authored Jan 7, 2025
1 parent f87cd6d commit 0231d50
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ jobs:
with:
hugo-version: 'latest'

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 'latest'
# - name: Setup Node
# uses: actions/[email protected]
# with:
# node-version: 'latest'

- name: Cache npm
uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
# - name: Cache npm
# uses: actions/[email protected]
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}

- name: Cache Eleventy .cache
uses: actions/[email protected]
with:
path: ./.cache
key: ${{ runner.os }}-eleventy-fetch-cache
# - name: Cache Eleventy .cache
# uses: actions/[email protected]
# with:
# path: ./.cache
# key: ${{ runner.os }}-eleventy-fetch-cache

- run: npm install @11ty/eleventy
# - run: npm install @11ty/eleventy

- name: Install Go
uses: actions/setup-go@v5
Expand Down
8 changes: 4 additions & 4 deletions test/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ hugo new site /tmp/bench/hugo; cd /tmp/bench/hugo
hugo new theme mytheme; echo "theme = 'mytheme'" >> hugo.toml; cd /tmp/bench

## setup 11ty
mkdir /tmp/bench/11ty -p
#mkdir /tmp/bench/11ty -p

# clean content/* dirs
echo "Cleaning content directories"
rm -rf /tmp/bench/anna/site/content/posts/*
rm -rf /tmp/bench/saaru/docs/src/*
rm -rf /tmp/bench/sapling/benchmark/content/blog/*
rm -rf /tmp/bench/hugo/content/*
rm -rf /tmp/bench/11ty/*
#rm -rf /tmp/bench/11ty/*

# create multiple copies of the test file
echo "Spawning $files different markdown files..."
Expand All @@ -59,15 +59,15 @@ for ((i = 0; i < files; i++)); do
cp /tmp/bench/test.md "/tmp/bench/saaru/docs/src/test_$i.md"
cp /tmp/bench/test.md "/tmp/bench/sapling/benchmark/content/blogs/test_$i.md"
cp /tmp/bench/test.md "/tmp/bench/hugo/content/test_$i.md"
cp /tmp/bench/test.md "/tmp/bench/11ty/test_$i.md"
# cp /tmp/bench/test.md "/tmp/bench/11ty/test_$i.md"
done

# run hyperfine
echo -e "\n"
echo "running benchmark: $files md files and $warm warmup runs"
echo -e "\n"
hyperfine -p 'sync' -w $warm \
"cd /tmp/bench/11ty && npx @11ty/eleventy" \
# "cd /tmp/bench/11ty && npx @11ty/eleventy" \
"cd /tmp/bench/hugo && hugo" \
"cd /tmp/bench/anna && ./anna -r \"site/\"" \
"cd /tmp/bench/saaru && ./saaru --base-path ./docs" \
Expand Down

0 comments on commit 0231d50

Please sign in to comment.