From 110429a5bc9143f59e347e2f03f178413ef5e870 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 | 19 +++++++++++++++++++ scripts/deploy_benchmarks.sh | 14 ++++++++++++++ 2 files changed, 33 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..a5600a6 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,19 @@ +name: Deploy + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: canleskis/particular + path: particular + + - name: Deploy Benchmarks + run: | + for file in "${GITHUB_WORKSPACE}/particular/particular/benches/results/*"; do + echo $file + done 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