2021-01-29 19:56:13 +01:00
|
|
|
name: Dockcross CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-06-29 23:04:25 +02:00
|
|
|
- '*'
|
2021-06-29 17:47:51 +02:00
|
|
|
paths-ignore:
|
2021-08-09 21:37:16 +02:00
|
|
|
- '**.md'
|
2021-01-29 19:56:13 +01:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
2021-06-29 17:47:51 +02:00
|
|
|
paths-ignore:
|
2021-08-09 21:37:16 +02:00
|
|
|
- '**.md'
|
2021-07-01 00:15:25 +02:00
|
|
|
workflow_dispatch:
|
2021-01-29 19:56:13 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
base:
|
|
|
|
name: base
|
2021-07-02 08:45:02 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-01-29 19:56:13 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: build
|
|
|
|
run: make base
|
|
|
|
- name: test
|
|
|
|
run: make base.test
|
|
|
|
- name: archive base
|
|
|
|
run: |
|
|
|
|
mkdir -p cache
|
2021-07-01 18:25:04 +02:00
|
|
|
docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz
|
2021-01-29 19:56:13 +01:00
|
|
|
- name: save base
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: cache
|
|
|
|
path: ./cache
|
|
|
|
retention-days: 1
|
2021-02-10 18:38:51 +01:00
|
|
|
- name: deploy
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
run: |
|
|
|
|
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
|
2021-06-25 15:21:18 +02:00
|
|
|
docker image push dockcross/base --all-tags
|
2021-01-29 19:56:13 +01:00
|
|
|
|
|
|
|
image:
|
2021-08-24 23:54:17 +02:00
|
|
|
name: ${{ matrix.arch_name.image }}
|
2021-01-29 19:56:13 +01:00
|
|
|
needs: base
|
2021-07-23 23:52:07 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-01-29 19:56:13 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-08-24 23:54:17 +02:00
|
|
|
arch_name:
|
|
|
|
# Android images
|
2021-08-25 15:27:59 +02:00
|
|
|
- { image: "android-arm", stockfish: "yes", stockfish_arg: "ARCH=armv7 COMP=ndk" }
|
|
|
|
- { image: "android-arm64", stockfish: "yes", stockfish_arg: "ARCH=armv8 COMP=ndk" }
|
2021-08-25 22:19:47 +02:00
|
|
|
- { image: "android-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32 COMP=ndk" }
|
2021-08-25 15:27:59 +02:00
|
|
|
- { image: "android-x86_64", stockfish: "yes", stockfish_arg: "ARCH=x86-64 COMP=ndk" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux arm64/armv8 images
|
2021-08-25 15:27:59 +02:00
|
|
|
- { 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" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux armv5 images
|
2021-08-25 22:19:47 +02:00
|
|
|
- { image: "linux-armv5", stockfish: "no", stockfish_arg: "" }
|
|
|
|
- { image: "linux-armv5-musl", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux armv6 images
|
2021-08-25 22:19:47 +02:00
|
|
|
- { image: "linux-armv6", stockfish: "no", stockfish_arg: "" }
|
|
|
|
- { image: "linux-armv6-lts", stockfish: "no", stockfish_arg: "" }
|
|
|
|
- { image: "linux-armv6-musl", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux armv7 images
|
2021-08-25 15:27:59 +02:00
|
|
|
- { 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" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux x86 images
|
2021-08-25 15:27:59 +02:00
|
|
|
- { image: "linux-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32-sse41-popcnt" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux x86_64 images
|
2021-08-25 15:27:59 +02:00
|
|
|
- { image: "linux-x64", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
|
|
|
|
- { image: "linux-x64-tinycc", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
|
2021-08-26 00:45:01 +02:00
|
|
|
- { image: "linux-x64-clang", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern COMP=clang" }
|
2021-08-25 15:27:59 +02:00
|
|
|
- { image: "linux-x86_64-full", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux riscv images
|
2021-08-26 00:45:01 +02:00
|
|
|
- { image: "linux-riscv32", stockfish: "no", stockfish_arg: "" }
|
|
|
|
- { image: "linux-riscv64", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux s390x images
|
2021-08-26 00:45:01 +02:00
|
|
|
- { image: "linux-s390x", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux mips images
|
2021-08-26 00:45:01 +02:00
|
|
|
- { image: "linux-mips", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux ppc64le images
|
2021-08-25 15:27:59 +02:00
|
|
|
- { image: "linux-ppc64le", stockfish: "yes", stockfish_arg: "ARCH=ppc-64" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux m68k images
|
2021-08-26 00:45:01 +02:00
|
|
|
- { image: "linux-m68k-uclibc", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Linux xtensa images
|
2021-08-25 22:19:47 +02:00
|
|
|
- { image: "linux-xtensa-uclibc", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Windows x86_x64 images
|
2021-08-26 00:45:01 +02:00
|
|
|
- { image: "windows-static-x64", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern COMP=mingw" }
|
|
|
|
- { image: "windows-static-x64-posix", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern COMP=mingw" }
|
2021-08-26 09:42:20 +02:00
|
|
|
- { image: "windows-shared-x64", stockfish: "no", stockfish_arg: "" }
|
|
|
|
- { image: "windows-shared-x64-posix", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Windows x86 images
|
2021-08-26 00:45:01 +02:00
|
|
|
- { image: "windows-static-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32-sse41-popcnt COMP=mingw" }
|
2021-08-26 09:42:20 +02:00
|
|
|
- { image: "windows-shared-x86", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# Windows arm images
|
2021-08-26 09:42:20 +02:00
|
|
|
- { image: "windows-armv7", stockfish: "yes", stockfish_arg: "ARCH=armv7-neon COMP=clang" }
|
|
|
|
- { image: "windows-arm64", stockfish: "yes", stockfish_arg: "ARCH=armv8 COMP=clang" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# manylinux2014 images
|
2021-08-25 15:27:59 +02:00
|
|
|
- { image: "manylinux2014-x86", stockfish: "yes", stockfish_arg: "ARCH=x86-32-sse41-popcnt" }
|
|
|
|
- { image: "manylinux2014-x64", stockfish: "yes", stockfish_arg: "ARCH=x86-64-modern" }
|
2021-08-26 09:42:20 +02:00
|
|
|
- { image: "manylinux2014-aarch64", stockfish: "no", stockfish_arg: "" }
|
2021-08-24 23:54:17 +02:00
|
|
|
# web-wasm images
|
2021-08-26 09:42:20 +02:00
|
|
|
- { image: "web-wasm", stockfish: "no", stockfish_arg: "" }
|
2021-01-29 19:56:13 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: cache
|
|
|
|
path: ./cache
|
|
|
|
- name: load base
|
2021-07-01 18:25:04 +02:00
|
|
|
run: xz -d -k < ./cache/base.tar.xz | docker load
|
2021-01-29 19:56:13 +01:00
|
|
|
- name: build
|
2021-08-24 23:54:17 +02:00
|
|
|
run: make ${{ matrix.arch_name.image }}
|
|
|
|
- name: basic test
|
|
|
|
run: make ${{ matrix.arch_name.image }}.test
|
2021-08-25 15:27:59 +02:00
|
|
|
- name: stockfish build test
|
2021-08-26 00:45:40 +02:00
|
|
|
if: ${{ matrix.arch_name.stockfish == 'yes' }}
|
2021-08-25 15:27:59 +02:00
|
|
|
run: |
|
|
|
|
git clone https://github.com/official-stockfish/Stockfish.git
|
|
|
|
cd Stockfish
|
|
|
|
git checkout sf_14
|
|
|
|
cd src
|
2021-08-25 21:11:52 +02:00
|
|
|
./../../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
|
2021-01-29 19:56:13 +01:00
|
|
|
- name: deploy
|
2021-02-10 16:24:34 +01:00
|
|
|
if: github.ref == 'refs/heads/master'
|
2021-01-29 19:56:13 +01:00
|
|
|
run: |
|
|
|
|
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
|
2021-08-24 23:54:17 +02:00
|
|
|
docker image push dockcross/${{ matrix.arch_name.image }} --all-tags
|