|
17 | 17 | # The type of runner that the job will run on |
18 | 18 | runs-on: ubuntu-latest |
19 | 19 |
|
20 | | - strategy: |
21 | | - matrix: |
22 | | - python-version: ['3.7', '3.8', '3.9', '3.10'] |
| 20 | + # TODO: Matrix strategy for Python versions is defined but never used. |
| 21 | + # Currently all jobs use the same system Python, making this redundant. |
| 22 | + # Either add 'actions/setup-python' to use matrix.python-version, or remove the matrix. |
| 23 | + # |
| 24 | + # To enable multi-version Python testing: |
| 25 | + # |
| 26 | + # Step 1: Uncomment the matrix below (defines the Python versions to test): |
| 27 | + # strategy: |
| 28 | + # matrix: |
| 29 | + # python-version: ['3.7', '3.8', '3.9', '3.10'] |
| 30 | + # |
| 31 | + # Step 2: Add this step after checkout (before "Free up disk space"): |
| 32 | + # - name: Set up Python ${{ matrix.python-version }} |
| 33 | + # uses: actions/setup-python@v4 |
| 34 | + # with: |
| 35 | + # python-version: ${{ matrix.python-version }} |
| 36 | + # |
| 37 | + # ORIGINAL (commented out - not used, makes tests 4x slower with no benefit): |
| 38 | + # strategy: |
| 39 | + # matrix: |
| 40 | + # python-version: ['3.7', '3.8', '3.9', '3.10'] |
23 | 41 |
|
24 | 42 |
|
25 | 43 | # Steps represent a sequence of tasks that will be executed as part of the job |
|
30 | 48 | submodules: 'recursive' |
31 | 49 | fetch-depth: 500 |
32 | 50 |
|
| 51 | + # --------------------------------------------- |
| 52 | + # NEW STEP: clean up disk BEFORE installing deps |
| 53 | + # --------------------------------------------- |
| 54 | + - name: Free up disk space |
| 55 | + run: | |
| 56 | + echo "Disk usage BEFORE cleanup:" |
| 57 | + df -h |
| 58 | + # Safe: Clear APT cache and lists (can be regenerated) |
| 59 | + sudo apt-get clean |
| 60 | + sudo rm -rf /var/lib/apt/lists/* |
| 61 | + # Probably safe: Remove tools AIL doesn't need (check if exist first) |
| 62 | + [ -d /usr/share/dotnet ] && sudo rm -rf /usr/share/dotnet || true |
| 63 | + [ -d /opt/ghc ] && sudo rm -rf /opt/ghc || true |
| 64 | + [ -d /usr/local/lib/android ] && sudo rm -rf /usr/local/lib/android || true |
| 65 | + # Risky but needed: Remove hosted tool cache (contains Python, Node, etc.) |
| 66 | + # AIL workflow uses system Python, so this should be safe |
| 67 | + [ -d /opt/hostedtoolcache ] && sudo rm -rf /opt/hostedtoolcache || true |
| 68 | + echo "Disk usage AFTER cleanup:" |
| 69 | + df -h |
| 70 | + # --------------------------------------------- |
33 | 71 |
|
34 | 72 | # Runs a single command using the runners shell |
35 | 73 | - name: Install AIL |
|
0 commit comments