Skip to content

Commit

Permalink
chore: Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shdwmtr committed Aug 7, 2024
1 parent b220ad2 commit 84c1f7e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 18 deletions.
51 changes: 35 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,43 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install pyenv
- name: Install dependencies
run: |
curl https://pyenv.run | bash
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv install 3.11.8
pyenv global 3.11.8
python --version
shell: bash

- name: Verify Python version
run: python --version
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y \
build-essential \
zlib1g-dev:i386 \
libncurses5-dev:i386 \
libgdbm-dev:i386 \
libnss3-dev:i386 \
libssl-dev:i386 \
libreadline-dev:i386 \
libffi-dev:i386 \
wget \
curl \
libbz2-dev:i386 \
libsqlite3-dev:i386 \
liblzma-dev:i386 \
gcc-multilib \
g++-multilib
- name: Download Python 3.11.8 source
run: |
wget https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz
tar -xf Python-3.11.8.tgz
- name: (Setup) Construct Python Environment
run: bash scripts/ci/posix/setup-python.sh /home/runner/env/ext/data/cache
- name: Configure and build Python 3.11.8 (32-bit)
run: |
cd Python-3.11.8
sudo CFLAGS="-m32" LDFLAGS="-m32" ./configure --prefix=$HOME/.millennium/ext/data/cache --enable-optimizations
make -j$(nproc)
sudo make altinstall
- name: Verify installation
run: |
rm -rf $HOME/.millennium/ext/data/cache/lib/python3.11/test/
$HOME/.millennium/ext/data/cache/bin/python3.11 --version
- name: (Generator) Install CMake
uses: jwlawson/actions-setup-cmake@v2
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ include_directories(${LIBGIT2_INCLUDE_DIRS})
if(WIN32)
include_directories(${CMAKE_SOURCE_DIR}/vendor/python/include)
elseif(UNIX)
include_directories("/usr/local/python-3.11.8/include/python3.11")
include_directories("$ENV{HOME}/.millennium/ext/data/cache/include/python3.11/")
endif()

set(SOURCE_FILES
Expand Down Expand Up @@ -159,6 +159,6 @@ if(WIN32)
endif()
elseif(UNIX)
target_link_libraries(Millennium
"/home/shadow/.millennium/ext/data/cache/lib/libpython-3.11.8.so"
"$ENV{HOME}/.millennium/ext/data/cache/lib/libpython-3.11.8.so"
)
endif()

0 comments on commit 84c1f7e

Please sign in to comment.