PneumaticCraft conduits #1054
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: Verify Build and Generated Data | |
on: | |
pull_request: | |
branches: | |
- dev/* | |
- lts/* | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: test_build-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/actions/wrapper-validation@v3 # verify the gradle wrapper in the repo isnt bogus | |
# conditional logic to only install jdk depending on branch | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Store committed data | |
run: cp -r src/generated generatedBak | |
- uses: gradle/actions/setup-gradle@v3 | |
# make sure the code actualy compiles | |
- name: Build | |
run: ./gradlew build | |
# Disabled the datagen step due to continuous fails by JSON orderings. | |
# - name: Run data generator | |
# run: ./gradlew runData | |
# - name: Check data generated successfully # So we do this to ensure something was done, .cache will always be written | |
# id: check_files | |
# uses: andstor/file-existence-action@v1 | |
# with: | |
# files: "src/generated/resources/.cache/" | |
# - name: Remove generation cache for comparison | |
# run: rm -rf src/generated/resources/.cache | |
# - name: Compare generated resources | |
# run: | | |
# diff -r --strip-trailing-cr --ignore-blank-lines generatedBak src/generated | |
# if [ $? -ne 0 ]; then | |
# echo "Mismatch between generated data and committed data, please re-run runDataProd and push those changes."; | |
# exit 1; | |
# fi | |
# echo "Passed data check"; |