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:
|
|
|
|
name: ${{ matrix.arch_name }}
|
|
|
|
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-06 14:03:00 +02:00
|
|
|
arch_name: [android-arm, android-arm64, android-x86, android-x86_64,
|
|
|
|
linux-arm64, linux-arm64-musl, linux-armv5, linux-armv5-musl,
|
2021-08-08 13:13:19 +02:00
|
|
|
linux-armv6, linux-armv6-lts, linux-armv6-musl, linux-arm64-full,
|
2021-08-06 14:03:00 +02:00
|
|
|
linux-armv7, linux-armv7a, linux-armv7l-musl,
|
|
|
|
linux-x64-clang, linux-s390x, linux-x64, linux-x86,
|
|
|
|
linux-mips, linux-ppc64le, web-wasm,
|
2021-08-07 14:56:52 +02:00
|
|
|
manylinux2014-x64, manylinux2014-x86,
|
2021-08-11 01:12:48 +02:00
|
|
|
windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-armv7,
|
2021-08-11 01:07:37 +02:00
|
|
|
windows-shared-x64, windows-shared-x64-posix, windows-shared-x86, windows-arm64,
|
2021-08-11 09:57:26 +02:00
|
|
|
linux-riscv64, linux-riscv32, linux-m68k-uclibc, linux-xtensa-uclibc, linux-x64-tinycc]
|
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
|
|
|
|
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 }}
|
2021-06-25 15:21:18 +02:00
|
|
|
docker image push dockcross/${{ matrix.arch_name }} --all-tags
|