|
| 1 | +name: Testing-1309 |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - test-973 |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + latest-latest-in-practice-26-on-host-and-in-container: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + container: ubuntu:latest |
| 13 | + steps: |
| 14 | + - name: Show host / container info |
| 15 | + run: | |
| 16 | + echo "=== /etc/os-release ===" |
| 17 | + cat /etc/os-release || true |
| 18 | + echo "=== uname -a ===" |
| 19 | + uname -a |
| 20 | + echo "=== whoami ===" |
| 21 | + whoami |
| 22 | + echo "=== RUNNER_OS / RUNNER_ARCH ===" |
| 23 | + echo "RUNNER_OS=$RUNNER_OS" |
| 24 | + echo "RUNNER_ARCH=$RUNNER_ARCH" |
| 25 | + - uses: actions/checkout@v6 |
| 26 | + |
| 27 | + - name: Clear pre-mounted tool cache |
| 28 | + run: | |
| 29 | + echo "Before:" |
| 30 | + ls /__t/Python/ || echo "no Python dir" |
| 31 | + rm -rf /__t/Python |
| 32 | + echo "After:" |
| 33 | + ls /__t/Python/ || echo "cleared" |
| 34 | + - uses: actions/setup-python@v6 |
| 35 | + with: |
| 36 | + python-version: '3.13' |
| 37 | + |
| 38 | + - name: Verify Python |
| 39 | + run: | |
| 40 | + which python |
| 41 | + python --version |
| 42 | + python -c "import sys, platform; print(sys.executable); print(platform.platform())" |
| 43 | + test-26-on-host-and-24-in-container: |
| 44 | + runs-on: [self-hosted] |
| 45 | + container: ubuntu:24.04 |
| 46 | + steps: |
| 47 | + - name: Show host / container info |
| 48 | + run: | |
| 49 | + echo "=== /etc/os-release ===" |
| 50 | + cat /etc/os-release || true |
| 51 | + echo "=== uname -a ===" |
| 52 | + uname -a |
| 53 | + echo "=== whoami ===" |
| 54 | + whoami |
| 55 | + echo "=== RUNNER_OS / RUNNER_ARCH ===" |
| 56 | + echo "RUNNER_OS=$RUNNER_OS" |
| 57 | + echo "RUNNER_ARCH=$RUNNER_ARCH" |
| 58 | + - uses: actions/checkout@v6 |
| 59 | + |
| 60 | + - name: Ensure Sudo is Installed |
| 61 | + run: | |
| 62 | + if ! command -v sudo &> /dev/null; then |
| 63 | + echo "sudo could not be found. Installing..." |
| 64 | + apt-get update && apt-get install -y sudo |
| 65 | + fi |
| 66 | + - name: Fix pip cache permissions |
| 67 | + run: sudo chown -R $(whoami) /github/home |
| 68 | + # - name: Clear cache |
| 69 | + # run: | |
| 70 | + # rm -rf "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old" |
| 71 | + # mkdir -p "${{ runner.tool_cache }}" |
| 72 | + - name: Clear tool cache |
| 73 | + run: | |
| 74 | + rm -rf /__w/_tool/Python |
| 75 | + echo "Verify cleared:" |
| 76 | + ls -la /__w/_tool/ |
| 77 | + - uses: actions/setup-python@v6 |
| 78 | + with: |
| 79 | + python-version: '3.13' |
| 80 | + |
| 81 | + - name: Verify Python |
| 82 | + run: | |
| 83 | + which python |
| 84 | + python --version |
| 85 | + python -c "import sys, platform; print(sys.executable); print(platform.platform())" |
0 commit comments