Skip to content

Commit 081a66c

Browse files
authored
feat(action): allow configuring the tmp dir (#84)
1 parent 573bbe4 commit 081a66c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

action.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ inputs:
4040
required: false
4141
default: ''
4242

43+
tmp-dir:
44+
description: 'Temporary directory path used for benchmarkoor data (overlayfs) and cache'
45+
required: false
46+
default: '/tmp'
47+
4348
runs:
4449
using: 'composite'
4550
steps:
@@ -187,7 +192,7 @@ runs:
187192
DOCKER_CMD="$DOCKER_CMD -v /var/run/docker.sock:/var/run/docker.sock"
188193
DOCKER_CMD="$DOCKER_CMD -v ${{ runner.temp }}/results:/app/results"
189194
DOCKER_CMD="$DOCKER_CMD -v ${{ runner.temp }}:/app/configs"
190-
DOCKER_CMD="$DOCKER_CMD --mount type=bind,source=/tmp,target=/tmp,bind-propagation=rshared"
195+
DOCKER_CMD="$DOCKER_CMD --mount type=bind,source=${{ inputs.tmp-dir }},target=${{ inputs.tmp-dir }},bind-propagation=rshared"
191196
DOCKER_CMD="$DOCKER_CMD --privileged"
192197
DOCKER_CMD="$DOCKER_CMD -v /proc/sys/vm/drop_caches:/host_drop_caches"
193198
DOCKER_CMD="$DOCKER_CMD -v /sys/devices/system/cpu:/host_sys_cpu"
@@ -196,8 +201,8 @@ runs:
196201
DOCKER_CMD="$DOCKER_CMD -e BENCHMARKOOR_GLOBAL_CPU_SYSFS_PATH=/host_sys_cpu"
197202
DOCKER_CMD="$DOCKER_CMD -e BENCHMARKOOR_BENCHMARK_RESULTS_DIR=/app/results"
198203
DOCKER_CMD="$DOCKER_CMD -e BENCHMARKOOR_BENCHMARK_RESULTS_OWNER=$(id -u):$(id -g)"
199-
DOCKER_CMD="$DOCKER_CMD -e BENCHMARKOOR_GLOBAL_DIRECTORIES_TMP_DATADIR=/tmp"
200-
DOCKER_CMD="$DOCKER_CMD -e BENCHMARKOOR_GLOBAL_DIRECTORIES_TMP_CACHEDIR=/tmp/benchmarkoor-cache"
204+
DOCKER_CMD="$DOCKER_CMD -e BENCHMARKOOR_GLOBAL_DIRECTORIES_TMP_DATADIR=${{ inputs.tmp-dir }}"
205+
DOCKER_CMD="$DOCKER_CMD -e BENCHMARKOOR_GLOBAL_DIRECTORIES_TMP_CACHEDIR=${{ inputs.tmp-dir }}/benchmarkoor-cache"
201206
202207
# Add rshared mounts for datadir filesystem mount points (ZFS/overlayfs)
203208
if [ -n "$DATADIR_MOUNT_POINTS" ]; then

0 commit comments

Comments
 (0)