From 0c560b4f7d7c05b5f940eb15636036d88f2633c9 Mon Sep 17 00:00:00 2001 From: Canleskis <91223490+Canleskis@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:11:01 +0100 Subject: [PATCH] Add deployment workflow --- .github/workflows/deploy.yaml | 23 +++++++++++++++++++++++ scripts/deploy_benchmarks.sh | 14 ++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/deploy.yaml create mode 100644 scripts/deploy_benchmarks.sh diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..f8d97b9 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,23 @@ +name: Deploy + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: canleskis/particular + + - name: Deploy Benchmarks + run: | + buffer="" + + for file in "${GITHUB_WORKSPACE}/particular/benches/results/*.json"; do + buffer+=$(cat "$file") + buffer+="," + done + + echo "[${buffer%?}]" > $out_dir/$name.json diff --git a/scripts/deploy_benchmarks.sh b/scripts/deploy_benchmarks.sh new file mode 100644 index 0000000..5c83b77 --- /dev/null +++ b/scripts/deploy_benchmarks.sh @@ -0,0 +1,14 @@ +# Add all the benchmarks to a single json file in a list. + +out_dir=$1 +particular_dir=$2 +name=${2:-"benchmarks"} + +buffer="" + +for file in $particular_dir/particular/benches/results/*-*-*.json; do + buffer+=$(cat "$file") + buffer+="," +done + +echo "[${buffer%?}]" > $out_dir/$name.json