Issue MML#2138 Parse industrial cockpit types correctly #7897
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: MegaMek CI with Gradle | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| GRADLE_OPTS: "-Dscan.link.VCS=${{ github.event.pull_request.html_url }}" | |
| mm.profile: "dev" | |
| jobs: | |
| pr_build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| java-distribution: [ temurin ] | |
| java-version: [ 17, 21, 25 ] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout Data Repo | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: megamek/mm-data | |
| path: mm-data | |
| - name: "Check out MegaMek" | |
| uses: actions/checkout@v6 | |
| with: | |
| path: megamek | |
| - name: Set short git commit SHA | |
| id: vars | |
| run: | | |
| cd megamek | |
| calculatedSha=$(git rev-parse --short ${{ github.sha }}) | |
| echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV | |
| - name: "Output branch information to Version file" | |
| run: | | |
| echo "branch=PR-${{ github.event.number }}" >> megamek/megamek/resources/extraVersion.properties | |
| echo "gitHash=${{ env.COMMIT_SHORT_SHA }}" >> megamek/megamek/resources/extraVersion.properties | |
| - name: Set up ${{ matrix.java-distribution }} JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: ${{ matrix.java-distribution }} | |
| java-version: ${{ matrix.java-version }} | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Test | |
| working-directory: megamek | |
| run: ./gradlew test -x checkstyleMain -x checkstyleTest | |
| - name: Upload Test Logs on Failure | |
| uses: actions/upload-artifact@v6 | |
| if: failure() | |
| with: | |
| name: cd-failure-logs | |
| path: ./megamek/megamek/build/reports/ | |
| - name: CodeCov.io Coverage Report | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| directory: ./megamek/megamek/build/reports/jacoco/test | |
| fail_ci_if_error: false | |
| verbose: true | |
| - name: Build with Gradle | |
| working-directory: megamek | |
| run: ./gradlew build -x test -x checkstyleMain -x checkstyleTest -PextraVersion="PR-${{ github.event.number}}-${{ env.COMMIT_SHORT_SHA }}" | |
| - name: Upload TarGZ Release | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: mm-release-tar-gz-${{ matrix.java-distribution }}-jdk${{ matrix.java-version }} | |
| path: ./megamek/megamek/build/distributions/*.tar.gz |