From 8e7614726883c112114bc2f7119e50cff23f0dcb Mon Sep 17 00:00:00 2001 From: Ranjan Mohan Date: Mon, 10 May 2021 19:34:39 -0400 Subject: [PATCH] Replace existing CI actions with the one from the .github repository Closes #40. Replaced the maven build and package publish actions with the ones from the .github repository. --- .../{maven_macos.yml => maven_build.yml} | 15 +++++---- .github/workflows/maven_ubuntu.yml | 32 ------------------- .github/workflows/maven_windows.yml | 32 ------------------- .github/workflows/package_publish.yml | 4 +-- 4 files changed, 11 insertions(+), 72 deletions(-) rename .github/workflows/{maven_macos.yml => maven_build.yml} (67%) delete mode 100644 .github/workflows/maven_ubuntu.yml delete mode 100644 .github/workflows/maven_windows.yml diff --git a/.github/workflows/maven_macos.yml b/.github/workflows/maven_build.yml similarity index 67% rename from .github/workflows/maven_macos.yml rename to .github/workflows/maven_build.yml index fb05922..c34fce0 100644 --- a/.github/workflows/maven_macos.yml +++ b/.github/workflows/maven_build.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Maven build - MacOS latest +name: Maven build - clean test verify on: push: @@ -11,17 +11,20 @@ on: jobs: build: - - runs-on: macos-latest - + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + # Other versions of java can be configured as well - https://github.com/actions/setup-java#basic + java: [14.0.1] steps: - uses: actions/checkout@v2 - name: Checkout submodules run: git submodule update --init --recursive - - name: Set up JDK 14 + - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: '14.0.1' + java-version: ${{ matrix.java }} - name: Cache Maven packages uses: actions/cache@v2 with: diff --git a/.github/workflows/maven_ubuntu.yml b/.github/workflows/maven_ubuntu.yml deleted file mode 100644 index 7fa71f2..0000000 --- a/.github/workflows/maven_ubuntu.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Maven build - Ubuntu latest - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Checkout submodules - run: git submodule update --init --recursive - - name: Set up JDK 14 - uses: actions/setup-java@v1 - with: - java-version: '14.0.1' - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build with Maven - run: mvn -e clean test verify --file pom.xml diff --git a/.github/workflows/maven_windows.yml b/.github/workflows/maven_windows.yml deleted file mode 100644 index 0a3930d..0000000 --- a/.github/workflows/maven_windows.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Maven build - Windows latest - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - name: Checkout submodules - run: git submodule update --init --recursive - - name: Set up JDK 14 - uses: actions/setup-java@v1 - with: - java-version: '14.0.1' - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build with Maven - run: mvn -e clean test verify --file pom.xml diff --git a/.github/workflows/package_publish.yml b/.github/workflows/package_publish.yml index 68b2cd8..19ffa92 100644 --- a/.github/workflows/package_publish.yml +++ b/.github/workflows/package_publish.yml @@ -1,7 +1,7 @@ # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path -name: Publish to GitHub packages +name: Maven package and publish - package verify deploy on: release: @@ -29,4 +29,4 @@ jobs: - name: Publish to GitHub Packages Apache Maven run: mvn deploy -e -X -s $GITHUB_WORKSPACE/settings.xml env: - GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file + GITHUB_TOKEN: ${{ github.token }}