-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New GitHub Actions for building with cache using for linux binary whe…
…els.
- Loading branch information
Showing
17 changed files
with
461 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
name: Build cache for dependecies | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
dependencies_linux: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
include: | ||
- runs-on: ubuntu-latest | ||
cibw-arch: manylinux_x86_64 | ||
- runs-on: ubuntu-latest | ||
cibw-arch: manylinux_aarch64 | ||
name: Dependecies • ${{ matrix.cibw-arch }} | ||
runs-on: ${{ matrix.runs-on }} | ||
env: | ||
BUILD_STUFF: "/build-stuff" | ||
SCRIPTS: "./build_scripts/linux/" | ||
BUILD_ORDER: "pkg-config,cmake,autoconf,automake,libressl,nasm,libde265,aom,libheif,libffi" | ||
OS_PACKAGES: "wget libtool git-all" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Make preparations | ||
run: | | ||
sudo mkdir "$BUILD_STUFF" && sudo chmod 777 "$BUILD_STUFF" | ||
BUILD_STUFF_CMD="&& sh $(echo "$BUILD_ORDER" | sed 's/,/.sh \&\& sh /g').sh" | ||
echo BUILD_COMMAND="yum install -y -q $OS_PACKAGES && set -ex && cd $SCRIPTS $BUILD_STUFF_CMD" >> $GITHUB_ENV | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: pkg-config | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: cmake | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: autoconf | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: automake | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: libressl | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: nasm | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: libde265 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: aom | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: libheif | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.BUILD_STUFF }}/${{ env.NAME }} | ||
key: ${{ matrix.runs-on }}-${{ matrix.cibw-arch }}-${{ hashFiles(format('{0}{1}.sh', env.SCRIPTS, env.NAME)) }} | ||
env: | ||
NAME: libffi | ||
|
||
- name: Set up QEMU | ||
if: matrix.cibw-arch == 'manylinux_aarch64' | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: x64 linux pre configure enviroment | ||
if: matrix.cibw-arch == 'manylinux_x86_64' | ||
run: | | ||
echo "CIBW_ARCHS=x86_64" >> $GITHUB_ENV | ||
echo "CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014" >> $GITHUB_ENV | ||
echo "CIBW_BUILD=cp38-manylinux_x86_64" >> $GITHUB_ENV | ||
- name: Arm linux pre configure enviroment | ||
if: matrix.cibw-arch == 'manylinux_aarch64' | ||
run: | | ||
echo "CIBW_ARCHS=aarch64" >> $GITHUB_ENV | ||
echo "CIBW_BUILD=cp38-manylinux_aarch64" >> $GITHUB_ENV | ||
- name: Start test build | ||
run: | | ||
python -m pip install cibuildwheel twine | ||
cibuildwheel | ||
env: | ||
CIBW_TEST_SKIP: "*" | ||
CIBW_BEFORE_ALL: ${{ env.BUILD_COMMAND }} | ||
CIBW_ENVIRONMENT: BUILD_STUFF=${{ env.BUILD_STUFF }} | ||
|
||
- name: Check builded wheel | ||
run: | | ||
twine check wheelhouse/* | ||
- name: Upload builded wheel | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: wheelhouse/*.whl | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
VERSION="bb35ba9148543f22ba7d8642e4fbd29ae301f5dc" | ||
NAME=$(basename "$BASH_SOURCE" | cut -f 1 -d '.') | ||
URL="https://aomedia.googlesource.com/aom/+archive/$VERSION.tar.gz" | ||
cd "/host/$BUILD_STUFF" || exit 2 | ||
if [[ -d "$NAME" ]]; then | ||
echo "Cache found for lib$NAME, install it..." | ||
cd "$NAME/build" || exit 102 | ||
else | ||
echo "No cache found for lib$NAME, build it..." | ||
mkdir "$NAME" "$NAME/build" "$NAME/$NAME" && cd "$NAME" || exit 104 | ||
wget -q --no-check-certificate -O "$NAME.tar.gz" "$URL" \ | ||
&& tar xf "$NAME.tar.gz" -C "$NAME" \ | ||
&& rm -f "$NAME.tar.gz" \ | ||
&& cd "./build" \ | ||
&& cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=1 "../$NAME" \ | ||
&& make -j4 | ||
fi | ||
make install && ldconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
VERSION="2.71" | ||
NAME=$(basename "$BASH_SOURCE" | cut -f 1 -d '.') | ||
URL="https://ftp.gnu.org/gnu/autoconf/$NAME-$VERSION.tar.gz" | ||
cd "/host/$BUILD_STUFF" || exit 2 | ||
if [[ -d "$NAME" ]]; then | ||
echo "Cache found for $NAME, install it..." | ||
cd "$NAME" || exit 102 | ||
else | ||
echo "No cache found for $NAME, build it..." | ||
mkdir "$NAME" | ||
wget -q --no-check-certificate -O "$NAME.tar.gz" "$URL" \ | ||
&& tar xf "$NAME.tar.gz" -C "$NAME" --strip-components 1 \ | ||
&& rm -f "$NAME.tar.gz" \ | ||
&& cd "$NAME" \ | ||
&& ./configure \ | ||
&& make -j4 | ||
fi | ||
make install \ | ||
&& autoconf --version |
Oops, something went wrong.