diff options
author | Sayed Adel <seiko@imavr.com> | 2021-10-27 10:41:21 +0200 |
---|---|---|
committer | Sayed Adel <seiko@imavr.com> | 2021-10-28 08:30:31 +0200 |
commit | 5e25f1aff21c346d950bbef1872364c8621253a6 (patch) | |
tree | 093ae8136f007dcf262dfe24498d119bc0560229 | |
parent | f982384166f3fc8ab06f1fbfa42a3165e3903486 (diff) | |
download | numpy-5e25f1aff21c346d950bbef1872364c8621253a6.tar.gz |
CI: Add new workflow/action for testing universal intrinsics on armv7
The new action uses qemu to emulate a full container of armv7/ubuntu on x86_64.
To speed up the compilation a bridge has been made between the host and the
emulated container to ship x86_64 binaries of the GCC cross-compiler to
be executed natively during the build.
-rw-r--r-- | .github/workflows/build_test.yml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index cecb4d2af..239a18602 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -230,3 +230,50 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} - uses: ./.github/actions + armv7_simd_test: + needs: [smoke_test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Initialize binfmt_misc for qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - name: Creates new container + run: | + # use x86_64 cross-compiler to speed up the build + sudo apt update + sudo apt install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf + docker run --name the_container --interactive -v /:/host arm32v7/ubuntu:latest /bin/bash -c " + apt update && + apt install -y git python3 python3-dev python3-pip && + pip3 install cython==0.29.24 setuptools\<49.2.0 hypothesis==6.23.3 pytest==6.2.5 && + ln -s /host/lib64 /lib64 && + ln -s /host/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu && + ln -s /host/usr/arm-linux-gnueabihf /usr/arm-linux-gnueabihf && + rm -rf /usr/lib/gcc/arm-linux-gnueabihf && ln -s /host/usr/lib/gcc-cross/arm-linux-gnueabihf /usr/lib/gcc/arm-linux-gnueabihf && + rm -f /usr/bin/arm-linux-gnueabihf-gcc && ln -s /host/usr/bin/arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc && + rm -f /usr/bin/arm-linux-gnueabihf-g++ && ln -s /host/usr/bin/arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++ && + rm -f /usr/bin/arm-linux-gnueabihf-ar && ln -s /host/usr/bin/arm-linux-gnueabihf-ar /usr/bin/arm-linux-gnueabihf-ar && + rm -f /usr/bin/arm-linux-gnueabihf-as && ln -s /host/usr/bin/arm-linux-gnueabihf-as /usr/bin/arm-linux-gnueabihf-as && + rm -f /usr/bin/arm-linux-gnueabihf-ld && ln -s /host/usr/bin/arm-linux-gnueabihf-ld /usr/bin/arm-linux-gnueabihf-ld && + rm -f /usr/bin/arm-linux-gnueabihf-ld.bfd && ln -s /host/usr/bin/arm-linux-gnueabihf-ld.bfd /usr/bin/arm-linux-gnueabihf-ld.bfd + " + docker commit the_container the_container + - name: Build + run: | + sudo docker run --name the_build --interactive -v $(pwd):/numpy -v /:/host the_container /bin/bash -c " + uname -a && + gcc --version && + g++ --version && + python3 --version && + cd /numpy && python3 setup.py install + " + docker commit the_build the_build + - name: Run SIMD Tests + run: | + docker run --rm --interactive -v $(pwd):/numpy the_build /bin/bash -c " + cd /numpy && python3 runtests.py -n -v -- -k test_simd + " |