adapt max cpu usage #1
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
| # | |
| name: BuildGEMOC | |
| on: | |
| push: | |
| jobs: | |
| pomfirst-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Show context | |
| run: | | |
| id -u | |
| id -g | |
| echo $HOME | |
| ls -lsa $HOME | |
| echo ${{ github.workspace }} | |
| ls -lsa ${{ github.workspace }} | |
| cd ~ | |
| pwd | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-pomfirst-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2-pomfirst | |
| - name: Set UID and GID env | |
| # required to correctly map the userId in the docker image | |
| run: | | |
| echo "UID=$(id -u)" >> $GITHUB_ENV | |
| echo "GID=$(id -g)" >> $GITHUB_ENV | |
| echo "RUNNER_HOME=$HOME" >> $GITHUB_ENV | |
| - name: Generate protocol in container | |
| uses: addnab/docker-run-action@v3 | |
| with: | |
| image: gemoc/gemoc-builder:latest | |
| options: -v ${{ github.workspace }}:/home/ubuntu/src -v ${{ env.RUNNER_HOME }}/.m2:/home/ubuntu/.m2 | |
| run: | | |
| echo "This step is using a Public Docker Container Action " | |
| /entrypoint ./generate_protocols.sh | |
| - name: pomfirst build | |
| uses: addnab/docker-run-action@v3 | |
| with: | |
| image: gemoc/gemoc-builder:latest | |
| options: -v ${{ github.workspace }}:/home/ubuntu/src -v ${{ env.RUNNER_HOME }}/.m2:/home/ubuntu/.m2 | |
| run: | | |
| echo "This step is using a Public Docker Container Action " | |
| /entrypoint ./pomfirst_build.sh | |
| ls -lsa /home/ubuntu | |
| ls -lsa /home/ubuntu/.m2 | |
| - name: Show context | |
| run: | | |
| id -u | |
| id -g | |
| echo $HOME | |
| ls -lsa $HOME | |
| echo $HOME/.m2 | |
| ls -lsa $HOME/.m2 | |
| tycho-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Show context | |
| run: | | |
| id -u | |
| id -g | |
| echo $HOME | |
| ls -lsa $HOME | |
| echo ${{ github.workspace }} | |
| ls -lsa ${{ github.workspace }} | |
| - name: Cache Maven packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-tycho-${{ hashFiles('**/pom.xml', '**/MANIFEST.MF', '**/*.target') }} | |
| restore-keys: ${{ runner.os }}-m2-tycho | |
| - name: Set UID and GID vars | |
| id: vars | |
| # required to correctly map the userId in the docker image | |
| run: | | |
| echo "uid=$(id -u)" >> $GITHUB_OUTPUT | |
| echo "gid=$(id -g)" >> $GITHUB_OUTPUT | |
| echo "RUNNER_HOME=$HOME" >> $GITHUB_ENV | |
| - name: Generate Protocol classes | |
| uses: addnab/docker-run-action@v3 | |
| with: | |
| image: gemoc/gemoc-builder:latest | |
| options: -v ${{ github.workspace }}:/home/ubuntu/src -v ${{ env.RUNNER_HOME }}/.m2:/home/ubuntu/.m2 | |
| run: | | |
| id | |
| /entrypoint ./generate_protocols.sh | |
| - name: tycho linux_no_system_test build | |
| uses: addnab/docker-run-action@v3 | |
| with: | |
| image: gemoc/gemoc-builder:latest | |
| options: -v ${{ github.workspace }}:/home/ubuntu/src -v ${{ env.RUNNER_HOME }}/.m2:/home/ubuntu/.m2 --env UID=${{ steps.vars.outputs.uid }} --env GID=${{ steps.vars.outputs.gid }} | |
| run: | | |
| id | |
| env | |
| ls -lsa /home/ubuntu/.m2 | |
| chmod -R a+rw /home/ubuntu/.m2 | |
| chown -R ${{ steps.vars.outputs.uid }}:${{ steps.vars.outputs.gid }} /home/ubuntu/.m2 | |
| ls -lsa /home/ubuntu/.m2 | |
| /entrypoint ./tycho_build.sh linux_no_system_test | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2.17.0 | |
| if: always() # always run even if the previous step fails | |
| with: | |
| junit_files: "**/target/surefire-reports/TEST-*.xml" |