fix python-config #33
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| repository_dispatch: | |
| types: [run_build] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-15-intel, ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Ubuntu requirements | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y install autoconf automake bison flex gcc libelf-dev make texinfo libncurses5-dev patch python3 python-is-python3 subversion wget zlib1g-dev libtool-bin python3-dev bzip2 libgmp3-dev pkg-config | |
| - name: Install macOS requirements | |
| if: matrix.os == 'macos-15-intel' | |
| shell: arch -x86_64 bash -e {0} | |
| run: | | |
| if ! command -v brew >/dev/null 2>&1; then | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| fi | |
| eval "$(/usr/local/bin/brew shellenv bash)" | |
| brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo | |
| # python@3.11 may fail to link on GitHub's Intel macOS runners because /usr/local/bin/python3.11 already exists. | |
| # keg still installs, the build step uses brew --prefix plus local shims instead of relying on Homebrew's global symlinks | |
| brew install python@3.11 || true | |
| brew --prefix python@3.11 | |
| - name: Runs all the stages in the shell | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| mkdir $PWD/ps3dev | |
| export PS3DEV=$PWD/ps3dev | |
| export PSL1GHT=$PS3DEV | |
| export PATH=$PATH:$PS3DEV/bin | |
| export PATH=$PATH:$PS3DEV/ppu/bin | |
| export PATH=$PATH:$PS3DEV/spu/bin | |
| ./toolchain.sh | |
| - name: Runs all the stages in the shell | |
| if: matrix.os == 'macos-15-intel' | |
| shell: arch -x86_64 bash -e {0} | |
| run: | | |
| eval "$(/usr/local/bin/brew shellenv bash)" | |
| PY311_PREFIX="$(brew --prefix python@3.11)" | |
| # diagnostic - check if the runner is using correct python | |
| mkdir -p "$PWD/python-shims" | |
| ln -sf "$PY311_PREFIX/bin/python3.11" "$PWD/python-shims/python" | |
| ln -sf "$PY311_PREFIX/bin/python3.11" "$PWD/python-shims/python3" | |
| ln -sf "$PY311_PREFIX/bin/python3.11-config" "$PWD/python-shims/python-config" | |
| ln -sf "$PY311_PREFIX/bin/python3.11-config" "$PWD/python-shims/python3-config" | |
| export PATH="$PWD/python-shims:$PY311_PREFIX/bin:$PATH" | |
| python3 --version | |
| python3 -c "import distutils; print(distutils.__file__)" | |
| python3-config --prefix | |
| mkdir $PWD/ps3dev | |
| export PS3DEV=$PWD/ps3dev | |
| export PSL1GHT=$PS3DEV | |
| export PATH=$PATH:$PS3DEV/bin | |
| export PATH=$PATH:$PS3DEV/ppu/bin | |
| export PATH=$PATH:$PS3DEV/spu/bin | |
| ./toolchain.sh | |
| - name: Get short SHA | |
| id: slug | |
| run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | |
| - name: Compress ps3dev folder | |
| run: | | |
| tar -zcvf ps3dev.tar.gz ps3dev | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: ps3dev-${{ steps.slug.outputs.sha8 }}-${{matrix.os}} | |
| path: ps3dev.tar.gz |