From d0575f7176e0d6c7c016caec01d0aeeb6488aaa2 Mon Sep 17 00:00:00 2001 From: Lee Rhodes Date: Tue, 17 Dec 2024 12:18:05 -0800 Subject: [PATCH] Update move_to_17_using_FFM with GHA workflow changes. --- ...cpp_files.yml => auto-check_cpp_files.yml} | 32 +++++++++++++------ .github/workflows/auto-jdk-matrix.yml | 22 +++++++------ ...nalysis.yml => manual-codeql-analysis.yml} | 11 ++----- .../{javadoc.yml => manual-javadoc.yml} | 6 ++-- 4 files changed, 38 insertions(+), 33 deletions(-) rename .github/workflows/{check_cpp_files.yml => auto-check_cpp_files.yml} (59%) rename .github/workflows/{codeql-analysis.yml => manual-codeql-analysis.yml} (84%) rename .github/workflows/{javadoc.yml => manual-javadoc.yml} (85%) diff --git a/.github/workflows/check_cpp_files.yml b/.github/workflows/auto-check_cpp_files.yml similarity index 59% rename from .github/workflows/check_cpp_files.yml rename to .github/workflows/auto-check_cpp_files.yml index 59ae5824a..b9e05ae97 100644 --- a/.github/workflows/check_cpp_files.yml +++ b/.github/workflows/auto-check_cpp_files.yml @@ -2,8 +2,7 @@ name: Serialization Compatibility Test on: push: - branches: - - master + branches: [ master, main ] workflow_dispatch: jobs: @@ -12,21 +11,34 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 - - name: Checkout C++ - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Checkout C++ + uses: actions/checkout@v4 with: repository: apache/datasketches-cpp path: cpp - - name: Configure C++ build + + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Configure C++ build run: cd cpp/build && cmake .. -DGENERATE=true - - name: Build C++ unit tests + + - name: Build C++ unit tests run: cd cpp && cmake --build build --config Release - - name: Run C++ tests + + - name: Run C++ tests run: cd cpp && cmake --build build --config Release --target test - - name: Make dir + + - 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 + + - name: Run Java tests run: mvn test -P check-cpp-files diff --git a/.github/workflows/auto-jdk-matrix.yml b/.github/workflows/auto-jdk-matrix.yml index 6e280f123..f8220bbe2 100644 --- a/.github/workflows/auto-jdk-matrix.yml +++ b/.github/workflows/auto-jdk-matrix.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: env: - MAVEN_OPTS: -Xmx1g -Xms1g + MAVEN_OPTS: -Xmx4g -Xms1g jobs: build: @@ -16,9 +16,11 @@ jobs: strategy: fail-fast: false + matrix: + jdk: [ 17 ] env: - JDK_VERSION: 17 + JDK_VERSION: ${{ matrix.jdk }} steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" @@ -30,14 +32,6 @@ jobs: run: > cat .github/workflows/auto-jdk-matrix.yml - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-package: jdk - architecture: x64 - java-version: 17 - - name: Cache local Maven repository uses: actions/cache@v4 with: @@ -45,6 +39,14 @@ jobs: 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: Echo Java Version run: > java -version diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/manual-codeql-analysis.yml similarity index 84% rename from .github/workflows/codeql-analysis.yml rename to .github/workflows/manual-codeql-analysis.yml index 376d69404..1b94d13a3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/manual-codeql-analysis.yml @@ -1,13 +1,6 @@ name: "CodeQL" on: -# push: -# branches: [ 'master' ] -# pull_request: - # The branches below must be a subset of the branches above -# branches: [ 'master' ] -# schedule: -# - cron: '10 17 * * 4' workflow_dispatch: jobs: @@ -48,8 +41,8 @@ jobs: - name: Autobuild uses: github/codeql-action/autobuild@v4 - # ℹī¸ 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 + # 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. diff --git a/.github/workflows/javadoc.yml b/.github/workflows/manual-javadoc.yml similarity index 85% rename from .github/workflows/javadoc.yml rename to .github/workflows/manual-javadoc.yml index 04d70e25a..5f6ac6aec 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/manual-javadoc.yml @@ -1,8 +1,6 @@ name: JavaDoc on: - push: - branches: [ master, main ] workflow_dispatch: jobs: @@ -24,7 +22,7 @@ jobs: - name: Print Current workflow run: > - cat .github/workflows/javadoc.yml + cat .github/workflows/manual-javadoc.yml - name: Generate JavaDoc run: mvn javadoc:javadoc @@ -33,6 +31,6 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4.6.8 with: token: ${{ secrets.GITHUB_TOKEN }} - folder: target/reports/apidocs + folder: target/site/apidocs target-folder: docs/${{ github.ref_name }} branch: gh-pages