Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smaller distributions #7

Merged
merged 7 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,19 @@ jobs:

- name: Upload artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: python
path: ./*python*.tar.gz
path: ./python*.tar.gz

- name: Upload artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: build-python
path: ./build-python*.tar.gz

- name: Test python in clean environment
if: false
uses: addnab/docker-run-action@v3
with:
image: ${{ steps.parse_image.outputs.image }}
Expand Down Expand Up @@ -104,11 +111,19 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: python
path: ./*python*.tar.gz
path: ./python*.tar.gz

- name: Upload artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: build-python
path: ./build-python*.tar.gz

test_windows:
name: Windows ${{ inputs.python_version }} x86_64 (test)
needs: build_windows
if: false
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -146,11 +161,19 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: python
path: ./*python*.tar.gz
path: ./python*.tar.gz

- name: Upload artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: build-python
path: ./build-python*.tar.gz

test_macos:
name: MacOS ${{ inputs.python_version }} universal2 (test)
needs: build_macos
if: false
runs-on: macos-latest

steps:
Expand Down
6 changes: 5 additions & 1 deletion scripts/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ cmake \
-DBUILD_LIBPYTHON_SHARED=ON \
"${additionalparams[@]}" \
-DBUILD_TESTING=ON \
-DINSTALL_TEST=OFF \
-DINSTALL_MANUAL=OFF \
../python-cmake-buildsystem
make -j8
make install
Expand Down Expand Up @@ -158,7 +160,9 @@ echo "::endgroup::"
echo "::group::Compress output"

cd ..
python3 -m pip install pyclean
python3 -m pyclean -v python-install
mv python-install python-${PYTHON_FULL_VER}-linux-${ARCH}
tar -czf /work/python-${PYTHON_FULL_VER}-linux-${ARCH}.tar.gz python-${PYTHON_FULL_VER}-linux-${ARCH}

echo "::endgroup::"
echo "::endgroup::"
4 changes: 4 additions & 0 deletions scripts/build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ cmake \
-DBUILD_EXTENSIONS_AS_BUILTIN=OFF \
-DBUILD_LIBPYTHON_SHARED=ON \
-DBUILD_TESTING=ON \
-DINSTALL_TEST=OFF \
-DINSTALL_MANUAL=OFF \
-DOPENSSL_ROOT_DIR:PATH=${WORKDIR}/deps/openssl \
-DSQLite3_INCLUDE_DIR:PATH=${WORKDIR}/deps/sqlite3/include \
-DSQLite3_LIBRARY:FILEPATH=${WORKDIR}/deps/sqlite3/lib/libsqlite3.a \
Expand Down Expand Up @@ -221,6 +223,8 @@ cd ${WORKDIR}
cd python-build
tar -czf ../build-python-${PYTHON_FULL_VER}-darwin-${ARCH}.tar.gz .
cd ${WORKDIR}
python3 -m pip install pyclean
python3 -m pyclean -v python-install
mv python-install python-${PYTHON_FULL_VER}-darwin-${ARCH}
tar -czf python-${PYTHON_FULL_VER}-darwin-${ARCH}.tar.gz python-${PYTHON_FULL_VER}-darwin-${ARCH}

Expand Down
8 changes: 6 additions & 2 deletions scripts/build_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ cmake \
-DBUILD_EXTENSIONS_AS_BUILTIN=OFF \
-DBUILD_LIBPYTHON_SHARED=ON \
-DBUILD_TESTING=ON \
-DINSTALL_TEST=OFF \
-DINSTALL_MANUAL=OFF \
-DBUILD_WININST=OFF \
-DINSTALL_WINDOWS_TRADITIONAL:BOOL=OFF \
-DOPENSSL_ROOT_DIR:PATH=${WORKDIR}/deps/openssl \
Expand All @@ -152,8 +154,8 @@ cmake \
-DLibFFI_INCLUDE_DIR:PATH=${WORKDIR}/deps/libffi/include \
-DLibFFI_LIBRARY:FILEPATH=${WORKDIR}/deps/libffi/lib/ffi_static.lib \
../python-cmake-buildsystem
cmake --build . --config Release -- /verbosity:detailed /property:Configuration=Release
cmake --build . --target INSTALL -- /verbosity:detailed /property:Configuration=Release
cmake --build . --config Release -- /property:Configuration=Release
cmake --build . --target INSTALL -- /property:Configuration=Release
cd ${WORKDIR}

# Need to bundle openssl with the executable
Expand Down Expand Up @@ -186,6 +188,8 @@ cd ${WORKDIR}
cd python-build
tar -czf ../build-python-${PYTHON_FULL_VER}-windows-${ARCH}.tar.gz .
cd ${WORKDIR}
python3 -m pip install pyclean
python3 -m pyclean -v python-install
mv python-install python-${PYTHON_FULL_VER}-windows-${ARCH}
tar -czf python-${PYTHON_FULL_VER}-windows-${ARCH}.tar.gz python-${PYTHON_FULL_VER}-windows-${ARCH}

Expand Down
2 changes: 1 addition & 1 deletion scripts/patch_libpython.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -ex
set -e

libpython=$1
python=$2
Expand Down
Loading