Artifact to test with

Conrad Irwin created

Change summary

.github/workflows/compare_perf.yml                |  8 ++++++++
tooling/xtask/src/tasks/workflows/compare_perf.rs | 11 +++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)

Detailed changes

.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

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<Run> {
         named::bash(&format!("echo {} {}", base.var(), head.var()))
     }
+
+    fn create_results() -> Step<Run> {
+        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")),
     )
 }