diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43551fe..e3f74bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,16 +27,34 @@ jobs: os: [ubuntu-latest, windows-latest, macOS-latest] steps: - uses: actions/checkout@v4 + # - name: "Set up Julia" - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.version }} + + - name: Cache artifacts + uses: actions/cache@v4 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + # - name: "Unit Test" - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest + # - name: "Cover" - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v5 if: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' }} with: file: lcov.info + fail_ci_if_error: false + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/src/backproject.jl b/src/backproject.jl index c02613d..8052348 100644 --- a/src/backproject.jl +++ b/src/backproject.jl @@ -23,7 +23,7 @@ function backproject!( plan.planrot[thid], ) - end + end # COV_EXCL_LINE # adjoint of convolving img with psf and applying attenuation map Threads.@threads for y in 1:plan.imgsize[2] # 1:ny @@ -45,7 +45,7 @@ function backproject!( ) mul3dj!(plan.imgr, plan.exp_mumapr[thid], y) - end + end # COV_EXCL_LINE # adjoint of rotating image Threads.@threads for z in 1:plan.imgsize[3] # 1:nz @@ -56,7 +56,7 @@ function backproject!( plan.viewangle[viewidx], plan.planrot[thid], ) - end + end # COV_EXCL_LINE return image end @@ -142,7 +142,7 @@ function backproject!( Threads.@threads for (i, viewidx) in collect(enumerate(index)) thid = Threads.threadid() backproject!(plan.add_img[thid], (@view views[:, :, i]), plan, thid, viewidx) - end + end # COV_EXCL_LINE for i in 1:plan.nthread broadcast!(+, image, image, plan.add_img[i]) diff --git a/src/project.jl b/src/project.jl index 0a0bc31..97095fc 100644 --- a/src/project.jl +++ b/src/project.jl @@ -31,7 +31,7 @@ function project!( plan.viewangle[viewidx], plan.planrot[thid], ) - end + end # COV_EXCL_LINE Threads.@threads for y in 1:plan.imgsize[2] # 1:ny thid = Threads.threadid() # thread id @@ -55,7 +55,7 @@ function project!( (@view plan.psfs[:, :, y, viewidx]), plan.planpsf[thid], ) - end + end # COV_EXCL_LINE copy3dj!(view, plan.add_img, 1) # initialize accumulator for y in 2:plan.imgsize[2] # accumulate to get total view @@ -151,7 +151,7 @@ function project!( Threads.@threads for (i, viewidx) in collect(enumerate(index)) thid = Threads.threadid() project!((@view views[:,:,i]), image, plan, thid, viewidx) - end + end # COV_EXCL_LINE else for (i, viewidx) in collect(enumerate(index)) project!((@view views[:,:,i]), image, plan, viewidx) diff --git a/src/rotatez.jl b/src/rotatez.jl index 8ff5495..ee9aad1 100644 --- a/src/rotatez.jl +++ b/src/rotatez.jl @@ -520,7 +520,7 @@ function _imrotate!( θ, plans[id], ) - end + end # COV_EXCL_LINE return output end