diff --git a/ci/cscs.yml b/ci/cscs.yml index 6ef56ea..792af75 100644 --- a/ci/cscs.yml +++ b/ci/cscs.yml @@ -82,18 +82,8 @@ run_tests: script: - . /opt/gridtools_jl_env/setup-env.sh - cd /opt/GridTools - - julia -e 'using Pkg; Pkg.add("AirspeedVelocity"); Pkg.build("AirspeedVelocity")' - - export PATH="\$PATH:\$HOME/.julia/bin" - - echo "Updated PATH: \$PATH" - - julia --project=. -e 'using Pkg; Pkg.test()' - - mkdir -p results - - git fetch origin main:refs/remotes/origin/main - - CURRENT_COMMIT=$(git rev-parse HEAD) - - LAST_MAIN_COMMIT=$(git rev-parse origin/main) - - echo "Benchmarking current commit (\$CURRENT_COMMIT) in the current branch and (\$LAST_MAIN_COMMIT) in the main branch" - - benchpkg --rev="\$LAST_MAIN_COMMIT,\$CURRENT_COMMIT" --bench-on="\$CURRENT_COMMIT" --output-dir=results/ - - echo "Creating benchmark table comparing current commit (\$CURRENT_COMMIT) against (\$LAST_MAIN_COMMIT) in the main branch" - - benchpkgtable --rev="\$LAST_MAIN_COMMIT,\$CURRENT_COMMIT" --input-dir=results/ --ratio + - chmod +x ci/run_airspeedvelocity.sh + - ./ci/run_airspeedvelocity.sh variables: SLURM_JOB_NUM_NODES: 1 SLURM_NTASKS: 1 diff --git a/ci/run_airspeedvelocity.sh b/ci/run_airspeedvelocity.sh new file mode 100644 index 0000000..63d6d0f --- /dev/null +++ b/ci/run_airspeedvelocity.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Install and build the AirspeedVelocity package in Julia +echo "Installing and building AirspeedVelocity..." +julia -e 'using Pkg; Pkg.add("AirspeedVelocity"); Pkg.build("AirspeedVelocity")' + +# Update the PATH to include the Julia binary directory +export PATH="$PATH:$HOME/.julia/bin" + +# Optional: Print the updated PATH +echo "Updated PATH: $PATH" + +# Create results directory +mkdir -p results + +# Fetch the latest main branch +echo "Fetching the latest main branch..." +git fetch origin main:refs/remotes/origin/main + +# Get the current commit and the last main commit +CURRENT_COMMIT=$(git rev-parse HEAD) +LAST_MAIN_COMMIT=$(git rev-parse origin/main) + +# Benchmark the current commit against the last main commit +echo "Benchmarking current commit ($CURRENT_COMMIT) in the current branch and ($LAST_MAIN_COMMIT) in the main branch..." +benchpkg --rev="$LAST_MAIN_COMMIT,$CURRENT_COMMIT" --bench-on="$CURRENT_COMMIT" --output-dir=results/ + +# Create a benchmark table comparing the current commit against the last main commit +echo "Creating benchmark table comparing current commit ($CURRENT_COMMIT) against ($LAST_MAIN_COMMIT) in the main branch..." +benchpkgtable --rev="$LAST_MAIN_COMMIT,$CURRENT_COMMIT" --input-dir=results/ --ratio