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

Attempt to use github workflow #8

Merged
merged 35 commits into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5df0078
Attempt to use github workflow
simoncozens Jun 15, 2021
e276a15
Check out more
simoncozens Jun 15, 2021
99cb6e7
Alter permissions
simoncozens Jun 15, 2021
02b2b72
Fail quickly, fail often
simoncozens Jun 15, 2021
85b6b24
Wrong multi build path
simoncozens Jun 15, 2021
80bc638
Give cibuildwheel a go instead
simoncozens Jun 15, 2021
319669a
Upgrade pkgconfig etc before build
simoncozens Jun 15, 2021
b8dbf62
Install bison and flex
simoncozens Jun 15, 2021
d899d5a
My tar is better than your tar
simoncozens Jun 15, 2021
8f67a7f
Build all the things!
simoncozens Jun 15, 2021
ed9eef2
OS X additions
simoncozens Jun 15, 2021
7796333
Add to path
simoncozens Jun 15, 2021
f976777
We will want to repair wheels but I want to check them first
simoncozens Jun 15, 2021
96b87ca
Build one python for testing
simoncozens Jun 15, 2021
8c1f3af
Repair definitely needed
simoncozens Jun 15, 2021
83e3722
Something wrong with delocate
simoncozens Jun 15, 2021
3d51f05
No, the wheel is fine, with all ttfah built in. Build some more!
simoncozens Jun 15, 2021
dafc05a
Looks like Python3.9 would be enough?
simoncozens Jun 15, 2021
2583c20
Apparently building on OS11 may work?
simoncozens Jun 15, 2021
f6dcbaf
Build universal dependents
simoncozens Jun 15, 2021
73a5401
Stay on 10.15 for now
simoncozens Jun 15, 2021
342b132
Typo
simoncozens Jun 15, 2021
8c6611d
Test again to see if we have access to the macOS 11 runner
simoncozens Jul 12, 2021
66d8962
Build all the things again
simoncozens Jul 12, 2021
49d13a2
Remove old env variables
simoncozens Jul 12, 2021
b3949c1
Remove redundant build script
simoncozens Jul 12, 2021
b17a2d6
Only build once on Mac
simoncozens Jul 12, 2021
4372f32
Fix path on Windows
simoncozens Jul 12, 2021
4c6bd2a
De-powershell
simoncozens Jul 12, 2021
3cfe2b6
Try getting gnulib manually on windows
simoncozens Jul 12, 2021
027dfc7
Reindent
simoncozens Jul 12, 2021
b2547f8
Fix temporary path
simoncozens Jul 12, 2021
4d04994
Debashify
simoncozens Jul 12, 2021
262fbd0
Don’t do anything on Windows because we still have Appveyor for that
simoncozens Aug 4, 2021
3ead3f7
Update badges
simoncozens Aug 4, 2021
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
32 changes: 32 additions & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this build.sh shell script is no longer used after you switched from muiltibuild to cibuildwheel

# these cause a conflict with built webp and libtiff,
# curl from brew requires zstd, use system curl
brew remove --ignore-dependencies webp zstd xz libtiff curl
fi

if [[ "$MB_PYTHON_VERSION" == pypy3* ]]; then
if [[ "$TRAVIS_OS_NAME" != "macos-latest" ]]; then
MB_ML_VER="2010"
DOCKER_TEST_IMAGE="multibuild/xenial_$PLAT"
else
MB_PYTHON_OSX_VER="10.9"
fi
fi

echo "::group::Install a virtualenv"
source ci/multibuild/common_utils.sh
source ci/multibuild/travis_steps.sh
python3 -m pip install virtualenv
before_install
echo "::endgroup::"

echo "::group::Build wheel"
build_wheel $REPO_DIR $PLAT
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
echo "::endgroup::"

if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
echo "::group::Test wheel"
install_run $PLAT
echo "::endgroup::"
fi
49 changes: 49 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Wheels

on: [push, pull_request]

env:
REPO_DIR: .
BUILD_DEPENDS: ""
TEST_DEPENDS: "pytest pytest-cov"
WHEEL_SDIR: wheelhouse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these environment variables are for a multibuild setup, not for cibuildwheel, you should try see what are the equivalent ones that cibuildwheel reads


jobs:
build:
name: Build wheel ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "macos-10.15" ]
env:
BUILD_COMMIT: HEAD
CIBW_BEFORE_ALL_LINUX: sh ci/docker-fixes.sh
CIBW_BEFORE_ALL_MACOS: sh ci/osx-fixes.sh
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_SKIP: "cp38-macosx* cp37-macosx*"
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Update path
if: startsWith(matrix.os, 'macos')
run: |
echo "/usr/local/opt/libtool/bin" >> $GITHUB_PATH
echo "/usr/local/opt/ragel/bin" >> $GITHUB_PATH
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH
echo "/usr/local/opt/automake/bin" >> $GITHUB_PATH
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.0.0a2

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/*.whl
80 changes: 0 additions & 80 deletions .travis.yml

This file was deleted.

63 changes: 63 additions & 0 deletions ci/docker-fixes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
curl http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz -L -o pkg-config.tar.gz && \
mkdir pkg-config && \
tar -zxf pkg-config.tar.gz -C pkg-config --strip-components 1 && \
cd pkg-config && \
./configure --prefix=/usr/local --with-internal-glib --disable-host-tool && \
make && \
make install

curl ftp://ftp.gnu.org/gnu/m4/m4-latest.tar.gz -L -o m4.tar.gz && \
mkdir m4 && \
tar -zxf m4.tar.gz -C m4 --strip-components 1 && \
cd m4 && \
./configure --prefix=/usr/local && \
make && \
make install

curl -L http://install.perlbrew.pl | bash && \
. ~/perl5/perlbrew/etc/bashrc && \
echo '. /root/perl5/perlbrew/etc/bashrc' >> /etc/bashrc && \
perlbrew install perl-5.29.0 -j 4 -n && \
perlbrew switch perl-5.29.0

curl http://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.gz -L -o automake.tar.gz && \
mkdir automake && \
tar -zxf automake.tar.gz -C automake --strip-components 1 && \
cd automake && \
./configure --prefix=/usr/local && \
make && \
make install

curl http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz -L -o autoconf.tar.gz && \
mkdir autoconf && \
tar -zxf autoconf.tar.gz -C autoconf --strip-components 1 && \
cd autoconf && \
./configure --prefix=/usr/local && \
make && \
make install

curl http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz -L -o libtool.tar.gz && \
mkdir libtool && \
tar -zxf libtool.tar.gz -C libtool --strip-components 1 && \
cd libtool && \
./configure --prefix=/usr/local && \
make && \
make install

# bison
curl https://ftp.gnu.org/gnu/bison/bison-3.7.6.tar.xz -L -o bison.tar.xz && \
mkdir bison && \
xz --decompress --stdout bison.tar.xz | tar xf - -C bison --strip-components 1 && \
cd bison && \
./configure --prefix=/usr/local && \
make && \
make install

# flex
curl https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz -L -o flex.tar.gz && \
mkdir flex && \
tar -zxf flex.tar.gz -C flex --strip-components 1 && \
cd flex && \
./configure --prefix=/usr/local && \
make && \
make install
1 change: 1 addition & 0 deletions ci/osx-fixes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew install libtool ragel bison flex automake
6 changes: 3 additions & 3 deletions src/c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ else
# on macOS, we want a 64-bit only lib targeting >= 10.9, since harfbuzz >= 2.4
# requires c++11
MACOSX_DEPLOYMENT_TARGET ?= 10.9
CFLAGS += -m64 -arch x86_64 -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
CXXFLAGS += -m64 -arch x86_64 -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
LDFLAGS += -m64 -arch x86_64 -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
CFLAGS += -m64 -arch x86_64 -arch arm64 -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
CXXFLAGS += -m64 -arch x86_64 -arch arm64 -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
LDFLAGS += -m64 -arch x86_64 -arch arm64 -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
else ifeq ($(shell uname -s), Linux)
LIBTTFAUTOHINT := "$(LIB_NAME).so"
endif
Expand Down