Fix MML #1667: incorrect cargo bay minimum doors (MML side) #715
Workflow file for this run
This file contains 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: MegaMekLab CI with Gradle | |
on: | |
pull_request: | |
branches: [master] | |
env: | |
GRADLE_OPTS: "-Dscan.link.VCS=${{ github.event.pull_request.html_url }}" | |
jobs: | |
ci_cd: | |
runs-on: ${{ matrix.os }} | |
outputs: | |
mmRepo: ${{ steps.find_mm.outputs.mmRepo }} | |
mmBranch: ${{ steps.find_mm.outputs.mmBranch }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] # For CI/CD running on *nix is sufficient | |
java-distribution: [temurin] | |
java-version: [17] | |
fail-fast: false | |
steps: | |
- name: Checking out MegaMekLab | |
uses: actions/checkout@v4 | |
with: | |
path: megameklab | |
- 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=master" >> $GITHUB_OUTPUT | |
fi | |
exit 0 | |
- name: Checkout MegaMek | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ steps.find_mm.outputs.mmRepo }} | |
ref: ${{ steps.find_mm.outputs.mmBranch }} | |
path: megamek | |
- name: Set up ${{ matrix.java-distribution }} JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ matrix.java-distribution }} | |
java-version: ${{ matrix.java-version }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
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: Add MMLRevision file | |
run: | | |
echo ${{ github.sha }} >> megameklab/megameklab//mml-revision.txt | |
- name: Build with Gradle | |
working-directory: megameklab | |
run: ./gradlew build -x checkstyleMain -x checkstyleTest --stacktrace --scan | |
- name: Upload Test Logs on Failure | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cd-failure-logs | |
path: ./megameklab/megameklab/build/reports/ | |
- name: CodeCov.io Coverage Report | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: ./megameklab/megameklab/build/reports/jacoco/test | |
fail_ci_if_error: false | |
verbose: true | |
- name: Upload TarGZ Release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mml-release-tgz-${{ matrix.java-distribution }}-jdk${{ matrix.java-version }} | |
path: ./megameklab/megameklab/build/distributions/*.tar.gz |