From b6258ca7a6dbbde16f72e5cbcc9b041f6fda7892 Mon Sep 17 00:00:00 2001 From: Carlos Roman Date: Fri, 1 May 2026 14:29:55 +0100 Subject: [PATCH 1/5] Migrate CI from CircleCI to GitHub Actions Replaces .circleci/config.yml with .github/workflows/ci.yml, preserving the same test matrix: Java 7/8/11/13/17 on Linux, Java 12 on Windows, and dedicated jobs for jnr-exclude and jnr-latest profiles. Adds Maven dependency caching as a free improvement over the previous setup. Co-Authored-By: Claude Sonnet 4.6 --- .circleci/Dockerfile-openjdk7 | 3 -- .circleci/config.yml | 91 ----------------------------------- .github/workflows/ci.yml | 64 ++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 94 deletions(-) delete mode 100644 .circleci/Dockerfile-openjdk7 delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml diff --git a/.circleci/Dockerfile-openjdk7 b/.circleci/Dockerfile-openjdk7 deleted file mode 100644 index aab0800d..00000000 --- a/.circleci/Dockerfile-openjdk7 +++ /dev/null @@ -1,3 +0,0 @@ -FROM openjdk:7-jdk - -RUN apt update && apt install -y maven diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index fbe8249b..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,91 +0,0 @@ -version: 2.1 - -orbs: - win: circleci/windows@2.4.1 - -commands: - create_custom_cache_lock: - description: "Create custom cache lock for java version." - parameters: - filename: - type: string - steps: - - run: - name: Grab java version and dump to file - command: java -version > << parameters.filename >> - -default_steps: &default_steps - steps: - - checkout - - - run: | - mvn clean install - - run: cd dogstatsd-http-core && mvn clean install - -jobs: - openjdk7: - docker: - - image: jfullaondo/openjdk:7 - <<: *default_steps - openjdk8: - docker: &jdk8 - - image: cimg/openjdk:8.0 - <<: *default_steps - openjdk11: - docker: - - image: cimg/openjdk:11.0 - <<: *default_steps - openjdk13: - docker: - - image: cimg/openjdk:13.0 - <<: *default_steps - openjdk17: - docker: - - image: cimg/openjdk:17.0 - <<: *default_steps - -## Fails with "Source option 7 is no longer supported. Use 8 or later." -# openjdk21: -# docker: -# - image: cimg/openjdk:21.0 -# <<: *default_steps - - windows-openjdk12: - executor: - # https://github.com/CircleCI-Public/windows-orb/blob/v2.4.1/src/executors/default.yml - name: win/default - # https://circleci.com/developer/machine/image/windows-server-2019 - version: 2023.04.1 - steps: - - checkout - - run: java -version - - run: | - choco install maven - - run: | - mvn clean install - - openjdk8-jnr-exclude: - docker: *jdk8 - steps: - - checkout - - run: "mvn -Pjnr-exclude clean test" - openjdk8-jnr-latest: - docker: *jdk8 - steps: - - checkout - - run: "mvn clean test -DskipTests" # build main and test with default deps - - run: "mvn -Pjnr-latest test" # run with modified deps - -workflows: - version: 2 - agent-tests: - jobs: - - openjdk7 - - openjdk8 - - openjdk11 - - openjdk13 - - openjdk17 -# - openjdk21 - - windows-openjdk12 - - openjdk8-jnr-exclude - - openjdk8-jnr-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..56bb936f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,64 @@ +name: CI + +on: + push: + pull_request: + +jobs: + test: + name: Test (Java ${{ matrix.java-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + java-version: ['7', '8', '11', '13', '17'] + include: + - os: windows-latest + java-version: '12' + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java-version }} + distribution: zulu + cache: maven + - name: Build and test + run: mvn clean install + - name: Build and test dogstatsd-http-core + run: mvn clean install + working-directory: dogstatsd-http-core + + test-jnr-exclude: + name: Test (Java 8, jnr-exclude) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '8' + distribution: zulu + cache: maven + - name: Build and test (jnr-exclude) + run: mvn clean test -P jnr-exclude + - name: Build and test dogstatsd-http-core + run: mvn clean install + working-directory: dogstatsd-http-core + + test-jnr-latest: + name: Test (Java 8, jnr-latest) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '8' + distribution: zulu + cache: maven + - name: Build with default dependencies + run: mvn clean install + - name: Test with latest jnr dependencies + run: mvn test -P jnr-latest + - name: Build and test dogstatsd-http-core + run: mvn clean install + working-directory: dogstatsd-http-core From a773b232a157510ddca07150fe25ffd91ca4325b Mon Sep 17 00:00:00 2001 From: Carlos Roman Date: Fri, 1 May 2026 15:09:16 +0100 Subject: [PATCH 2/5] Pin GitHub Actions to full commit SHAs Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56bb936f..ba649836 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,8 @@ jobs: - os: windows-latest java-version: '12' steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: java-version: ${{ matrix.java-version }} distribution: zulu @@ -33,8 +33,8 @@ jobs: name: Test (Java 8, jnr-exclude) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: java-version: '8' distribution: zulu @@ -49,8 +49,8 @@ jobs: name: Test (Java 8, jnr-latest) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: java-version: '8' distribution: zulu From 6d1c31826a82d818321be30f3d3d2aff4c93028e Mon Sep 17 00:00:00 2001 From: Vikentiy Fesunov Date: Fri, 8 May 2026 12:54:31 +0200 Subject: [PATCH 3/5] Drop build support for Java 1.7 and 1.8 Keep producing 1.7 artifacts, but use a more modern compiler to do so. We used to rely on source/target flags to support an earlier version of Java, but had to run 1.7 in CI to verify we didn't accidentally use newer APIs. While Java 1.7 is available in GH actions, maven doesn't quite work. With Java 9 we can use release flag instead of source/target, which also checks that we only use classes compatible with 1.7 classpath, so we don't have to run maven 1.7 in CI. --- .github/workflows/ci.yml | 2 +- .gitlab-ci.yml | 2 +- pom.xml | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba649836..e5879b12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - java-version: ['7', '8', '11', '13', '17'] + java-version: ['9', '11', '13', '17'] include: - os: windows-latest java-version: '12' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8672764c..437f07f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ deploy_to_sonatype: tags: - "docker-in-docker:amd64" - image: maven:3.9-eclipse-temurin-8 + image: maven:3.9-eclipse-temurin-17 script: # Ensure we don't print commands being run to the logs during credential diff --git a/pom.xml b/pom.xml index fbea7216..60b136f5 100644 --- a/pom.xml +++ b/pom.xml @@ -347,7 +347,7 @@ - [1.7.0-0,1.9.0-0),[9.0,18.0-0) + [9.0,18.0-0) @@ -372,8 +372,7 @@ maven-compiler-plugin 3.8.1 - 1.7 - 1.7 + 7 From 3bcf2f4a5c0361fc662a892a2cb6ed01281d7a4a Mon Sep 17 00:00:00 2001 From: Vikentiy Fesunov Date: Fri, 8 May 2026 13:18:25 +0200 Subject: [PATCH 4/5] Remove redundant build steps --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5879b12..745bf2ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,9 +41,6 @@ jobs: cache: maven - name: Build and test (jnr-exclude) run: mvn clean test -P jnr-exclude - - name: Build and test dogstatsd-http-core - run: mvn clean install - working-directory: dogstatsd-http-core test-jnr-latest: name: Test (Java 8, jnr-latest) @@ -59,6 +56,3 @@ jobs: run: mvn clean install - name: Test with latest jnr dependencies run: mvn test -P jnr-latest - - name: Build and test dogstatsd-http-core - run: mvn clean install - working-directory: dogstatsd-http-core From 40a8f60fa5e8836ec324295f352ec845327a9cb3 Mon Sep 17 00:00:00 2001 From: Vikentiy Fesunov Date: Fri, 8 May 2026 13:20:25 +0200 Subject: [PATCH 5/5] Bump per-profile java versions --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 745bf2ad..ea450137 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,26 +30,26 @@ jobs: working-directory: dogstatsd-http-core test-jnr-exclude: - name: Test (Java 8, jnr-exclude) + name: Test (Java 9, jnr-exclude) runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: - java-version: '8' + java-version: '9' distribution: zulu cache: maven - name: Build and test (jnr-exclude) run: mvn clean test -P jnr-exclude test-jnr-latest: - name: Test (Java 8, jnr-latest) + name: Test (Java 9, jnr-latest) runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: - java-version: '8' + java-version: '9' distribution: zulu cache: maven - name: Build with default dependencies