Changeset 17694 in josm


Ignore:
Timestamp:
2021-03-30T15:42:04+02:00 (3 years ago)
Author:
simon04
Message:

fix #20621 - GitHub Actions: separate test and build jobs

Location:
trunk/.github/workflows
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/ant.yml

    r17691 r17694  
    1 name: Java CI
     1name: Java CI Build
    22env:
    33  junit_platform_version: '1.7.0'
     
    66on:
    77  push:
    8     branches: [master]
    9   pull_request:
    108    branches: [master]
    119
     
    9391            ~/.ivy2/cache/
    9492            ~/work/josm/josm/tools/
    95             build-tools-cache/
    9693          key: ${{ runner.os }}-ivy2-${{ hashFiles('ivy.xml') }}
    9794
    98       - name: Setup java
     95      - name: Setup Java ${{ matrix.java }}
    9996        uses: actions/setup-java@v1.4.3
    10097        with:
    10198          java-version: ${{ matrix.java }}
    10299
    103       - name: Install ant ${{ env.ANT_HOME }} and junit ${{ env.junit_platform_version }}
     100      - name: Install Ant ${{ env.ANT_HOME }}
    104101        run: |
    105           mkdir -p build-tools-cache/
    106           cd build-tools-cache/
    107           if [ ! -f ${{ env.ANT_HOME }}-bin.tar.gz ]; then
    108             curl -o ${{ env.ANT_HOME }}-bin.tar.gz https://downloads.apache.org/ant/binaries/${{ env.ANT_HOME }}-bin.tar.gz
     102          if [ ! -f tools/${{ env.ANT_HOME }}-bin.tar.gz ]; then
     103            curl -o tools/${{ env.ANT_HOME }}-bin.tar.gz https://downloads.apache.org/ant/binaries/${{ env.ANT_HOME }}-bin.tar.gz
    109104          fi
    110           if [ ! -f junit-platform-console-standalone-${{ env.junit_platform_version }}.jar ]; then
    111             curl -o junit-platform-console-standalone-${{ env.junit_platform_version }}.jar https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/${{ env.junit_platform_version }}/junit-platform-console-standalone-${{ env.junit_platform_version }}.jar
    112           fi
    113           cd ..
    114           tar zxf build-tools-cache/${{ env.ANT_HOME }}-bin.tar.gz
    115           cp build-tools-cache/junit-platform-console-standalone-${{ env.junit_platform_version }}.jar ${{ env.ANT_HOME }}/lib/junit-platform-console-standalone-${{ env.junit_platform_version }}.jar
     105          tar zxf tools/${{ env.ANT_HOME }}-bin.tar.gz
    116106
    117       - name: Print ant version, expecting ${{ env.ANT_HOME }}
    118         run: ${{ env.ANT_HOME }}/bin/ant -version
     107      - name: Ant diagnostics
     108        run: ${{ env.ANT_HOME }}/bin/ant -diagnostics
    119109
    120110      - name: Optimise images
     
    149139          asset_content_type: application/java-archive
    150140
    151       - name: Test with Ant
    152         if: ${{ needs.createrelease.outputs.josm_prerelease }}
    153         run: |
    154           ANT="${{ env.ANT_HOME }}/bin/ant -DnoJavaFX=true test-unit-hardfail"
    155           $ANT -Dtest.headless=true
    156 
    157       - name: Dump errors if failed
    158         if: ${{ failure() }}
    159         run: "grep -L ', Failures: 0, Skipped: ' test/report/*.txt | xargs cat"
    160 
    161       - name: Upload Ant reports
    162         if: ${{ always() }}
    163         uses: actions/upload-artifact@v2
    164         with:
    165           name: Ant reports for JOSM ${{ needs.createrelease.outputs.josm_revision }} on java ${{ matrix.java }} on ${{ matrix.os }}
    166           path: test/report/*.txt
    167 
    168       - name: Publish Test Report with junit-report-annotations-action
    169         uses: ashley-taylor/junit-report-annotations-action@1.3
    170         if: always()
    171         with:
    172           access-token: ${{ secrets.GITHUB_TOKEN }}
    173           path: 'test/report/TEST*.xml'
    174 
    175       - name: Publish Test Report with action-junit-report
    176         if: always()
    177         uses: mikepenz/action-junit-report@v1
    178         with:
    179           report_paths: 'test/report/TEST*.xml'
    180           github_token: ${{ secrets.GITHUB_TOKEN }}
    181 
    182141      - name: Build and package for macOS
    183142        if: ${{ runner.os == 'macos' && always() }}
     
    189148          ./native/macosx/macos-jpackage.sh ${{ needs.createrelease.outputs.josm_revision }}
    190149
    191       - name: Upload app
     150      - name: Upload macOS app
    192151        if: ${{ runner.os == 'macos' && always() }}
    193152        id: upload-app
Note: See TracChangeset for help on using the changeset viewer.