Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Build Metrics Report #9805

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,54 @@ jobs:
--pr_number "${{ github.event.number }}" \
--sha "${{ inputs.ref || github.sha }}" \
"/tmp/metrics"

upload-report:
permissions:
contents: write
runs-on: ubuntu-latest
name: Generate and Upload Build Metric Report
needs: metrics
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
assignUser marked this conversation as resolved.
Show resolved Hide resolved
with:
fetch-depth: 0

- name: Setup Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "velox"

- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Build Environment
run: |
cd scripts/bm-report
nix-build

- name: Build Documentation
env:
CONBENCH_URL: "https://velox-conbench.voltrondata.run/"
CONBENCH_EMAIL: "${{ secrets.CONBENCH_EMAIL }}"
CONBENCH_PASSWORD: "${{ secrets.CONBENCH_PASSWORD }}"
run: |
cd scripts/bm-report
nix-shell --run "quarto render report.qmd"

- name: Push Report
# The report only uses conbench data from 'main'
# so any data generated in a PR won't be included
if: ${{ github.event_name != 'pull_request' && github.repository == 'facebookincubator/velox'}}
run: |
git checkout gh-pages
mkdir -p docs/bm-report
cp -R scripts/bm-report/report.html docs/bm-report/index.html
assignUser marked this conversation as resolved.
Show resolved Hide resolved
git add docs

if [ -n "$(git status --porcelain --untracked-files=no)" ]
then
git commit -m "Update build metrics"
git push
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -321,3 +321,4 @@ src/amalgamation/
#docs
velox/docs/sphinx/source/README_generated_*
velox/docs/bindings/python/_generate/*
scripts/bm-report/report.html
61 changes: 61 additions & 0 deletions scripts/bm-report/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This file was generated by the {rix} R package v0.6.0 on 2024-05-15
# with following call:
# >rix::rix(r_ver = "abd6d48f8c77bea7dc51beb2adfa6ed3950d2585",
# > r_pkgs = c("dplyr",
# > "prettyunits",
# > "ggplot2",
# > "gh",
# > "gt",
# > "hms",
# > "jqr",
# > "jsonlite",
# > "lubridate",
# > "memoise",
# > "plotly",
# > "purrr",
# > "remotes"),
# > system_pkgs = c("quarto"),
# > git_pkgs = list(package_name = "conbenchcoms",
# > repo_url = "https://github.com/conbench/conbenchcoms",
# > branch_name = "main",
# > commit = "55cdb120bbe2c668d3cf8ae543f4922131653645"),
# > ide = "other",
# > project_path = path_default_nix,
# > overwrite = TRUE,
# > print = TRUE)
# It uses nixpkgs' revision abd6d48f8c77bea7dc51beb2adfa6ed3950d2585 for reproducibility purposes
# which will install R version latest
# Report any issues to https://github.com/b-rodrigues/rix
let
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/abd6d48f8c77bea7dc51beb2adfa6ed3950d2585.tar.gz") {};
rpkgs = builtins.attrValues {
inherit (pkgs.rPackages) dplyr prettyunits ggplot2 gh gt hms jqr jsonlite lubridate memoise plotly quarto purrr remotes;
};
git_archive_pkgs = [(pkgs.rPackages.buildRPackage {
name = "conbenchcoms";
src = pkgs.fetchgit {
url = "https://github.com/conbench/conbenchcoms";
branchName = "main";
rev = "55cdb120bbe2c668d3cf8ae543f4922131653645";
sha256 = "sha256-XR5+grCUKyvSxsqiOkKd3gMUsWDJblZDmF4O+Jehq6U=";
};
propagatedBuildInputs = builtins.attrValues {
inherit (pkgs.rPackages) dplyr glue httr2 yaml;
};
}) ];
system_packages = builtins.attrValues {
inherit (pkgs) R glibcLocales nix quartoMinimal;
};
in
pkgs.mkShell {
LOCALE_ARCHIVE = if pkgs.system == "x86_64-linux" then "${pkgs.glibcLocales}/lib/locale/locale-archive" else "";
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";

buildInputs = [ git_archive_pkgs rpkgs system_packages ];

}
Loading