Skip to content

Commit

Permalink
Add libffi build
Browse files Browse the repository at this point in the history
  • Loading branch information
qqfunc authored Aug 18, 2024
1 parent 4897dc4 commit 7c4ec91
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ jobs:
CC="xcrun --sdk ${{ matrix.build.sdk }} clang -target ${{ matrix.build.host }}"
CFLAGS="--sysroot=$(xcrun --sdk ${{ matrix.build.sdk }} --show-sdk-path) -mios-version-min=${{ needs.fetch.outputs.ios }}"
LDFLAGS="-isysroot $(xcrun --sdk ${{ matrix.build.sdk }} --show-sdk-path) -mios-version-min=${{ needs.fetch.outputs.ios }}"
- name: Build libffi
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
working-directory: libffi-${{ needs.fetch.outputs.ffi }}
run: |
make
make install
- name: Upload the libffi artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -192,6 +198,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
- name: Extract XZ Utils tarball
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: tar -xzf xz-${{ needs.fetch.outputs.xz }}.tar.gz
- name: Configure XZ Utils build
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Expand Down Expand Up @@ -261,19 +268,32 @@ jobs:
-- -b v${{ steps.pyver.outputs.py }} --depth=1
env:
GH_TOKEN: ${{ github.token }}
- name: Download the artifacts
- name: Download the bzip2 artifact
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/install
pattern: tmp-*

path: ${{ github.workspace }}/install/bz2
pattern: tmp-bz2-${{ matrix.build.sdk }}-${{ matrix.build.arch }}
- name: Download the libffi artifact
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/install/ffi
pattern: tmp-ffi-${{ matrix.build.sdk }}-${{ matrix.build.arch }}
- name: Download the XZ Utils artifact
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/install/xz
pattern: tmp-xz-${{ matrix.build.sdk }}-${{ matrix.build.arch }}
- name: Add iOS/Resources/bin to PATH
working-directory: cpython
run: echo "$(pwd)/iOS/Resources/bin" >> $GITHUB_PATH
- name: Configure
working-directory: cpython
run: >
./configure
BZIP2_CFLAGS="-I${{ github.workspace }}/install/bz2/include"
BZIP2_LIBS="-L${{ github.workspace }}/install/bz2/lib -lbz2"
LIBFFI_CFLAGS="-I${{ github.workspace }}/install/ffi/include"
LIBFFI_LIBS="-L${{ github.workspace }}/install/ffi/lib -lffi"
LIBLZMA_CFLAGS="-I${{ github.workspace }}/install/xz/include"
LIBLZMA_LIBS="-L${{ github.workspace }}/install/xz/lib -llzma"
--enable-framework="./iOS/Frameworks/main/"
Expand Down

0 comments on commit 7c4ec91

Please sign in to comment.