Skip to content

Commit c1d7f12

Browse files
authored
Merge pull request #155 from VirtualPlantLab/airspeedvelocity_CI_benchmarks
AirSpeedVelocity.jl benchmarks Might need to handle naming conflicts with the previous benchmark action.
2 parents af10d28 + cb349c5 commit c1d7f12

8 files changed

Lines changed: 44 additions & 85 deletions

File tree

.github/workflows/Benchmarks.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Benchmarks
2+
on:
3+
pull_request_target:
4+
branches: [main]
5+
workflow_dispatch:
6+
permissions:
7+
pull-requests: write
8+
jobs:
9+
bench:
10+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
11+
runs-on: ${{ matrix.os }}
12+
timeout-minutes: 60
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
version:
17+
- "1"
18+
os:
19+
- ubuntu-latest
20+
- macOS-latest
21+
- windows-latest
22+
arch:
23+
- x64
24+
steps:
25+
- uses: MilesCranmer/AirspeedVelocity.jl@action-v1
26+
with:
27+
julia-version: ${{ matrix.version }}
28+
bench-on: ${{ github.event.pull_request.head.sha }}

.github/workflows/benchmarks_and_downstream.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
docs/Manifest.toml
77
test/Manifest.toml
88
docs/build/
9-
test/downstream/Manifest.toml
9+
benchmark/Manifest.toml
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using Pkg
22
Pkg.activate(dirname(@__FILE__))
3-
Pkg.develop(PackageSpec(path=dirname(dirname(@__DIR__))))
4-
Pkg.add(url="https://github.com/VEZY/PlantBiophysics.jl", rev="dev")
5-
Pkg.add(url="https://github.com/PalmStudio/XPalm.jl", rev="dev")
3+
#Pkg.develop(PackageSpec(path=dirname(dirname(@__DIR__))))
4+
Pkg.add(url="https://github.com/VEZY/PlantBiophysics.jl", rev="master")
5+
Pkg.add(url="https://github.com/PalmStudio/XPalm.jl", rev="main")
66
Pkg.resolve()
77
Pkg.instantiate()
88

@@ -24,31 +24,31 @@ elseif Sys.isapple()
2424
elseif Sys.islinux()
2525
suite_name = suite_name * "linux"
2626
end
27-
suite = BenchmarkGroup()
28-
suite[suite_name] = BenchmarkGroup(["PSE", "PBP", "XPalm"])
27+
const SUITE = BenchmarkGroup()
28+
SUITE[suite_name] = BenchmarkGroup(["PSE", "PBP", "XPalm"])
2929

3030
# "PSE benchmark"
3131
include("test-PSE-benchmark.jl")
32-
suite[suite_name]["PSE"] = @benchmarkable do_benchmark_on_heavier_mtg()
32+
SUITE[suite_name]["PSE"] = @benchmarkable do_benchmark_on_heavier_mtg()
3333

3434
# "PBP benchmark"
3535
include("test-plantbiophysics.jl")
36-
suite[suite_name]["PBP"] = @benchmarkable benchmark_plantbiophysics()
36+
SUITE[suite_name]["PBP"] = @benchmarkable benchmark_plantbiophysics()
3737

3838
leaf, meteo = setup_benchmark_plantbiophysics_multitimestep()
39-
suite[suite_name]["PBP_multiple_timesteps_MT"] = @benchmarkable benchmark_plantbiophysics_multitimestep_MT($leaf, $meteo)
40-
suite[suite_name]["PBP_multiple_timesteps_ST"] = @benchmarkable benchmark_plantbiophysics_multitimestep_ST($leaf, $meteo)
39+
SUITE[suite_name]["PBP_multiple_timesteps_MT"] = @benchmarkable benchmark_plantbiophysics_multitimestep_MT($leaf, $meteo)
40+
SUITE[suite_name]["PBP_multiple_timesteps_ST"] = @benchmarkable benchmark_plantbiophysics_multitimestep_ST($leaf, $meteo)
4141

4242
# "XPalm benchmark"
4343
include("test-xpalm.jl")
44-
suite[suite_name]["XPalm_setup"] = @benchmarkable xpalm_default_param_create() seconds = 120
44+
SUITE[suite_name]["XPalm_setup"] = @benchmarkable xpalm_default_param_create() seconds = 120
4545

4646
palm, models, out_vars, meteo = xpalm_default_param_create()
4747
sim_outputs = xpalm_default_param_run(palm, models, out_vars, meteo)
4848

49-
suite[suite_name]["XPalm_run"] = @benchmarkable xpalm_default_param_run($palm, $models, $out_vars, $meteo) seconds = 120
50-
suite[suite_name]["XPalm_convert_outputs"] = @benchmarkable xpalm_default_param_convert_outputs($sim_outputs) seconds = 120
49+
SUITE[suite_name]["XPalm_run"] = @benchmarkable xpalm_default_param_run($palm, $models, $out_vars, $meteo) seconds = 120
50+
SUITE[suite_name]["XPalm_convert_outputs"] = @benchmarkable xpalm_default_param_convert_outputs($sim_outputs) seconds = 120
5151

52-
tune!(suite)
53-
results = run(suite, verbose=true)
54-
BenchmarkTools.save(dirname(@__FILE__) * "/output.json", median(results))
52+
#tune!(SUITE)
53+
#results = run(SUITE, verbose=true)
54+
#BenchmarkTools.save(dirname(@__FILE__) * "/output.json", median(results))

0 commit comments

Comments
 (0)