name: Dockcross CI on: push: branches: - "*" paths-ignore: - "**.md" pull_request: branches: - "*" paths-ignore: - "**.md" workflow_dispatch: jobs: image: name: ${{ matrix.arch_name.image }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: arch_name: # Android images - { image: "android-arm", stockfish: "yes", stockfish_arg: "ARCH=armv7 COMP=ndk", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "android-arm", } - { image: "android-arm64", stockfish: "yes", stockfish_arg: "ARCH=armv8 COMP=ndk", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "android-arm64", } - { image: "android-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32 COMP=ndk", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "android-x86", } - { image: "android-x86_64", stockfish: "yes", stockfish_arg: "ARCH=x86-64 COMP=ndk", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "android-x86_64", } # Linux arm64/armv8 images - { image: "linux-arm64", stockfish: "yes", stockfish_arg: "ARCH=armv8", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-aarch64", } - { image: "linux-arm64-musl", stockfish: "yes", stockfish_arg: "ARCH=armv8", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-aarch64", } - { image: "linux-arm64-full", stockfish: "yes", stockfish_arg: "ARCH=armv8", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-aarch64", } # Linux armv5 images - { image: "linux-armv5", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-armv4", } - { image: "linux-armv5-musl", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-armv4", } # Linux armv6 images - { image: "linux-armv6", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-armv4", } - { image: "linux-armv6-lts", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-armv4", } - { image: "linux-armv6-musl", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-armv4", } # Linux armv7 images - { image: "linux-armv7", stockfish: "yes", stockfish_arg: "ARCH=armv7", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-armv4", } - { image: "linux-armv7a", stockfish: "yes", stockfish_arg: "ARCH=armv7-neon", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-armv4", } - { image: "linux-armv7l-musl", stockfish: "yes", stockfish_arg: "ARCH=armv7", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-armv4", } # Linux x86 images - { image: "linux-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32-sse41-popcnt", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-x86", } # Linux x86_64 images - { image: "linux-x64", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-x86_64", } - { image: "linux-x64-tinycc", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", } - { image: "linux-x64-clang", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern COMP=clang", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "linux-x86_64-clang", } - { image: "linux-x86_64-full", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-x86_64", } # Linux riscv images - { image: "linux-riscv32", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-generic32", } - { image: "linux-riscv64", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-generic64", } # Linux s390x images - { image: "linux-s390x", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux64-s390x", } # Linux mips images - { image: "linux-mips", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-generic32", } # Linux ppc64le images - { image: "linux-ppc64le", stockfish: "yes", stockfish_arg: "ARCH=ppc-64", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-ppc64le", } # Linux m68k images - { image: "linux-m68k-uclibc", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "linux-generic32 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", } # Linux xtensa images - { image: "linux-xtensa-uclibc", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", } # Windows x86_x64 images - { image: "windows-static-x64", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern COMP=mingw", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "mingw64 no-asm", } - { image: "windows-static-x64-posix", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern COMP=mingw", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "mingw64 no-asm", } - { image: "windows-shared-x64", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "mingw64 no-asm", } - { image: "windows-shared-x64-posix", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "mingw64 no-asm", } # Windows x86 images - { image: "windows-static-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32-sse41-popcnt COMP=mingw", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "mingw no-asm", } - { image: "windows-shared-x86", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "mingw no-asm", } # Windows arm images - { image: "windows-armv7", stockfish: "no", stockfish_arg: "ARCH=armv7-neon COMP=clang", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "mingw no-asm", } - { image: "windows-arm64", stockfish: "no", stockfish_arg: "ARCH=armv8 COMP=clang", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "mingw64 no-asm", } # manylinux2014 images - { image: "manylinux2014-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32-sse41-popcnt", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-x86", } - { image: "manylinux2014-x64", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-x86_64", } - { image: "manylinux2014-aarch64", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "yes", openssl_arg: "linux-aarch64", } # web-wasm images - { image: "web-wasm", stockfish: "no", stockfish_arg: "", ninja: "yes", ninja_arg: "", openssl: "no", openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", } steps: - uses: actions/checkout@v2 - name: stockfish build test if: ${{ matrix.arch_name.stockfish == 'yes' }} run: | git clone --depth 1 --branch sf_14 https://github.com/official-stockfish/Stockfish.git cd Stockfish/src ./../../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} net ./../../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} build ${{ matrix.arch_name.stockfish_arg }} -j2 cd ../.. rm -rf Stockfish - name: ninja build test if: ${{ matrix.arch_name.ninja == 'yes' }} run: | git clone --depth 1 --branch v1.10.2 https://github.com/ninja-build/ninja.git cd ninja ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.ninja_arg }} - name: openssl build test if: ${{ matrix.arch_name.openssl == 'yes' }} run: | git clone --depth 1 --branch OpenSSL_1_1_1k https://github.com/openssl/openssl.git cd openssl ./../tools/dockcross-command.sh ${{ matrix.arch_name.image }} ./Configure ${{ matrix.arch_name.openssl_arg }} ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2 cd .. rm -rf openssl - name: deploy if: github.ref == 'refs/heads/master' run: | docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} docker image push dockcross/${{ matrix.arch_name.image }} --all-tags