diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 01c931105..c9b5336d1 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -21,6 +21,7 @@ steps: - "KomaMRIBase/Project.toml" - "benchmarks/**/*" - ".buildkite/**/*" + - ".github/workflows/Benchmark.yml" - "Project.toml" config: command: "buildkite-agent pipeline upload .buildkite/runbenchmarks.yml" diff --git a/.github/workflows/Benchmark.yml b/.github/workflows/Benchmark.yml index ef9074d5d..e6cff8f97 100644 --- a/.github/workflows/Benchmark.yml +++ b/.github/workflows/Benchmark.yml @@ -32,7 +32,7 @@ on: jobs: benchmark: - if: "!contains(github.event.head_commit.message, '[skip benchmarks]')" + if: ${{ !contains(github.event.head_commit.message, '[skip benchmarks]') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -58,7 +58,7 @@ jobs: tool: 'julia' output-file-path: ${{ steps.locate.outputs.path }} benchmark-data-dir-path: "benchmarks" - summary-always: true + summary-always: true # I think this doesn't work on PRs github-token: ${{ secrets.GITHUB_TOKEN }} comment-always: true alert-threshold: "150%" diff --git a/KomaMRIBase/src/datatypes/Sequence.jl b/KomaMRIBase/src/datatypes/Sequence.jl index 1c192c6e0..febad1c86 100644 --- a/KomaMRIBase/src/datatypes/Sequence.jl +++ b/KomaMRIBase/src/datatypes/Sequence.jl @@ -314,10 +314,10 @@ function get_samples(seq::Sequence, range; events=[:rf, :gr, :adc], freq_in_phas fill_if_empty(x) = isempty(x.t) && length(range) == length(seq) ? merge(x, (t=[0.0; dur(seq)], A=zeros(eltype(x.A), 2))) : x # RF if :rf in events - t_rf = reduce(vcat, T0[i] .+ times(seq.RF[1,i], :A) for i in range) - t_Δf = reduce(vcat, T0[i] .+ times(seq.RF[1,i], :Δf) for i in range) - A_rf = reduce(vcat, ampls(seq.RF[1,i]; freq_in_phase) for i in range) - A_Δf = reduce(vcat, freqs(seq.RF[1,i]) for i in range) + t_rf = reduce(vcat, [T0[i] .+ times(seq.RF[1,i], :A) for i in range]) + t_Δf = reduce(vcat, [T0[i] .+ times(seq.RF[1,i], :Δf) for i in range]) + A_rf = reduce(vcat, [ampls(seq.RF[1,i]; freq_in_phase) for i in range]) + A_Δf = reduce(vcat, [freqs(seq.RF[1,i]) for i in range]) rf_samples = ( rf = fill_if_empty((t = t_rf, A = A_rf)), Δf = fill_if_empty((t = t_Δf, A = A_Δf)) @@ -325,12 +325,12 @@ function get_samples(seq::Sequence, range; events=[:rf, :gr, :adc], freq_in_phas end # Gradients if :gr in events - t_gx = reduce(vcat, T0[i] .+ times(seq.GR[1,i]) for i in range) - t_gy = reduce(vcat, T0[i] .+ times(seq.GR[2,i]) for i in range) - t_gz = reduce(vcat, T0[i] .+ times(seq.GR[3,i]) for i in range) - A_gx = reduce(vcat, ampls(seq.GR[1,i]) for i in range) - A_gy = reduce(vcat, ampls(seq.GR[2,i]) for i in range) - A_gz = reduce(vcat, ampls(seq.GR[3,i]) for i in range) + t_gx = reduce(vcat, [T0[i] .+ times(seq.GR[1,i]) for i in range]) + t_gy = reduce(vcat, [T0[i] .+ times(seq.GR[2,i]) for i in range]) + t_gz = reduce(vcat, [T0[i] .+ times(seq.GR[3,i]) for i in range]) + A_gx = reduce(vcat, [ampls(seq.GR[1,i]) for i in range]) + A_gy = reduce(vcat, [ampls(seq.GR[2,i]) for i in range]) + A_gz = reduce(vcat, [ampls(seq.GR[3,i]) for i in range]) gr_samples = ( gx = fill_if_empty((t = t_gx, A = A_gx)), gy = fill_if_empty((t = t_gy, A = A_gy)), @@ -339,8 +339,8 @@ function get_samples(seq::Sequence, range; events=[:rf, :gr, :adc], freq_in_phas end # ADC if :adc in events - t_aq = reduce(vcat, T0[i] .+ times(seq.ADC[i]) for i in range) - A_aq = reduce(vcat, ampls(seq.ADC[i]) for i in range) + t_aq = reduce(vcat, [T0[i] .+ times(seq.ADC[i]) for i in range]) + A_aq = reduce(vcat, [ampls(seq.ADC[i]) for i in range]) adc_samples = ( adc = fill_if_empty((t = t_aq, A = A_aq)), )