2022-08-29 16:52:29 -04:00
|
|
|
name: buildkit
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
- '[0-9]+.[0-9]{2}'
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
env:
|
|
|
|
BUNDLES_OUTPUT: ./bundles
|
|
|
|
|
|
|
|
jobs:
|
2022-09-10 09:07:46 -04:00
|
|
|
validate-dco:
|
|
|
|
uses: ./.github/workflows/.dco.yml
|
|
|
|
|
2022-08-29 16:52:29 -04:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-09-10 09:07:46 -04:00
|
|
|
needs:
|
|
|
|
- validate-dco
|
2022-08-29 16:52:29 -04:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: docker/bake-action@v2
|
|
|
|
with:
|
|
|
|
targets: binary
|
|
|
|
-
|
|
|
|
name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: binary
|
|
|
|
path: ${{ env.BUNDLES_OUTPUT }}
|
|
|
|
if-no-files-found: error
|
|
|
|
retention-days: 1
|
|
|
|
|
|
|
|
test:
|
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
pkg:
|
2022-10-20 17:18:44 -04:00
|
|
|
- client
|
|
|
|
- cmd/buildctl
|
|
|
|
- solver
|
|
|
|
- frontend
|
|
|
|
- frontend/dockerfile
|
2022-08-29 16:52:29 -04:00
|
|
|
typ:
|
|
|
|
- integration
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: moby
|
|
|
|
-
|
|
|
|
name: BuildKit ref
|
|
|
|
run: |
|
|
|
|
./hack/go-mod-prepare.sh
|
2022-10-20 12:06:31 -04:00
|
|
|
# FIXME(thaJeztah) temporarily overriding version to use for tests; remove with the next release of buildkit
|
2022-08-29 16:52:29 -04:00
|
|
|
# echo "BUILDKIT_REF=$(./hack/buildkit-ref)" >> $GITHUB_ENV
|
2022-10-20 12:06:31 -04:00
|
|
|
echo "BUILDKIT_REF=e27c8e24bb9ee92a170567b8b597201925ae9b8a" >> $GITHUB_ENV
|
2022-08-29 16:52:29 -04:00
|
|
|
working-directory: moby
|
|
|
|
-
|
|
|
|
name: Checkout BuildKit ${{ env.BUILDKIT_REF }}
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: "moby/buildkit"
|
|
|
|
ref: ${{ env.BUILDKIT_REF }}
|
|
|
|
path: buildkit
|
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
-
|
|
|
|
name: Download binary artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: binary
|
|
|
|
path: ./buildkit/build/moby/
|
|
|
|
-
|
|
|
|
name: Update daemon.json
|
|
|
|
run: |
|
|
|
|
sudo rm /etc/docker/daemon.json
|
|
|
|
sudo service docker restart
|
|
|
|
docker version
|
|
|
|
docker info
|
|
|
|
-
|
|
|
|
name: Test
|
|
|
|
run: |
|
|
|
|
./hack/test ${{ matrix.typ }}
|
|
|
|
env:
|
|
|
|
CONTEXT: "."
|
|
|
|
TEST_DOCKERD: "1"
|
|
|
|
TEST_DOCKERD_BINARY: "./build/moby/binary-daemon/dockerd"
|
2022-10-20 17:18:44 -04:00
|
|
|
TESTPKGS: "./${{ matrix.pkg }}"
|
2022-08-29 16:52:29 -04:00
|
|
|
TESTFLAGS: "-v --parallel=1 --timeout=30m --run=//worker=dockerd$"
|
|
|
|
working-directory: buildkit
|