mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-23 09:04:27 +01:00
71 lines
2.4 KiB
YAML
71 lines
2.4 KiB
YAML
name: Dockcross CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'dev'
|
|
paths-ignore:
|
|
- '**/README.md'
|
|
- '**/README.rst'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
|
|
jobs:
|
|
base:
|
|
name: base
|
|
runs-on: ubuntu-20.04
|
|
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 -o ./cache/base.tar dockcross/base:latest
|
|
- 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
|
|
|
|
image:
|
|
name: ${{ matrix.arch_name }}
|
|
needs: base
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 8
|
|
# manylinux2014-aarch64
|
|
matrix:
|
|
arch_name: [android-arm, android-arm64, android-x86, android-x86_64, web-wasm, linux-armv8, linux-armv8-musl, linux-armv8-rpi3, linux-armv8-rpi4, linux-armv5, linux-armv5-musl, linux-armv6-rpi1, linux-armv7-rpi2, linux-armv6-musl, linux-armv6-rpi-old, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-mips, linux-mips64, linux-mipsel, linux-m68k, linux-ppc32, linux-ppc64, linux-s390x, linux-x64, linux-x64-clang, linux-x86, linux-riscv64, manylinux2014-x64, manylinux2014-x86, windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-shared-x64, windows-shared-x64-posix, windows-shared-x86]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: cache
|
|
path: ./cache
|
|
- name: load base
|
|
run: docker load -i ./cache/base.tar
|
|
- name: build
|
|
run: make ${{ matrix.arch_name }}
|
|
- name: test
|
|
run: make ${{ matrix.arch_name }}.test
|
|
- 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 }}
|
|
# Docker images need to remove after deploy or tests, not enough memory to build all images on github action (14 GB of SSD)
|
|
- name: clean
|
|
run: docker image rm -f dockcross/${{ matrix.arch_name }}
|