Testing gha setup #49
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
| name: Static Checks | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: [push] | |
| jobs: | |
| login-to-amazon-ecr: | |
| runs-on: | |
| - codebuild-holosoma-gpu-build-${{ github.run_id }}-${{ github.run_attempt }} | |
| # - codebuild-holosoma-cpu-build-${{ github.run_id }}-${{ github.run_attempt }} | |
| steps: | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-region: us-west-2 | |
| role-session-name: gha-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Setup ecr-cred helper | |
| run: | | |
| sudo apt update | |
| sudo apt install -y amazon-ecr-credential-helper | |
| mkdir -p ~/.docker | |
| echo '{"credsStore": "ecr-login"}' > ~/.docker/config.json | |
| run-in-container: | |
| runs-on: | |
| - codebuild-holosoma-gpu-build-${{ github.run_id }}-${{ github.run_attempt }} | |
| # - codebuild-holosoma-cpu-build-${{ github.run_id }}-${{ github.run_attempt }} | |
| needs: login-to-amazon-ecr | |
| container: | |
| image: 982423663241.dkr.ecr.us-west-2.amazonaws.com/holosoma:latest | |
| volumes: | |
| - "precommit-cache:/github/home/.cache/pre-commit" | |
| - "uv-cache:/github/home/.cache/uv" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| # ref: ${{ github.event.inputs.branch || 'main' }} | |
| fetch-depth: 5 | |
| - name: Static Checks | |
| shell: bash | |
| run: | | |
| ln -s /root/.holosoma_deps "$HOME/.holosoma_deps" || true | |
| source scripts/source_isaacgym_setup.sh | |
| pip install pre-commit mypy | |
| pip install -e src/holosoma | |
| pip install -e src/holosoma_inference | |
| git fetch origin "${GITHUB_BASE_REF:-main}" | |
| git fetch origin "${GITHUB_SHA}" | |
| pre-commit install-hooks | |
| git diff --name-only "origin/${GITHUB_BASE_REF:-main}" "${GITHUB_SHA}" -- | |
| git diff --name-only "origin/${GITHUB_BASE_REF:-main}" "${GITHUB_SHA}" -- | xargs pre-commit run --files | |
| mypy . | |