chore: fix parallelism in library compilation #316
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
| on: | |
| schedule: | |
| # Runs at 04:00 am | |
| - cron: '0 4 * * *' | |
| workflow_dispatch: | |
| # delete this before merging the PR | |
| pull_request: | |
| # Generates a list of libraries that cannot be | |
| # compiled (printed to the action stdout) | |
| name: Verify libraries compilation | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: 8 | |
| - uses: actions/checkout@v2 | |
| with: | |
| path: google-api-java-client-services | |
| # we install the moreutils `parallel` command | |
| - run: sudo apt-get install moreutils | |
| - working-directory: google-api-java-client-services/clients | |
| run: | | |
| find . -name pom.xml -not -path '*/target/*' \ | |
| | cut -d'/' -f2-4 \ | |
| | sed 's/\(.*\)/<module>\1<\/module>/' \ | |
| | (echo "<project><modelVersion>4.0.0</modelVersion><groupId>temp</groupId><artifactId>temp</artifactId><version>1.0</version><packaging>pom</packaging><modules>"; cat -; echo "</modules></project>") > pom.xml | |
| mvn clean compile -Dmaven.testSkip=true -fae --fail-at-end \ | |
| |& grep -E "^\[ERROR\] Failed to execute goal" \ | |
| | awk -F'module ' '{print $2}' \ | |
| | awk -F'\[ERROR\]' '{print $1}' \ | |
| | sort -u | |