From 5c0afc97b9d7fd4444d3bdaa53770703246eb722 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 9 Feb 2024 12:41:18 +0200 Subject: [PATCH] Use sudo --- .github/workflows/bench.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index eb79fed1e0..15c9696826 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -48,23 +48,23 @@ jobs: - name: Prepare machine run: | # Disable turboboost - echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo + echo 1 > sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo # Disable hyperthreading - echo off > /sys/devices/system/cpu/smt/control + echo off > sudo tee /sys/devices/system/cpu/smt/control # Use performance governor - cpupower frequency-set -g performance + sudo cpupower frequency-set -g performance - name: Benchmark - run: nice -n -10 taskset -c 0 cargo +$TOOLCHAIN bench --features ci,bench | tee output.txt + run: sudo nice -n -10 taskset -c 0 cargo +$TOOLCHAIN bench --features ci,bench | tee output.txt - name: Restore machine run: | # Enable turboboost - echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo + echo 0 > sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo # Enable hyperthreading - echo on > /sys/devices/system/cpu/smt/control + echo on > sudo tee /sys/devices/system/cpu/smt/control # Use powersave governor - cpupower frequency-set -g powersave + sudo cpupower frequency-set -g powersave - name: Download previous benchmark results uses: actions/cache@v4