2021-01-29 19:56:13 +01:00
|
|
|
name: Dockcross CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-05-23 00:25:25 +02:00
|
|
|
- 'master'
|
2021-01-29 19:56:13 +01:00
|
|
|
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
|
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 }}
|
|
|
|
docker image push dockcross/base
|
2021-01-29 19:56:13 +01:00
|
|
|
|
|
|
|
image:
|
|
|
|
name: ${{ matrix.arch_name }}
|
|
|
|
needs: base
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-05-23 00:25:25 +02:00
|
|
|
arch_name: [android-arm, android-arm64, android-x86, android-x86_64, web-wasm, linux-arm64, linux-arm64-musl, linux-armv5, linux-armv5-musl, linux-armv6, linux-armv6-musl, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-s390x, linux-x64, linux-x86, linux-ppc64le, manylinux1-x64, manylinux1-x86, manylinux2010-x64, manylinux2010-x86, manylinux2014-x64, manylinux2014-x86, manylinux2014-aarch64, windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-shared-x64, windows-shared-x64-posix, windows-shared-x86]
|
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
|
|
|
|
run: docker load -i ./cache/base.tar
|
|
|
|
- name: build
|
|
|
|
run: make ${{ matrix.arch_name }}
|
|
|
|
- name: test
|
|
|
|
run: make ${{ matrix.arch_name }}.test
|
|
|
|
- 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 }}
|
|
|
|
docker image push dockcross/${{ matrix.arch_name }}
|