Cleanup CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
b97a56b714
commit
10eab21a4d
74
.github/workflows/ci.yml
vendored
74
.github/workflows/ci.yml
vendored
@ -3,12 +3,10 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
|
||||||
- 'release/**'
|
- 'release/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
|
||||||
- 'release/**'
|
- 'release/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -27,19 +25,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
|
||||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- uses: golangci/golangci-lint-action@v2
|
- uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
version: v1.36.0
|
version: v1.36.0
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
args: --timeout=5m
|
args: --timeout=5m
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -55,11 +43,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: '1.16.6'
|
go-version: '1.16.6'
|
||||||
|
|
||||||
- shell: bash
|
|
||||||
run: |
|
|
||||||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
|
||||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: src/github.com/containerd/containerd
|
path: src/github.com/containerd/containerd
|
||||||
@ -124,21 +107,9 @@ jobs:
|
|||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.16.6'
|
go-version: '1.16.6'
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
|
||||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
- run: go get github.com/cpuguy83/go-md2man/v2@v2.0.1
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- run: GO111MODULE=on go get github.com/cpuguy83/go-md2man/v2@v2.0.1
|
|
||||||
|
|
||||||
- run: make man
|
- run: make man
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
# Make sure binaries compile with other platforms
|
# Make sure binaries compile with other platforms
|
||||||
crossbuild:
|
crossbuild:
|
||||||
@ -170,14 +141,7 @@ jobs:
|
|||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.16.6'
|
go-version: '1.16.6'
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
|
||||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
- run: |
|
- run: |
|
||||||
set -e -x
|
set -e -x
|
||||||
|
|
||||||
@ -211,9 +175,8 @@ jobs:
|
|||||||
if [ -n "${packages}" ]; then
|
if [ -n "${packages}" ]; then
|
||||||
sudo apt-get update && sudo apt-get install -y ${packages}
|
sudo apt-get update && sudo apt-get install -y ${packages}
|
||||||
fi
|
fi
|
||||||
name: install deps
|
name: Install deps
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
env:
|
env:
|
||||||
GOOS: ${{matrix.goos}}
|
GOOS: ${{matrix.goos}}
|
||||||
GOARCH: ${{matrix.goarch}}
|
GOARCH: ${{matrix.goarch}}
|
||||||
@ -364,24 +327,17 @@ jobs:
|
|||||||
go-version: '1.16.6'
|
go-version: '1.16.6'
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
run: |
|
|
||||||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
|
||||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Install containerd dependencies
|
- name: Install containerd dependencies
|
||||||
env:
|
env:
|
||||||
RUNC_FLAVOR: ${{ matrix.runc }}
|
RUNC_FLAVOR: ${{ matrix.runc }}
|
||||||
|
GOFLAGS: -modcacherw
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y gperf
|
sudo apt-get install -y gperf
|
||||||
sudo -E PATH=$PATH script/setup/install-seccomp
|
sudo -E PATH=$PATH script/setup/install-seccomp
|
||||||
sudo -E PATH=$PATH script/setup/install-runc
|
sudo -E PATH=$PATH script/setup/install-runc
|
||||||
sudo -E PATH=$PATH script/setup/install-cni
|
sudo -E PATH=$PATH script/setup/install-cni $(grep containernetworking/plugins go.mod | awk '{print $2}')
|
||||||
sudo -E PATH=$PATH script/setup/install-critools
|
sudo -E PATH=$PATH script/setup/install-critools
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install criu
|
- name: Install criu
|
||||||
run: |
|
run: |
|
||||||
@ -393,12 +349,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
run: |
|
run: |
|
||||||
make binaries
|
make binaries GO_BUILD_FLAGS="-mod=vendor"
|
||||||
sudo -E PATH=$PATH make install
|
sudo -E PATH=$PATH make install
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- run: sudo -E PATH=$PATH script/setup/install-gotestsum
|
- run: sudo -E PATH=$PATH script/setup/install-gotestsum
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
env:
|
env:
|
||||||
GOPROXY: direct
|
GOPROXY: direct
|
||||||
@ -406,7 +360,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make test
|
make test
|
||||||
sudo -E PATH=$PATH make root-test
|
sudo -E PATH=$PATH make root-test
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Integration 1
|
- name: Integration 1
|
||||||
env:
|
env:
|
||||||
@ -420,7 +373,6 @@ jobs:
|
|||||||
extraflags="EXTRA_TESTFLAGS=-no-criu";
|
extraflags="EXTRA_TESTFLAGS=-no-criu";
|
||||||
}
|
}
|
||||||
sudo -E PATH=$PATH make integration ${extraflags} TESTFLAGS_RACE=-race
|
sudo -E PATH=$PATH make integration ${extraflags} TESTFLAGS_RACE=-race
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
# Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
|
# Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
|
||||||
- name: Integration 2
|
- name: Integration 2
|
||||||
@ -435,14 +387,12 @@ jobs:
|
|||||||
extraflags="EXTRA_TESTFLAGS=-no-criu";
|
extraflags="EXTRA_TESTFLAGS=-no-criu";
|
||||||
}
|
}
|
||||||
sudo -E PATH=$PATH TESTFLAGS_PARALLEL=1 make integration ${extraflags}
|
sudo -E PATH=$PATH TESTFLAGS_PARALLEL=1 make integration ${extraflags}
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: CRI Integration Test
|
- name: CRI Integration Test
|
||||||
env:
|
env:
|
||||||
TEST_RUNTIME: ${{ matrix.runtime }}
|
TEST_RUNTIME: ${{ matrix.runtime }}
|
||||||
run: |
|
run: |
|
||||||
CONTAINERD_RUNTIME=$TEST_RUNTIME make cri-integration
|
CONTAINERD_RUNTIME=$TEST_RUNTIME make cri-integration
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: cri-tools critest
|
- name: cri-tools critest
|
||||||
env:
|
env:
|
||||||
@ -494,25 +444,13 @@ jobs:
|
|||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.16.6'
|
go-version: '1.16.6'
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
run: |
|
|
||||||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
|
||||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- run: sudo -E PATH=$PATH script/setup/install-gotestsum
|
- run: sudo -E PATH=$PATH script/setup/install-gotestsum
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
env:
|
env:
|
||||||
GOPROXY: direct
|
GOPROXY: direct
|
||||||
GOTESTSUM_JUNITFILE: "${{ github.workspace }}/macos-test-junit.xml"
|
GOTESTSUM_JUNITFILE: "${{ github.workspace }}/macos-test-junit.xml"
|
||||||
run: |
|
run: make test
|
||||||
make test
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
|
4
Makefile
4
Makefile
@ -252,11 +252,11 @@ genman: man/containerd.8 man/ctr.8
|
|||||||
|
|
||||||
man/containerd.8: FORCE
|
man/containerd.8: FORCE
|
||||||
@echo "$(WHALE) $@"
|
@echo "$(WHALE) $@"
|
||||||
$(GO) run ${GO_TAGS} cmd/gen-manpages/main.go $(@F) $(@D)
|
$(GO) run -mod=readonly ${GO_TAGS} cmd/gen-manpages/main.go $(@F) $(@D)
|
||||||
|
|
||||||
man/ctr.8: FORCE
|
man/ctr.8: FORCE
|
||||||
@echo "$(WHALE) $@"
|
@echo "$(WHALE) $@"
|
||||||
$(GO) run ${GO_TAGS} cmd/gen-manpages/main.go $(@F) $(@D)
|
$(GO) run -mod=readonly ${GO_TAGS} cmd/gen-manpages/main.go $(@F) $(@D)
|
||||||
|
|
||||||
man/%: docs/man/%.md FORCE
|
man/%: docs/man/%.md FORCE
|
||||||
@echo "$(WHALE) $@"
|
@echo "$(WHALE) $@"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#
|
#
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
CNI_COMMIT=$(grep containernetworking/plugins "$GOPATH"/src/github.com/containerd/containerd/go.mod | awk '{print $2}')
|
CNI_COMMIT=${1:-$(grep containernetworking/plugins "$GOPATH"/src/github.com/containerd/containerd/go.mod | awk '{print $2}')}
|
||||||
CNI_DIR=${DESTDIR:=''}/opt/cni
|
CNI_DIR=${DESTDIR:=''}/opt/cni
|
||||||
CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d
|
CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ set -eu -o pipefail
|
|||||||
|
|
||||||
script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
|
script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
|
||||||
|
|
||||||
cd "$GOPATH"
|
cd "$(go env GOPATH)"
|
||||||
go get -u github.com/onsi/ginkgo/ginkgo
|
go get -u github.com/onsi/ginkgo/ginkgo
|
||||||
|
|
||||||
: "${CRITEST_COMMIT:=$(cat "${script_dir}/critools-version")}"
|
: "${CRITEST_COMMIT:=$(cat "${script_dir}/critools-version")}"
|
||||||
|
Loading…
Reference in New Issue
Block a user