Skip to content

Commit 873bbe2

Browse files
committed
0.1.6
1 parent 4e31614 commit 873bbe2

File tree

1 file changed

+25
-82
lines changed

1 file changed

+25
-82
lines changed

.github/workflows/build-cache-deps.yml

Lines changed: 25 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,44 @@ jobs:
88
strategy:
99
fail-fast: true
1010
matrix:
11-
include:
12-
- runs-on: ubuntu-latest
13-
cibw-arch: manylinux_x86_64
14-
many-linux: manylinux2014
15-
- runs-on: ubuntu-latest
16-
cibw-arch: manylinux_aarch64
17-
many-linux: manylinux2014
18-
- runs-on: ubuntu-latest
19-
cibw-arch: manylinux_x86_64
20-
many-linux: musllinux_1_1
21-
- runs-on: ubuntu-latest
22-
cibw-arch: manylinux_aarch64
23-
many-linux: musllinux_1_1
24-
name: ${{ matrix.cibw-arch }} • ${{ matrix.many-linux }}
25-
runs-on: ${{ matrix.runs-on }}
11+
cibw_buildlinux: [ manylinux, musllinux ]
12+
cibw_arch: [ "x86_64", "aarch64" ]
13+
name: ${{ matrix.cibw_arch }} • ${{ matrix.cibw_buildlinux }}
14+
runs-on: ubuntu-20.04
2615
env:
2716
BUILD_STUFF: "/build-stuff"
2817
SCRIPTS: "./build_scripts/linux/"
29-
KEY_HEAD: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ matrix.many-linux }}
18+
BUILD_ORDER: "pkg-config,nasm,libde265,aom,libheif,libffi"
19+
KEY_HEAD: ${{ matrix.cibw_arch }}-${{ matrix.cibw_buildlinux }}
3020

3121
steps:
32-
- name: Checkout code
33-
uses: actions/checkout@v2
22+
- uses: actions/checkout@v2
23+
- name: Set up QEMU
24+
if: matrix.cibw_arch == 'aarch64'
25+
uses: docker/setup-qemu-action@v1
3426
with:
35-
submodules: recursive
27+
platforms: arm64
3628

37-
- name: manylinux2014 preparations
38-
if: matrix.many-linux == 'manylinux2014'
29+
- name: Preparations
3930
run: |
4031
sudo mkdir "$BUILD_STUFF" && sudo chmod 777 "$BUILD_STUFF"
41-
BUILD_STUFF_CMD="&& sh $(echo "$BUILD_ORDER" | sed 's/,/.sh \&\& sh /g').sh"
32+
echo BUILD_STUFF_CMD="&& sh $(echo "$BUILD_ORDER" | sed 's/,/.sh \&\& sh /g').sh" >> $GITHUB_ENV
33+
python3 -m pip install cibuildwheel twine
34+
35+
- name: manylinux2014 preparations
36+
if: matrix.cibw_buildlinux == 'manylinux'
37+
run: |
4238
echo BUILD_COMMAND="yum install -y -q $OS_PACKAGES && set -ex && cd $SCRIPTS $BUILD_STUFF_CMD" >> $GITHUB_ENV
4339
echo LDCONFIG_ARG="" >> $GITHUB_ENV
4440
env:
45-
BUILD_ORDER: "pkg-config,nasm,libde265,aom,libheif,libffi"
4641
OS_PACKAGES: "wget libtool git-all"
4742

4843
- name: musllinux_1_1 preparations
49-
if: matrix.many-linux == 'musllinux_1_1'
44+
if: matrix.cibw_buildlinux == 'musllinux'
5045
run: |
51-
sudo mkdir "$BUILD_STUFF" && sudo chmod 777 "$BUILD_STUFF"
52-
BUILD_STUFF_CMD="&& sh $(echo "$BUILD_ORDER" | sed 's/,/.sh \&\& sh /g').sh"
5346
echo BUILD_COMMAND="apk --no-cache add -q $OS_PACKAGES && set -ex && cd $SCRIPTS $BUILD_STUFF_CMD" >> $GITHUB_ENV
5447
echo LDCONFIG_ARG="/usr/lib" >> $GITHUB_ENV
5548
env:
56-
BUILD_ORDER: "nasm,aom,libffi,pkg-config,libde265,libheif"
5749
OS_PACKAGES: "sudo py3-pip python3-dev libtool git \
5850
freetype-dev fribidi-dev harfbuzz-dev jpeg-dev lcms2-dev openjpeg-dev tiff-dev zlib-dev"
5951

@@ -64,34 +56,6 @@ jobs:
6456
env:
6557
NAME: pkg-config
6658

67-
# - uses: actions/cache@v2
68-
# with:
69-
# path: ${{ env.BUILD_STUFF }}/${{ env.NAME }}
70-
# key: ${{ env.KEY_HEAD }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }}
71-
# env:
72-
# NAME: cmake
73-
74-
# - uses: actions/cache@v2
75-
# with:
76-
# path: ${{ env.BUILD_STUFF }}/${{ env.NAME }}
77-
# key: ${{ env.KEY_HEAD }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }}
78-
# env:
79-
# NAME: autoconf
80-
81-
# - uses: actions/cache@v2
82-
# with:
83-
# path: ${{ env.BUILD_STUFF }}/${{ env.NAME }}
84-
# key: ${{ env.KEY_HEAD }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }}
85-
# env:
86-
# NAME: automake
87-
88-
# - uses: actions/cache@v2
89-
# with:
90-
# path: ${{ env.BUILD_STUFF }}/${{ env.NAME }}
91-
# key: ${{ env.KEY_HEAD }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }}
92-
# env:
93-
# NAME: libressl
94-
9559
- uses: actions/cache@v2
9660
with:
9761
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }}
@@ -127,38 +91,17 @@ jobs:
12791
env:
12892
NAME: libffi
12993

130-
- name: Set up QEMU
131-
if: matrix.cibw-arch == 'manylinux_aarch64'
132-
uses: docker/setup-qemu-action@v1
133-
with:
134-
platforms: arm64
135-
136-
- name: x64 linux pre configure enviroment
137-
if: matrix.cibw-arch == 'manylinux_x86_64'
138-
run: |
139-
echo "CIBW_ARCHS=x86_64" >> $GITHUB_ENV
140-
echo "CIBW_BUILD=cp38-manylinux_x86_64" >> $GITHUB_ENV
141-
142-
- name: Arm linux pre configure enviroment
143-
if: matrix.cibw-arch == 'manylinux_aarch64'
144-
run: |
145-
echo "CIBW_ARCHS=aarch64" >> $GITHUB_ENV
146-
echo "CIBW_BUILD=cp38-manylinux_aarch64" >> $GITHUB_ENV
147-
14894
- name: Start test build
149-
run: |
150-
python3 -m pip install cibuildwheel twine
151-
cibuildwheel
95+
run: cibuildwheel
15296
env:
97+
CIBW_BUILD: ${{ format('cp38-{0}*', matrix.cibw_buildlinux) }}
98+
CIBW_ARCHS: ${{ matrix.cibw_arch }}
99+
CIBW_BEFORE_ALL_LINUX: ${{ env.BUILD_COMMAND }}
100+
CIBW_ENVIRONMENT_PASS_LINUX: BUILD_STUFF LDCONFIG_ARG
153101
CIBW_TEST_SKIP: "*"
154-
CIBW_BEFORE_ALL: ${{ env.BUILD_COMMAND }}
155-
CIBW_ENVIRONMENT: BUILD_STUFF=${{ env.BUILD_STUFF }} LDCONFIG_ARG=${{ env.LDCONFIG_ARG }}
156-
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.many-linux }}
157-
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.many-linux }}
158102

159103
- name: Check builded wheel
160-
run: |
161-
twine check wheelhouse/*
104+
run: twine check wheelhouse/*
162105

163106
- name: Upload builded wheel
164107
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)