Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 48 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
GOTESTSUM_VERSION: "latest"

jobs:

lint:
runs-on: "windows-2022"
strategy:
Expand All @@ -25,15 +26,18 @@ jobs:
./internal/tools/...
./pkg/...
./ext4/...

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- name: Checkout
uses: actions/checkout@v3

- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Clean mod cache
shell: Powershell
run: |
go clean -modcache
# sometimes go cache causes issues with lint
cache: false

- uses: golangci/golangci-lint-action@v3
with:
version: v1.52
Expand All @@ -42,6 +46,7 @@ jobs:
--max-issues-per-linter=0
--max-same-issues=0
--modules-download-mode=readonly
--timeout=10m
${{ matrix.dirs }}
working-directory: ${{ matrix.root }}
env:
Expand All @@ -55,14 +60,16 @@ jobs:
GOPATH: '${{ github.workspace }}\go'

steps:
- uses: actions/setup-go@v4
- name: Checkout hcsshim
uses: actions/checkout@v3
with:
go-version: ${{ env.GO_VERSION }}
path: go/src/github.com/Microsoft/hcsshim

- uses: actions/checkout@v3
- name: Install go
uses: actions/setup-go@v4
with:
path: "go/src/github.com/Microsoft/hcsshim"
name: Checkout hcsshim
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go/src/github.com/Microsoft/hcsshim/go.sum

- name: Get containerd ref
shell: powershell
Expand All @@ -77,12 +84,12 @@ jobs:
"containerd_ref=$v" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
working-directory: go/src/github.com/Microsoft/hcsshim

- uses: actions/checkout@v3
- name: Checkout containerd
uses: actions/checkout@v3
with:
repository: containerd/containerd
path: "containerd"
ref: "${{ env.containerd_ref }}"
name: Checkout containerd

- name: Install protobuild and protoc-gen-gogoctrd
shell: powershell
Expand Down Expand Up @@ -143,9 +150,11 @@ jobs:
env:
GOPROXY: "https://proxy.golang.org,direct"
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-go@v4
- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

Expand Down Expand Up @@ -181,10 +190,14 @@ jobs:
name: Go Generate
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- name: Checkout
uses: actions/checkout@v3

- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Validate go generate
shell: powershell
run: |
Expand Down Expand Up @@ -243,8 +256,11 @@ jobs:
matrix:
os: [windows-2019, windows-2022]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- name: Checkout
uses: actions/checkout@v3

- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

Expand Down Expand Up @@ -304,10 +320,17 @@ jobs:
os: [windows-2019, windows-2022]

steps:
- uses: actions/setup-go@v4
- name: Checkout hcsshim
uses: actions/checkout@v3
with:
path: src/github.com/Microsoft/hcsshim

- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache-dependency-path: src/github.com/Microsoft/hcsshim/go.sum

- name: Set env
shell: bash
Expand All @@ -317,11 +340,6 @@ jobs:
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
echo "${{ github.workspace }}/src/github.com/containerd/containerd/bin" >> $GITHUB_PATH

- uses: actions/checkout@v3
with:
path: src/github.com/Microsoft/hcsshim
name: Checkout hcsshim

- name: Get containerd ref
shell: powershell
run: |
Expand Down Expand Up @@ -500,8 +518,11 @@ jobs:
needs: [test-windows, test-linux]
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- name: Checkout
uses: actions/checkout@v3

- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

Expand Down