This is an automated email from the ASF dual-hosted git repository. leerho pushed a commit to branch cherry-pick_main_to_7.0.X in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
commit 0c835d65ffe30e3411f35998218632c5cedaef4a Author: Lee Rhodes <[email protected]> AuthorDate: Tue Jun 9 11:29:04 2026 -0700 Backport recent main updates to 7.0.X --- .github/dependabot.yml | 24 +++++++++++ .github/workflows/stageReleaseSources.yml | 47 ++++++++++++++++++++++ .../internal/AllocateDirectMapMemoryTest.java | 6 +++ .../AllocateDirectWritableMapMemoryTest.java | 6 +++ 4 files changed, 83 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..af1ee89f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + # Check the default branch (main) + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + + # Check the 'workflows' branch + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "workflows" + schedule: + interval: "monthly" + + # Check the '7.0.X' branch + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "7.0.X" + schedule: + interval: "monthly" diff --git a/.github/workflows/stageReleaseSources.yml b/.github/workflows/stageReleaseSources.yml index ed3e3588..8f6bbeb4 100644 --- a/.github/workflows/stageReleaseSources.yml +++ b/.github/workflows/stageReleaseSources.yml @@ -94,3 +94,50 @@ jobs: name: datasketches-memory-release-source-bundle path: staging_dir/ retention-days: 15 + + test-source-candidate: + name: Test Source Candidate on ${{ matrix.os }} + needs: assemble-source-candidate + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + # 1. Download the zipped artifact uploaded by the previous job + - name: Download Source ZIP Artifact + uses: actions/download-artifact@v4 + with: + name: datasketches-memory-release-source-bundle + path: downloaded-bundle + + # 2. Extract the source distribution + - name: Extract Source Distribution + shell: bash + run: | + # The downloaded artifact folder contains the zip file + ZIP_FILE=$(ls downloaded-bundle/*.zip) + echo "Unzipping $ZIP_FILE..." + unzip -q $ZIP_FILE -d test-workspace + + # 3. Setup Java Toolchain (11, 17, and 21) + - name: Setup Java Toolchains + uses: actions/setup-java@v5 + with: + java-version: | + 11 + 17 + 21 + distribution: 'temurin' + + # 4. Run the tests on the unzipped sources + - name: Execute Tests + shell: bash + run: | + # Enter the unzipped directory (which will be named datasketches-memory-X.Y.Z-src) + cd test-workspace/* + echo "Running tests in $(pwd)" + + # Run the standard test phase (this validates line-endings, missing files, and fallbacks!) + mvn clean test diff --git a/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java b/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java index 4a67b946..5a9b1e3d 100644 --- a/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java +++ b/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java @@ -29,11 +29,13 @@ import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; import org.apache.datasketches.memory.Memory; +import org.testng.SkipException; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class AllocateDirectMapMemoryTest { private static final String LS = System.getProperty("line.separator"); + private static final boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase().contains("windows"); private File gettyFile; private long gettySize; @@ -116,6 +118,10 @@ public class AllocateDirectMapMemoryTest { @Test public void testLoad() throws IOException { + if (IS_WINDOWS) { + throw new SkipException("isLoaded() is unreliable on Windows VMM; skipping test."); + } + long memCapacity = gettySize; try (Memory mem = Memory.map(gettyFile, 0, memCapacity, ByteOrder.nativeOrder())) { mem.load(); diff --git a/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java b/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java index 59807b6d..b6b213f0 100644 --- a/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java +++ b/datasketches-memory-java11/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java @@ -34,11 +34,13 @@ import java.nio.ByteOrder; import org.apache.datasketches.memory.Memory; import org.apache.datasketches.memory.ReadOnlyException; import org.apache.datasketches.memory.WritableMemory; +import org.testng.SkipException; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class AllocateDirectWritableMapMemoryTest { private static final String LS = System.getProperty("line.separator"); + private static final boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase().contains("windows"); private File gettyFile; @BeforeClass @@ -140,6 +142,10 @@ public class AllocateDirectWritableMapMemoryTest { @Test public void testForce() throws Exception { + if (IS_WINDOWS) { + throw new SkipException("isLoaded() is unreliable on Windows VMM; skipping test."); + } + String origStr = "Corectng spellng mistks"; File origFile = createFile("force_original.txt", origStr); //23 assertTrue(origFile.setWritable(true, false)); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
