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

CI: Publish reports to Github Actions #3113

Merged
merged 18 commits into from
Feb 18, 2022
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ jobs:
- name: "nix-build"
run: nix-build-uncached --max-jobs 4 -A all-systems-go -build-flags -L

- name: "Pull reports"
run: nix-build -A report-site -o report-site

- name: Push report to gitub pages
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/joachim/deploy-reports'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: report-site
SINGLE_COMMIT: true

- name: Calculate performance delta
if: runner.os == 'Linux' && github.event_name == 'pull_request'
run: |
Expand Down
16 changes: 16 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,22 @@ rec {
'';
};

report = nixpkgs.runCommandNoCC "netlify-site" {
buildInputs = [ nixpkgs.tree ];
} ''
mkdir -p $out
ln -s ${base-doc} $out/base-doc
ln -s ${docs} $out/docs
ln -s ${tests.profiling-graphs} $out/flamegraphs
cd $out;
# generate a simple index.html, listing the entry points
( echo docs/overview-slides.html;
echo docs/docs/language-guide/motoko.html;
echo base-doc/index.html
echo flamegraphs/index.html ) | \
tree -H . -l --fromfile -T "Motoko build reports" > index.html
'';

check-generated = nixpkgs.runCommandNoCC "check-generated" {
nativeBuildInputs = [ nixpkgs.diffutils ];
expected = import ./nix/generate.nix { pkgs = nixpkgs; };
Expand Down