diff --git a/.github/workflows/compare_perf.yml b/.github/workflows/compare_perf.yml index 7ecdd784e8e5b3a9bcb1f64bdb60fbfabba6110b..fac55be247adf9fb767d6618f884c490ee78ef14 100644 --- a/.github/workflows/compare_perf.yml +++ b/.github/workflows/compare_perf.yml @@ -23,3 +23,11 @@ jobs: - name: compare_perf::run_perf::echo_inputs run: echo ${{ inputs.base }} ${{ inputs.head }} shell: bash -euxo pipefail {0} + - name: compare_perf::run_perf::create_results + run: echo 'Perf is *much* better now' > target/results.md + shell: bash -euxo pipefail {0} + - name: '@actions/upload-artifact results.md' + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 + with: + name: results.md + path: target/results.md diff --git a/tooling/xtask/src/tasks/workflows/compare_perf.rs b/tooling/xtask/src/tasks/workflows/compare_perf.rs index 46f8bd1c59c9242e98d0dfd6ac427a5b48afc24a..60fe2b56da57f18ecad96bb547c3566644fe7dcb 100644 --- a/tooling/xtask/src/tasks/workflows/compare_perf.rs +++ b/tooling/xtask/src/tasks/workflows/compare_perf.rs @@ -2,7 +2,7 @@ use gh_workflow::*; use crate::tasks::workflows::{ runners, - steps::{self, NamedJob, named}, + steps::{self, NamedJob, named, upload_artifact}, vars::Input, }; @@ -24,10 +24,17 @@ pub fn run_perf(base: &Input, head: &Input) -> NamedJob { fn echo_inputs(base: &Input, head: &Input) -> Step { named::bash(&format!("echo {} {}", base.var(), head.var())) } + + fn create_results() -> Step { + named::bash("echo 'Perf is *much* better now' > target/results.md") + } + named::job( Job::default() .runs_on(runners::LINUX_SMALL) .add_step(steps::checkout_repo()) - .add_step(echo_inputs(base, head)), + .add_step(echo_inputs(base, head)) + .add_step(create_results()) + .add_step(upload_artifact("results.md", "target/results.md")), ) }