From 4371227074a10524cfdf81d852fb6c3fddd7c07b Mon Sep 17 00:00:00 2001 From: Oliver Schulz Date: Wed, 18 Jun 2025 23:24:52 +0200 Subject: [PATCH 1/3] Update CI --- .github/workflows/CompatHelper.yml | 13 ++++++++++ .github/workflows/DocPreviewCleanup.yml | 33 +++++++++++++++++++++++++ .github/workflows/TagBot.yml | 16 ++++++++++++ .github/workflows/ci.yml | 21 +++++++--------- 4 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/DocPreviewCleanup.yml diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index d94b38d..8ad0284 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -3,10 +3,23 @@ on: schedule: - cron: 0 0 * * * workflow_dispatch: +permissions: + contents: write + pull-requests: write jobs: CompatHelper: runs-on: ubuntu-latest steps: + - name: Check if Julia is already available in the PATH + id: julia_in_path + run: which julia + continue-on-error: true + - name: Install Julia, but only if it is not already available in the PATH + uses: julia-actions/setup-julia@v2 + with: + version: '1' + arch: ${{ runner.arch }} + if: steps.julia_in_path.outcome != 'success' - name: "Add the General registry via Git" run: | import Pkg diff --git a/.github/workflows/DocPreviewCleanup.yml b/.github/workflows/DocPreviewCleanup.yml new file mode 100644 index 0000000..5be23b9 --- /dev/null +++ b/.github/workflows/DocPreviewCleanup.yml @@ -0,0 +1,33 @@ +name: Doc Preview Cleanup + +on: + pull_request: + types: [closed] + +# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time +concurrency: + group: doc-preview-cleanup + cancel-in-progress: false + +jobs: + doc-preview-cleanup: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v4 + with: + ref: gh-pages + - name: Delete preview and history + push changes + run: | + if [ -d "${preview_dir}" ]; then + git config user.name "Documenter.jl" + git config user.email "documenter@juliadocs.github.io" + git rm -rf "${preview_dir}" + git commit -m "delete preview" + git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + git push --force origin gh-pages-new:gh-pages + fi + env: + preview_dir: previews/PR${{ github.event.number }} diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..0cd3114 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,22 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: "3" +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2964078..d347da3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ on: tags: '*' pull_request: release: + workflow_dispatch: concurrency: # Skip intermediate builds: always. @@ -27,7 +28,7 @@ jobs: version: - '1.6' - '1' - - 'nightly' + - 'pre' os: - ubuntu-latest arch: @@ -38,43 +39,39 @@ jobs: arch: x86 - version: 1 os: macOS-latest - arch: x64 + arch: arm64 - version: 1 os: windows-latest arch: x64 steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v1 + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - env: - PYTHON: 'Conda' - uses: julia-actions/julia-runtest@v1 with: coverage: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64' }} - uses: julia-actions/julia-processcoverage@v1 if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64' - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64' with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - file: lcov.info + files: lcov.info docs: name: Documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@v2 with: version: '1' - - uses: julia-actions/cache@v1 + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - env: - PYTHON: 'Conda' - uses: julia-actions/julia-docdeploy@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c031f5d649ee0ce5a73787a804e4b7ce06226195 Mon Sep 17 00:00:00 2001 From: Oliver Schulz Date: Wed, 18 Jun 2025 22:35:56 +0200 Subject: [PATCH 2/3] Fix indexing VectorOfArrays with logical indices --- src/vector_of_arrays.jl | 9 +++++++-- test/vector_of_arrays.jl | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/vector_of_arrays.jl b/src/vector_of_arrays.jl index 57ba3ae..645a9e2 100644 --- a/src/vector_of_arrays.jl +++ b/src/vector_of_arrays.jl @@ -212,8 +212,13 @@ Base.@propagate_inbounds function Base._getindex(l::IndexStyle, A::VectorOfArray end -Base.@propagate_inbounds function Base._getindex(l::IndexStyle, A::VectorOfArrays, idxs::AbstractVector{<:Integer}) - @boundscheck checkbounds(A, idxs) +@inline _explicit_idxs(::AbstractVector, idxs::AbstractVector{<:Integer}) = idxs +@inline _explicit_idxs(eachidx::AbstractVector, idxs::Base.LogicalIndex) = eachidx[idxs] + +Base.@propagate_inbounds function Base._getindex(l::IndexStyle, A::VectorOfArrays, raw_idxs::AbstractVector{<:Integer}) + @boundscheck checkbounds(A, raw_idxs) + + idxs = _explicit_idxs(eachindex(A), raw_idxs) A_ep = A.elem_ptr A_data = A.data diff --git a/test/vector_of_arrays.jl b/test/vector_of_arrays.jl index 5e24ac2..8ea4d00 100644 --- a/test/vector_of_arrays.jl +++ b/test/vector_of_arrays.jl @@ -168,6 +168,10 @@ using ArraysOfArrays: full_consistency_checks, append_elemptr!, element_ptr @test @inferred(element_ptr(V12)) == V12.elem_ptr + boolidxs = rand(Bool, length(V1)) + @test @inferred(V1[boolidxs]) == V1[eachindex(V1)[boolidxs]] + + ## _view_reshape_spec not yet implemented ## # V1_copy = copy(V1) # V2_copy = copy(V2) From b84f2a3a888d5dc3860d5734efaeec0fcceb50a8 Mon Sep 17 00:00:00 2001 From: Oliver Schulz Date: Wed, 18 Jun 2025 22:41:39 +0200 Subject: [PATCH 3/3] Increase package version to 0.6.6 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 1ab7ca0..848cd29 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ArraysOfArrays" uuid = "65a8f2f4-9b39-5baf-92e2-a9cc46fdf018" -version = "0.6.5" +version = "0.6.6" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"