Skip to content

Commit

Permalink
Merge branch 'google-deepmind:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jagapiou authored Sep 12, 2024
2 parents ee756fb + c649682 commit 32b5cdd
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use Nvidia Ubuntu 22 base (includes CUDA if a supported GPU is present)
# https://hub.docker.com/r/nvidia/cuda
FROM nvidia/cuda:12.5.1-devel-ubuntu22.04@sha256:732f76ff134bfa50b9a86e2fe7d07fecd3730beb98f3bcef616c6ae9d9f33f4c
FROM nvidia/cuda:12.6.0-devel-ubuntu22.04@sha256:af25d2ef68f7aedaf0eb179e67773e64feefc3b65a12f59a6cd604ca7c53bb57

ARG PYTHON_VERSION

Expand Down
42 changes: 26 additions & 16 deletions .github/actions/install-meltingpot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
- name: Set up Python ${{ inputs.python-version }}
id: setup-python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: ${{ inputs.python-version }}

Expand All @@ -38,34 +38,44 @@ runs:
meltingpot/assets
venv
key: install-meltingpot-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
install-meltingpot-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-

- name: Install Melting Pot
- name: Create venv
if: steps.restore.outputs.cache-hit != 'true'
shell: bash
run: |
python -m venv venv
source venv/bin/activate
pip install --editable .[dev]
- name: Save Melting Pot installation
if: steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: |
meltingpot/assets
venv
key: ${{ steps.restore.outputs.cache-primary-key }}

- name: Activate virtual environment
- name: Activate venv
shell: bash
run: |
echo "${PWD}/venv/bin" >> $GITHUB_PATH
- name: Install Melting Pot
if: steps.restore.outputs.cache-hit != 'true'
shell: bash
run: |
pip install --editable .[dev]
- name: Show installation
shell: bash
run: |
which python
python --version
which pip
pip --version
which pylint
pylint --version
which pytest
pytest --version
which pytype
pytype --version
pip list
- name: Save Melting Pot installation
if: steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: |
meltingpot/assets
venv
key: ${{ steps.restore.outputs.cache-primary-key }}
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -46,7 +46,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@4fa2a7953630fd2f3fb380f21be14ede0169dd4f
uses: github/codeql-action/autobuild@4dd16135b69a43b6c8efb853346f8437d92d3c93

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -59,4 +59,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93
10 changes: 5 additions & 5 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
steps:
- name: Checkout Melting Pot
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Update Python setup
- name: Show Python setup
run: |
python --version
pip list
- name: Build distribution
run: python setup.py sdist
- name: Save artifact
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: dist
path: ./dist
Expand All @@ -56,7 +56,7 @@ jobs:
name: dist
path: ./dist
- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.11'
- name: Install Python dependencies
Expand Down Expand Up @@ -91,12 +91,12 @@ jobs:
path: ./dist
- name: Publish to TestPyPI
if: github.event_name == 'release' || inputs.upload_to_test_pypi
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
- name: Publish to PyPI
if: github.event_name == 'release' || inputs.upload_to_pypi
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6
with:
verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

steps:
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -49,14 +49,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
}
},
"python.formatting.provider": "none",
Expand Down

0 comments on commit 32b5cdd

Please sign in to comment.