Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Build Release Assets

on:
workflow_dispatch:
inputs:
upload_tag:
description: 'Optional: Release tag to upload to'
required: false
default: ''
type: string
release:
types: [created]

jobs:
build:
name: Build ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- runner: macos-latest
os: macos
arch: x86_64
- runner: macos-latest
os: macos
arch: aarch64
- runner: ubuntu-latest
os: linux
arch: x86_64
xvfb: true
- runner: ubuntu-24.04-arm
os: linux
arch: aarch64
xvfb: true
- runner: windows-latest
os: windows
arch: x86_64

steps:
- uses: actions/checkout@v4

- name: Remove System32 OpenSSL DLLs (Windows)
if: runner.os == 'Windows'
run: |
$system32 = "C:\Windows\System32"

foreach ($dll in @("libcrypto-3-x64.dll", "libssl-3-x64.dll")) {
$path = Join-Path $system32 $dll
if (Test-Path $path) {
Remove-Item -Path $path -Force
Write-Host "Removed $dll from System32"
} else {
Write-Host "$dll not found in System32"
}
}
shell: pwsh

- uses: julia-actions/setup-julia@v2
with:
version: '1.11'

- uses: julia-actions/cache@v1

- name: Install dependencies
run: julia --project=meta -e 'using Pkg; Pkg.instantiate()'

- name: Build
env:
MACOS_PFX_PASSWORD: ${{ secrets.MACOS_PFX_PASSWORD }}
WINDOWS_PFX_PASSWORD: ${{ secrets.WINDOWS_PFX_PASSWORD }}
run: |
${{ matrix.xvfb && 'xvfb-run -s ''-screen 0 1024x768x24''' || '' }} julia --project=meta meta/build.jl --target-platform=${{ matrix.os }} --target-arch=${{ matrix.arch }} --build-dir=build

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
path: build/*
retention-days: 1

upload:
name: Upload to release
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release' || github.event.inputs.upload_tag != ''

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
path: ./artifacts

- name: Upload to release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG_NAME="${{ github.event.inputs.upload_tag || github.event.release.tag_name }}"
echo "Uploading to release: $TAG_NAME"

find artifacts/ -type f | while read -r file; do
echo "Uploading: $file"
gh release upload "$TAG_NAME" "$file"
done

echo "All artifacts uploaded successfully!"
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ examples/5.koma_paper/mrf/**/*.mrd
examples/5.koma_paper/comparison_accuracy/**/*.mat
examples/5.koma_paper/comparison_accuracy/**/*.h5
!examples/5.koma_paper/Manifest.toml
*_w.phantom
*_w.phantom
!/meta/**/deps/
!/meta/patches/WebIO/deps/bundlepaths.jl
!meta/Manifest.toml
!Manifest.toml
6 changes: 3 additions & 3 deletions KomaMRIBase/src/datatypes/Phantom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function brain_phantom2D(; axis="axial", ss=4, us=1, tissue_properties = Dict())
ssx, ssy, ssz, usx, usy, usz = check_phantom_arguments(2, ss, us)

# Get data from .mat file
path = @__DIR__
path = joinpath(Base.pkgdir(@__MODULE__), "src/datatypes")
data = MAT.matread(path * "/phantom/brain2D.mat")

# subsample or upsample the phantom data
Expand Down Expand Up @@ -336,7 +336,7 @@ function brain_phantom3D(; ss=4, us=1, start_end=[160, 200], tissue_properties=D
# check and filter input
ssx, ssy, ssz, usx, usy, usz = check_phantom_arguments(3, ss, us)
# Get data from .mat file
path = @__DIR__
path = joinpath(Base.pkgdir(@__MODULE__), "src/datatypes")
data = MAT.matread(path * "/phantom/brain3D.mat")

# subsample or upsample the phantom data
Expand Down Expand Up @@ -405,7 +405,7 @@ function pelvis_phantom2D(; ss=4, us=1)
ssx, ssy, ssz, usx, usy, usz = check_phantom_arguments(2, ss, us)

# Get data from .mat file
path = @__DIR__
path = joinpath(Base.pkgdir(@__MODULE__), "src/datatypes")
data = MAT.matread(path * "/phantom/pelvis2D.mat")

# subsample or upsample the phantom data
Expand Down
3 changes: 2 additions & 1 deletion KomaMRIPlots/src/ui/DisplayFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,8 @@ function plot_phantom_map(
@warn "For performance reasons, the number of displayed spins was capped to `max_spins`=$(max_spins)."
end

path = @__DIR__
#path = @__DIR__
path = joinpath(Base.pkgdir(@__MODULE__), "src/ui")
cmin_key = minimum(getproperty(obj, key))
cmax_key = maximum(getproperty(obj, key))
if key == :T1 || key == :T2 || key == :T2s
Expand Down
Loading