This is an automated email from the ASF dual-hosted git repository. leerho pushed a commit to branch update_workflows_in_6.2.X in repository https://gitbox.apache.org/repos/asf/datasketches-java.git
commit 12e126de34a1e8ee2246836aa58d37cd21ec28ec Author: Lee Rhodes <[email protected]> AuthorDate: Sat Jan 18 15:09:26 2025 -0800 Update workflows in 6.2.X --- .github/workflows/auto-jdk-matrix.yml | 102 +++++++++--------- .github/workflows/auto-os-matrix.yml | 120 +++++++++++---------- ...uto-check_cpp_files.yml => check_cpp_files.yml} | 13 ++- .github/workflows/codeql-analysis.yml | 83 ++++++++++++++ .github/workflows/javadoc.yml | 39 +++++++ .github/workflows/manual-codeql-analysis.yml | 57 ---------- .github/workflows/manual-javadoc.yml | 20 ---- 7 files changed, 248 insertions(+), 186 deletions(-) diff --git a/.github/workflows/auto-jdk-matrix.yml b/.github/workflows/auto-jdk-matrix.yml index 98a37cfd..fc591411 100644 --- a/.github/workflows/auto-jdk-matrix.yml +++ b/.github/workflows/auto-jdk-matrix.yml @@ -1,67 +1,71 @@ -name: DataSketches-Java Auto JDK Matrix Test & Install +name: Auto JDK Matrix Test & Install on: - pull_request: - push: - branches: [ master, main ] - workflow_dispatch: + push: + paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] + branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] + pull_request: + paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] + # The branches below must be a subset of the branches above + branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] + workflow_dispatch: env: - MAVEN_OPTS: -Xmx4g -Xms1g + MAVEN_OPTS: -Xmx4g -Xms1g jobs: - build: - name: Build, Test, Install - runs-on: ubuntu-latest + build: + name: Build, Test, Install + runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - jdk: [ 8,11 ] + strategy: + fail-fast: false + matrix: + jdk: [ 1.8 ] - env: - JDK_VERSION: ${{ matrix.jdk }} + env: + JDK_VERSION: ${{ matrix.jdk }} - steps: - - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" - uses: actions/checkout@v4 - with: - persist-credentials: false + steps: + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v4 + with: + persist-credentials: false - - name: Print Current workflow - run: > - cat .github/workflows/auto-jdk-matrix.yml + - name: Print Current workflow + run: > + cat .github/workflows/auto-jdk-matrix.yml - - name: Cache local Maven repository - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: build-${{ runner.os }}-maven- + - name: Cache local Maven repository + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: build-${{ runner.os }}-maven- - - name: Install Matrix JDK - uses: actions/setup-java@v4 - with: - java-version: ${{ matrix.jdk }} - distribution: 'temurin' - java-package: jdk - architecture: x64 + - name: Install Matrix JDK + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.jdk }} + distribution: 'temurin' + java-package: jdk + architecture: x64 - - name: Echo Java Version - run: > - java -version + - name: Echo Java Version + run: > + java -version - - name: Test - run: > - mvn clean test -B - -Dmaven.javadoc.skip=true - -Dgpg.skip=true + - name: Test + run: > + mvn clean test -B + -Dmaven.javadoc.skip=true + -Dgpg.skip=true - - name: Install - run: > - mvn clean install -B - -DskipTests=true - -Dgpg.skip=true + - name: Install + run: > + mvn clean install -B + -DskipTests=true + -Dgpg.skip=true # Architecture options: x86, x64, armv7, aarch64, ppc64le # setup-java@v3 has a "with cache" option diff --git a/.github/workflows/auto-os-matrix.yml b/.github/workflows/auto-os-matrix.yml index dbba4f68..1e6666af 100644 --- a/.github/workflows/auto-os-matrix.yml +++ b/.github/workflows/auto-os-matrix.yml @@ -1,77 +1,81 @@ -name: DataSketches-Java 8 Auto OS Matrix Test & Install +name: Auto OS Matrix Test & Install on: - pull_request: - push: - branches: [ master, main ] - workflow_dispatch: + push: + paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] + branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] + pull_request: + paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] + # The branches below must be a subset of the branches above + branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] + workflow_dispatch: env: - MAVEN_OPTS: -Xmx1g -Xms1g + MAVEN_OPTS: -Xmx4g -Xms1g jobs: - build: - name: Build, Test, Install + build: + name: Build, Test, Install - strategy: - fail-fast: false + strategy: + fail-fast: false - matrix: - jdk: [ 8 ] - os: [ windows-latest, ubuntu-latest, macos-latest ] - include: - - os: windows-latest - skip_javadoc: "`-Dmaven`.javadoc`.skip=true" - skip_gpg: "`-Dgpg`.skip=true" - - os: ubuntu-latest - skip_javadoc: -Dmaven.javadoc.skip=true - skip_gpg: -Dgpg.skip=true - - os: macos-latest - skip_javadoc: -Dmaven.javadoc.skip=true - skip_gpg: -Dgpg.skip=true + matrix: + jdk: [ 1.8 ] + os: [ windows-latest, ubuntu-latest, macos-latest ] + include: + - os: windows-latest + skip_javadoc: "`-Dmaven`.javadoc`.skip=true" + skip_gpg: "`-Dgpg`.skip=true" + - os: ubuntu-latest + skip_javadoc: -Dmaven.javadoc.skip=true + skip_gpg: -Dgpg.skip=true + - os: macos-latest + skip_javadoc: -Dmaven.javadoc.skip=true + skip_gpg: -Dgpg.skip=true - runs-on: ${{matrix.os}} + runs-on: ${{matrix.os}} - env: - JDK_VERSION: ${{ matrix.jdk }} + env: + JDK_VERSION: ${{ matrix.jdk }} - steps: - - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" - uses: actions/checkout@v4 - with: - persist-credentials: false + steps: + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v4 + with: + persist-credentials: false - - name: Cache local Maven repository - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: build-${{ runner.os }}-maven- + - name: Cache local Maven repository + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: build-${{ runner.os }}-maven- - - name: Install Matrix JDK - uses: actions/setup-java@v4 - with: - java-version: ${{ matrix.jdk }} - distribution: 'temurin' - java-package: jdk - architecture: x64 + - name: Install Matrix JDK + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.jdk }} + distribution: 'temurin' + java-package: jdk + architecture: x64 - - name: Echo Java Version - run: > - java -version + - name: Echo Java Version + run: > + java -version - - name: Test - run: > - mvn clean test - ${{matrix.os.skip_javadoc}} - ${{matrix.os.skip_gpg}} + - name: Test + run: > + mvn clean test + ${{matrix.os.skip_javadoc}} + ${{matrix.os.skip_gpg}} - - name: Install - run: > - mvn clean install -B - ${{matrix.os.skip_javadoc}} - -D skipTests=true - ${{matrix.os.skip_gpg}} + - name: Install + run: > + mvn clean install -B + ${{matrix.os.skip_javadoc}} + -D skipTests=true + ${{matrix.os.skip_gpg}} # Architecture options: x86, x64, armv7, aarch64, ppc64le # setup-java@v4 has a "with cache" option diff --git a/.github/workflows/auto-check_cpp_files.yml b/.github/workflows/check_cpp_files.yml similarity index 83% rename from .github/workflows/auto-check_cpp_files.yml rename to .github/workflows/check_cpp_files.yml index 9fe9ca64..f3a0ad5b 100644 --- a/.github/workflows/auto-check_cpp_files.yml +++ b/.github/workflows/check_cpp_files.yml @@ -2,7 +2,8 @@ name: Serialization Compatibility Test on: push: - branches: [ master, main ] + paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] + branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] workflow_dispatch: jobs: @@ -12,25 +13,33 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Checkout C++ uses: actions/checkout@v4 with: repository: apache/datasketches-cpp path: cpp + - name: Setup Java uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '1.8' distribution: 'temurin' + - name: Configure C++ build run: cd cpp/build && cmake .. -DGENERATE=true + - name: Build C++ unit tests run: cd cpp && cmake --build build --config Release + - name: Run C++ tests run: cd cpp && cmake --build build --config Release --target test + - name: Make dir run: mkdir -p serialization_test_data/cpp_generated_files + - name: Copy files run: cp cpp/build/*/test/*_cpp.sk serialization_test_data/cpp_generated_files + - name: Run Java tests run: mvn test -P check-cpp-files diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..79d6fd94 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,83 @@ +name: "CodeQL" + +on: + push: + paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] + branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] + pull_request: + paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] + # The branches below must be a subset of the branches above + branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + cache: 'maven' + java-version: '1.8' + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # Details on CodeQL's query packs refer to link below. + + - name: Custom building using maven + run: > + mvn clean package -f "pom.xml" -B -V -e + -Dfindbugs.skip=true + -Dcheckstyle.skip=true + -Dpmd.skip=true + -Denforcer.skip + -Dmaven.javadoc.skip + -DskipTests=true + -Dmaven.test.skip.exec + -Dlicense.skip=true + -Dweb.console.skip=true + -Dgpg.skip=true + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" + + +# CodeQL's Query Packs: +# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + +# Command-line programs to run using the OS shell. +# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + +# Architecture options: x86, x64, armv7, aarch64, ppc64le +# Lifecycles: validate, compile, test, package, verify, install, deploy +# -B batch mode, never stops for user input +# -V show Version without stopping +# -X debug mode +# -q quiet, only show errors +# -e produce execution error messages diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml new file mode 100644 index 00000000..f6682ba6 --- /dev/null +++ b/.github/workflows/javadoc.yml @@ -0,0 +1,39 @@ +name: JavaDoc + +on: + push: + paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ] + branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ] + workflow_dispatch: + +jobs: + javadoc: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: '1.8' + distribution: 'temurin' + + - name: Echo Java Version + run: java -version + + - name: Print Current workflow + run: > + cat .github/workflows/javadoc.yml + + - name: Generate JavaDoc + run: mvn javadoc:javadoc + + - name: Deploy JavaDoc + uses: JamesIves/[email protected] + with: + token: ${{ secrets.GITHUB_TOKEN }} + folder: target/reports/apidocs + target-folder: docs/${{ github.ref_name }} + branch: gh-pages diff --git a/.github/workflows/manual-codeql-analysis.yml b/.github/workflows/manual-codeql-analysis.yml deleted file mode 100644 index a1f07f77..00000000 --- a/.github/workflows/manual-codeql-analysis.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: "CodeQL" - -on: - workflow_dispatch: - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - queries: +security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # âšī¸ Command-line programs to run using the OS shell. - # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/manual-javadoc.yml b/.github/workflows/manual-javadoc.yml deleted file mode 100644 index 458aff3d..00000000 --- a/.github/workflows/manual-javadoc.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: JavaDoc - -on: - workflow_dispatch: - -jobs: - javadoc: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Generate JavaDoc - run: mvn javadoc:javadoc - - name: Deploy JavaDoc - uses: JamesIves/github-pages-deploy-action@5dc1d5a192aeb5ab5b7d5a77b7d36aea4a7f5c92 - with: - token: ${{ secrets.GITHUB_TOKEN }} - folder: target/site/apidocs - target-folder: docs/${{ github.ref_name }} - branch: gh-pages --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
