diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b51d7d..1b9e3fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,8 +14,34 @@ on: 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 @@ -392,6 +418,16 @@ jobs: } 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 - name: stockfish build test if: ${{ matrix.arch_name.stockfish == 'yes' }} run: |