Skip to content

Improvement: Added Degrading Mental & Physical Health for Too Many Advanced Prosthetics/Implants; Updated Glossary #8792

Improvement: Added Degrading Mental & Physical Health for Too Many Advanced Prosthetics/Implants; Updated Glossary

Improvement: Added Degrading Mental & Physical Health for Too Many Advanced Prosthetics/Implants; Updated Glossary #8792

Workflow file for this run

name: MekHQ CI with Gradle
on:
pull_request:
branches: [ main ]
env:
GRADLE_OPTS: "-Dscan.link.VCS=${{ github.event.pull_request.html_url }}"
jobs:
pr_ci:
runs-on: ${{ matrix.os }}
outputs:
mmRepo: ${{ steps.find_mm.outputs.mmRepo }}
mmBranch: ${{ steps.find_mm.outputs.mmBranch }}
mmlRepo: ${{ steps.find_mml.outputs.mmRepo }}
mmlBranch: ${{ steps.find_mml.outputs.mmBranch }}
strategy:
matrix:
os: [ ubuntu-latest ]
java-distribution: [ temurin ]
java-version: [ 17, 21 ]
fail-fast: false
steps:
- name: Checkout Data Repo
uses: actions/checkout@v6
with:
repository: megamek/mm-data
path: mm-data
- name: Checkout out MekHQ
uses: actions/checkout@v6
with:
path: mekhq
- name: Find the Right MegaMek Branch
id: find_mm
shell: bash {0}
run: |
git ls-remote --exit-code --heads ${{ github.event.pull_request.head.repo.owner.html_url }}/megamek.git ${{ github.event.pull_request.head.ref }}
if [ "$?" == "0" ]
then
echo "mmRepo=${{ github.event.pull_request.head.repo.owner.login }}/megamek" >> $GITHUB_OUTPUT
echo "mmBranch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
else
echo "mmRepo=MegaMek/megamek" >> $GITHUB_OUTPUT
echo "mmBranch=main" >> $GITHUB_OUTPUT
fi
exit 0
- name: Checkout MegaMek
uses: actions/checkout@v6
with:
repository: ${{ steps.find_mm.outputs.mmRepo }}
ref: ${{ steps.find_mm.outputs.mmBranch }}
path: megamek
- name: Add MM Hash
run: |
cd megamek
calculatedSha=$(git rev-parse HEAD)
echo "$calculatedSha" >> megamek/docs/mm-revision.txt
- name: Find the Right MegaMekLab Branch
id: find_mml
shell: bash {0}
run: |
git ls-remote --exit-code --heads ${{ github.event.pull_request.head.repo.owner.html_url }}/megameklab.git ${{ github.event.pull_request.head.ref }}
if [ "$?" == "0" ]
then
echo "mmlRepo=${{ github.event.pull_request.head.repo.owner.login }}/megameklab" >> $GITHUB_OUTPUT
echo "mmlBranch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
else
echo "mmlRepo=MegaMek/megameklab" >> $GITHUB_OUTPUT
echo "mmlBranch=main" >> $GITHUB_OUTPUT
fi
exit 0
- name: Checkout MegaMekLab
uses: actions/checkout@v6
with:
repository: ${{ steps.find_mml.outputs.mmlRepo }}
ref: ${{ steps.find_mml.outputs.mmlBranch }}
path: megameklab
- name: Add MML Hash
run: |
cd megameklab
calculatedSha=$(git rev-parse HEAD)
echo "$calculatedSha" >> megameklab/docs/mml-revision.txt
- 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
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- name: Set short git commit SHA
id: vars
run: |
cd mekhq
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: Add MHQRevision file
run: |
echo ${{ github.sha }} >> mekhq/MekHQ/mhq-revision.txt
- name: Test All
working-directory: mekhq
run: ./gradlew testAll --stacktrace --scan -i --continue
env:
mm.profile: dev
- name: Upload Test Logs on Failure
uses: actions/upload-artifact@v5
if: failure()
with:
name: cd-failure-logs
path: ./mekhq/MekHQ/build/reports/
overwrite: true
- name: Build with Gradle
working-directory: mekhq
run: ./gradlew build -x test -PextraVersion="PR-${{ github.event.number }}-${{ env.COMMIT_SHORT_SHA }}"
- name: CodeCov.io Coverage Report
uses: codecov/codecov-action@v5
with:
directory: ./mekhq/MekHQ/build/reports/jacoco/test
fail_ci_if_error: false
verbose: true
- name: Upload Tar GZ Artifact
uses: actions/upload-artifact@v5
with:
name: mhq-release-tgz-${{ matrix.java-distribution }}-jdk${{ matrix.java-version }}
path: mekhq/MekHQ/build/distributions/*.tar.gz