Document processing steps for Legacy Survey images #3
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: Linux | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| paths: | |
| - '.github/workflows/CI.yml' | |
| - 'astroclip/*' | |
| - 'setup.py' | |
| - 'requirements.txt' | |
| pull_request: | |
| branches: | |
| - '*' | |
| paths: | |
| - '*' | |
| permissions: | |
| contents: write | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| matrix: | |
| python-version: ['3.10'] | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: "Clean up useless files" | |
| run: | | |
| echo "==============================================================================" | |
| echo "Freeing up disk space on CI system" | |
| echo "==============================================================================" | |
| echo "Listing 100 largest packages" | |
| dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 | |
| df -h | |
| echo "Removing large packages" | |
| sudo apt-get remove -y '^dotnet-.*' | |
| sudo apt-get remove -y '^llvm-.*' | |
| sudo apt-get remove -y 'php.*' | |
| sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel | |
| sudo apt-get autoremove -y | |
| sudo apt-get clean | |
| df -h | |
| echo "Removing large directories" | |
| # deleting 15GB | |
| rm -rf /usr/share/dotnet/ | |
| rm -rf /opt/hostedtoolcache | |
| df -h | |
| - name: "Install dependencies" | |
| run: | | |
| pip install --upgrade pip | |
| python -m pip install torch lightning[extra] pycairo # Extra dependency since we don't want to force user to use torch version | |
| pip install --extra-index-url https://pypi.nvidia.com cuml-cu11 | |
| pip install --extra-index-url https://download.pytorch.org/whl/cu117 torch==2.0.0+cu117 | |
| - name: "Install package" | |
| run: | | |
| pip install . | |
| - name: "Check dependencies aren't broken" | |
| run: python -m pip check | |
| - name: "Check package can be imported" | |
| run: python -c "import astroclip" | |
| - name: "Run tests" | |
| run: | | |
| pip install pytest | |
| python -m pytest -k 'not _local' |