dockcross/.github/workflows/main.yml
Bensuperpc 71de3d67f2 Add stockfish (14) test
Add stockfish (14) test

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-08-25 15:27:59 +02:00

133 lines
5.7 KiB
YAML

name: Dockcross CI
on:
push:
branches:
- '*'
paths-ignore:
- '**.md'
pull_request:
branches:
- '*'
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
base:
name: base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: make base
- name: test
run: make base.test
- name: archive base
run: |
mkdir -p cache
docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz
- name: save base
uses: actions/upload-artifact@v2
with:
name: cache
path: ./cache
retention-days: 1
- name: deploy
if: github.ref == 'refs/heads/master'
run: |
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
docker image push dockcross/base --all-tags
image:
name: ${{ matrix.arch_name.image }}
needs: base
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch_name:
# Android images
- { image: "android-arm", stockfish: "yes", stockfish_arg: "ARCH=armv7 COMP=ndk" }
- { image: "android-arm64", stockfish: "yes", stockfish_arg: "ARCH=armv8 COMP=ndk" }
- { image: "android-x86", stockfish: "no" }
- { image: "android-x86_64", stockfish: "yes", stockfish_arg: "ARCH=x86-64 COMP=ndk" }
# Linux arm64/armv8 images
- { image: "linux-arm64", stockfish: "yes", stockfish_arg: "ARCH=armv8" }
- { image: "linux-arm64-musl", stockfish: "yes", stockfish_arg: "ARCH=armv8" }
- { image: "linux-arm64-full", stockfish: "yes", stockfish_arg: "ARCH=armv8" }
# Linux armv5 images
- { image: "linux-armv5", stockfish: "yes", stockfish_arg: "ARCH=general-32" }
- { image: "linux-armv5-musl", stockfish: "yes", stockfish_arg: "ARCH=general-32" }
# Linux armv6 images
- { image: "linux-armv6", stockfish: "yes", stockfish_arg: "ARCH=general-32" }
- { image: "linux-armv6-lts", stockfish: "yes", stockfish_arg: "ARCH=general-32" }
- { image: "linux-armv6-musl", stockfish: "yes", stockfish_arg: "ARCH=general-32" }
# Linux armv7 images
- { image: "linux-armv7", stockfish: "yes", stockfish_arg: "ARCH=armv7" }
- { image: "linux-armv7a", stockfish: "yes", stockfish_arg: "ARCH=armv7-neon" }
- { image: "linux-armv7l-musl", stockfish: "yes", stockfish_arg: "ARCH=armv7" }
# Linux x86 images
- { image: "linux-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32-sse41-popcnt" }
# Linux x86_64 images
- { image: "linux-x64", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
- { image: "linux-x64-tinycc", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
- { image: "linux-x64-clang", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
- { image: "linux-x86_64-full", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
# Linux riscv images
- { image: "linux-riscv32", stockfish: "yes", stockfish_arg: "ARCH=general-32" }
- { image: "linux-riscv64", stockfish: "yes", stockfish_arg: "ARCH=general-64" }
# Linux s390x images
- { image: "linux-s390x", stockfish: "yes", stockfish_arg: "ARCH=general-64" }
# Linux mips images
- { image: "linux-mips", stockfish: "yes", stockfish_arg: "ARCH=general-32" }
# Linux ppc64le images
- { image: "linux-ppc64le", stockfish: "yes", stockfish_arg: "ARCH=ppc-64" }
# Linux m68k images
- { image: "linux-m68k-uclibc", stockfish: "yes", stockfish_arg: "ARCH=general-32" }
# Linux xtensa images
- { image: "linux-xtensa-uclibc", stockfish: "no" }
# Windows x86_x64 images
- { image: "windows-static-x64", stockfish: "no" }
- { image: "windows-static-x64-posix", stockfish: "no" }
- { image: "windows-shared-x64", stockfish: "no" }
- { image: "windows-shared-x64-posix", stockfish: "no" }
# Windows x86 images
- { image: "windows-static-x86", stockfish: "no" }
- { image: "windows-shared-x86", stockfish: "no" }
# Windows arm images
- { image: "windows-armv7", stockfish: "no" }
- { image: "windows-arm64", stockfish: "no" }
# manylinux2014 images
- { image: "manylinux2014-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32-sse41-popcnt" }
- { image: "manylinux2014-x64", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
- { image: "manylinux2014-aarch64", stockfish: "yes", stockfish_arg: "ARCH=armv8" }
# web-wasm images
- { image: "web-wasm", stockfish: "no" }
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: cache
path: ./cache
- name: load base
run: xz -d -k < ./cache/base.tar.xz | docker load
- name: build
run: make ${{ matrix.arch_name.image }}
- name: basic test
run: make ${{ matrix.arch_name.image }}.test
if: ${{ matrix.arch_name.stockfish }} == 'yes'
- name: stockfish build test
run: |
git clone https://github.com/official-stockfish/Stockfish.git
cd Stockfish
git checkout sf_14
cd src
./../tools/dockcross-make-builder.sh net
./../tools/dockcross-make-builder.sh build ${{ matrix.arch_name.stockfish_arg }} -j2
- 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