# This workflow is for builds on Windows. We cannot use the existing
# Travis-CI workflow as that depends on already having functioning
# BuildKit to run the v1.1-experimental Dockerfile that builds BuildKit.
name: Windows

on: [push, pull_request]

jobs:
  build:
    name: Build BuildKit
    runs-on: windows-2019
    steps:
      - name: Install Go
        uses: actions/setup-go@v2
        with:
          go-version: 1.13
      - name: Checkout
        uses: actions/checkout@v2
        # Is this needed? Didn't Go Modules fix this?
        with:
          path: src/github.com/moby/buildkit
      - name: Compile
        run: go install -mod=vendor ./cmd/...
        working-directory: src/github.com/moby/buildkit

  unit_tests:
    name: Unit Tests
    runs-on: windows-2019
    steps:
      - name: Install Go
        uses: actions/setup-go@v2
        with:
          go-version: 1.13
      - name: Checkout
        uses: actions/checkout@v2
        # Is this needed? Didn't Go Modules fix this?
        with:
          path: src/github.com/moby/buildkit
      - name: Unit test
        env:
          SKIP_INTEGRATION_TESTS: 1
        run: go test -mod=vendor -v ./frontend/dockerfile/.../... ./session/...
        working-directory: src/github.com/moby/buildkit

Add initial GitHub Actions-based Windows CI
Add initial GitHub Actions-based Windows CI

Only a few tests are able to be run, because the integration test
support code fails to compile on Windows, taking effect before the
SKIP_INTEGRATION_TESTS env-var is handled.

Signed-off-by: Paul "TBBle" Hampson <220d126b3d70d9d7b0fda508e4cb236265bccc41@Pobox.com>
