pass max value via cli #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Do the thing in CI | |
on: | |
push: | |
branches: ['master'] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
build: | |
- assembly | |
- bun | |
- clang | |
- crystal | |
- deno | |
- erlang | |
- fortran | |
- gcc | |
- go | |
- haskell | |
- java | |
- kotlin | |
- node | |
- perl | |
- php | |
- python3 | |
- ruby | |
- rust | |
- scala | |
- zig | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.cargo/.crates.toml | |
~/.cargo/.crates2.json | |
target/ | |
key: ${{ runner.os }}-cargo | |
- uses: actions/cache@v3 | |
with: | |
path: scripts/node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} | |
# install dependencies | |
- uses: extractions/setup-just@v1 | |
- uses: oven-sh/setup-bun@v1 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: "~1" | |
- name: Install dependencies | |
run: | | |
curl -fsSL https://crystal-lang.org/install.sh | sudo bash | |
sudo apt-get update | |
sudo apt-get install -y build-essential cargo clang curl erlang gfortran haskell-platform jq kotlin moreutils nasm nodejs php rustc scala tar wget xz-utils | |
cargo install timers | |
cargo install hyperfine | |
cargo install ripgrep --features 'pcre2' | |
mkdir -p /opt/zig && cd $_ | |
wget --quiet -O zig.tar.xz $(curl --silent https://ziglang.org/download/index.json | jq -r '.[keys_unsorted[1]]["x86_64-linux"].tarball') | |
tar -xvf zig.tar.xz 2>&1 >/dev/null | |
zig_path="$PWD/$(tar -tf zig.tar.xz | head -n1)" | |
echo "$zig_path" >> $GITHUB_PATH | |
export PATH="$PATH:$zig_path" | |
cd - | |
# do the thing | |
- run: just measure ${{ matrix.build }} | |
# report | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: "${{ matrix.build }}.json" | |
report: | |
needs: ['run'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download Results | |
uses: actions/download-artifact@v3 | |
with: | |
path: . | |
- run: sudo apt-get install nodejs | |
- name: Generate Summary | |
run: | | |
cd scripts | |
npm install | |
node ./summary.js --results ../artifact > summary.txt | |
cat summary.txt | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: scripts/summary.txt |