|
| 1 | +name: CI-ps2dev-migration-probe |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - '.github/workflows/ci-ps2dev-migration-probe.yml' |
| 7 | + - '.github/workflows/compilation.yml' |
| 8 | + - 'Makefile' |
| 9 | + - '**/*.mk' |
| 10 | + workflow_dispatch: |
| 11 | + |
| 12 | +jobs: |
| 13 | + build-probe: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - container_image: ps2max/dev:v20250725-2 |
| 20 | + label: ps2max-dev-v20250725-2 |
| 21 | + - container_image: ps2dev/ps2dev:latest |
| 22 | + label: ps2dev-latest |
| 23 | + container: ${{ matrix.container_image }} |
| 24 | + steps: |
| 25 | + - name: git checkout |
| 26 | + uses: actions/checkout@v6 |
| 27 | + |
| 28 | + - name: Install diagnostic host dependencies (Alpine only) |
| 29 | + run: | |
| 30 | + if command -v apk >/dev/null 2>&1; then |
| 31 | + # Consolidated ps2dev Alpine prerequisites: build tools, scripting, packaging, and gcc runtime libs. |
| 32 | + apk add --no-cache \ |
| 33 | + bash \ |
| 34 | + make \ |
| 35 | + git \ |
| 36 | + zip \ |
| 37 | + unzip \ |
| 38 | + tar \ |
| 39 | + gzip \ |
| 40 | + xz \ |
| 41 | + python3 \ |
| 42 | + py3-pip \ |
| 43 | + py3-yaml \ |
| 44 | + gmp \ |
| 45 | + mpfr4 \ |
| 46 | + mpc1 \ |
| 47 | + perl \ |
| 48 | + cmake \ |
| 49 | + pkgconf \ |
| 50 | + coreutils \ |
| 51 | + findutils \ |
| 52 | + grep \ |
| 53 | + sed \ |
| 54 | + gawk \ |
| 55 | + diffutils |
| 56 | + fi |
| 57 | +
|
| 58 | + - name: Mark workspace safe and fetch history |
| 59 | + run: | |
| 60 | + if command -v git >/dev/null 2>&1; then |
| 61 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
| 62 | + git fetch --prune --unshallow || true |
| 63 | + else |
| 64 | + echo "git not available before dependency install" |
| 65 | + fi |
| 66 | +
|
| 67 | + - name: Capture fingerprint and SDK snapshot |
| 68 | + run: | |
| 69 | + set +e |
| 70 | + { |
| 71 | + echo "===== /etc/os-release =====" |
| 72 | + cat /etc/os-release || true |
| 73 | + echo "===== uname -a =====" |
| 74 | + uname -a || true |
| 75 | + echo "===== env | sort =====" |
| 76 | + env | sort || true |
| 77 | + echo "===== PS2 vars =====" |
| 78 | + echo "PS2DEV=${PS2DEV}" |
| 79 | + echo "PS2SDK=${PS2SDK}" |
| 80 | + echo "GSKIT=${GSKIT}" |
| 81 | + echo "PATH=${PATH}" |
| 82 | + echo "===== host tools =====" |
| 83 | + which sh bash make git zip unzip tar gzip xz python3 perl cmake pkg-config gawk sed grep find || true |
| 84 | + echo "===== cross tools =====" |
| 85 | + which mips64r5900el-ps2-elf-gcc || true |
| 86 | + which mipsel-none-elf-gcc || true |
| 87 | + echo "===== cross tool versions =====" |
| 88 | + mips64r5900el-ps2-elf-gcc --version || true |
| 89 | + mipsel-none-elf-gcc --version || true |
| 90 | + echo "===== PS2SDK tree =====" |
| 91 | + ls -la "$PS2DEV" || true |
| 92 | + ls -la "$PS2SDK" || true |
| 93 | + ls -la "$GSKIT" || true |
| 94 | + echo "===== Defs.make =====" |
| 95 | + if test -f "$PS2SDK/Defs.make"; then |
| 96 | + sed -n '1,160p' "$PS2SDK/Defs.make" |
| 97 | + else |
| 98 | + echo "Missing: $PS2SDK/Defs.make" |
| 99 | + fi |
| 100 | + echo "===== Makefile variables =====" |
| 101 | + if test -f Makefile; then |
| 102 | + grep -E '^(PS2DEV|PS2SDK|GSKIT|EE_|IOP_|DVP_|CC|CFLAGS|LDFLAGS|LIBS)\s*[:?+]?=' Makefile || true |
| 103 | + fi |
| 104 | + } | tee env-fingerprint.log |
| 105 | +
|
| 106 | + find "$PS2SDK" -maxdepth 4 \( -name '*.a' -o -name '*.h' -o -name '*.irx' -o -name '*.elf' \) -print 2>/dev/null | sort > ps2sdk-snapshot.log || true |
| 107 | +
|
| 108 | + - name: Build (same command as production workflow) |
| 109 | + run: | |
| 110 | + make --trace clean release 2>&1 | tee build.log |
| 111 | +
|
| 112 | + - name: Upload diagnostics |
| 113 | + if: ${{ always() }} |
| 114 | + uses: actions/upload-artifact@v6 |
| 115 | + with: |
| 116 | + name: diagnostics-${{ matrix.label }} |
| 117 | + path: | |
| 118 | + env-fingerprint.log |
| 119 | + ps2sdk-snapshot.log |
| 120 | + build.log |
0 commit comments