Cleanup CI scripts
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
88f0893540
commit
e8fe4b6dc3
173
.github/workflows/ci.yml
vendored
173
.github/workflows/ci.yml
vendored
@ -31,8 +31,8 @@ jobs:
|
|||||||
- name: Set env
|
- name: Set env
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- uses: golangci/golangci-lint-action@v2
|
- uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
@ -48,6 +48,10 @@ jobs:
|
|||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
#
|
#
|
||||||
# Install Go
|
# Install Go
|
||||||
@ -57,12 +61,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: '1.15.2'
|
go-version: '1.15.2'
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Checkout repos
|
# Checkout repos
|
||||||
#
|
#
|
||||||
@ -78,6 +76,12 @@ jobs:
|
|||||||
repository: containerd/project
|
repository: containerd/project
|
||||||
path: src/github.com/containerd/project
|
path: src/github.com/containerd/project
|
||||||
|
|
||||||
|
- name: Set env
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
|
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
#
|
#
|
||||||
# Go get dependencies
|
# Go get dependencies
|
||||||
#
|
#
|
||||||
@ -97,7 +101,6 @@ jobs:
|
|||||||
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
|
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
|
||||||
DCO_VERBOSITY: "-q"
|
DCO_VERBOSITY: "-q"
|
||||||
DCO_RANGE: ""
|
DCO_RANGE: ""
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
if [ -z "${GITHUB_COMMIT_URL}" ]; then
|
if [ -z "${GITHUB_COMMIT_URL}" ]; then
|
||||||
@ -109,11 +112,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Headers
|
- name: Headers
|
||||||
run: ../project/script/validate/fileheader ../project/
|
run: ../project/script/validate/fileheader ../project/
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Vendor
|
- name: Vendor
|
||||||
run: ../project/script/validate/vendor
|
run: ../project/script/validate/vendor
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Protobuf checks
|
# Protobuf checks
|
||||||
@ -123,27 +124,27 @@ jobs:
|
|||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go
|
- uses: actions/setup-go@v1
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
with:
|
||||||
go-version: '1.15.2'
|
go-version: '1.15.2'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
echo "GO111MODULE=off" >> $GITHUB_ENV
|
||||||
|
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install protobuf
|
- name: Install protobuf
|
||||||
env:
|
|
||||||
GO111MODULE: off
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
run: |
|
run: |
|
||||||
sudo env PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
|
sudo env PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
|
||||||
sudo chmod +x /usr/local/bin/protoc
|
sudo chmod +x /usr/local/bin/protoc
|
||||||
@ -151,23 +152,9 @@ jobs:
|
|||||||
sudo chmod -R og+r /usr/local/include/google/protobuf/
|
sudo chmod -R og+r /usr/local/include/google/protobuf/
|
||||||
protoc --version
|
protoc --version
|
||||||
|
|
||||||
- name: Install dev tools
|
- run: script/setup/install-dev-tools
|
||||||
env:
|
- run: make proto-fmt
|
||||||
GO111MODULE: off
|
- run: make check-protos check-api-descriptors
|
||||||
run: script/setup/install-dev-tools
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Check fmt
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
run: |
|
|
||||||
make proto-fmt
|
|
||||||
|
|
||||||
- name: Check protos
|
|
||||||
env:
|
|
||||||
GO111MODULE: off
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
run: |
|
|
||||||
make check-protos check-api-descriptors
|
|
||||||
|
|
||||||
man:
|
man:
|
||||||
name: Manpages
|
name: Manpages
|
||||||
@ -175,27 +162,23 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v1
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
with:
|
||||||
go-version: '1.15.2'
|
go-version: '1.15.2'
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Checkout
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
path: src/github.com/containerd/containerd
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
- name: Install dependencies
|
- run: GO111MODULE=on go get github.com/cpuguy83/go-md2man/v2@v2.0.0
|
||||||
run: GO111MODULE=on go get github.com/cpuguy83/go-md2man/v2@v2.0.0
|
|
||||||
|
|
||||||
- name: Make
|
- run: make man
|
||||||
run: make man
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -212,19 +195,17 @@ jobs:
|
|||||||
os: [ubuntu-18.04, macos-10.15, windows-2019]
|
os: [ubuntu-18.04, macos-10.15, windows-2019]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v1
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
with:
|
||||||
go-version: '1.15.2'
|
go-version: '1.15.2'
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Checkout
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
path: src/github.com/containerd/containerd
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
@ -243,39 +224,37 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
needs: [project, linters, protos, man]
|
needs: [project, linters, protos, man]
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v1
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
with:
|
||||||
go-version: '1.15.2'
|
go-version: '1.15.2'
|
||||||
|
|
||||||
- name: Set env
|
- uses: actions/checkout@v2
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/src/github.com/containerd/containerd/bin"
|
|
||||||
|
|
||||||
- name: Checkout containerd
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
path: src/github.com/containerd/containerd
|
path: src/github.com/containerd/containerd
|
||||||
- name: Checkout Microsoft/hcsshim
|
|
||||||
uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: Microsoft/hcsshim
|
repository: Microsoft/hcsshim
|
||||||
path: src/github.com/Microsoft/hcsshim
|
path: src/github.com/Microsoft/hcsshim
|
||||||
|
|
||||||
- name: Install Build Deps
|
- name: Set env
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
cd src/github.com/containerd/containerd
|
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
script/setup/install-dev-tools
|
echo "${{ github.workspace }}/src/github.com/containerd/containerd/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- run: script/setup/install-dev-tools
|
||||||
|
|
||||||
- name: Binaries
|
- name: Binaries
|
||||||
shell: bash
|
env:
|
||||||
|
CGO_ENABLED: 1
|
||||||
run: |
|
run: |
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
export CGO_ENABLED=1
|
|
||||||
cd src/github.com/containerd/containerd
|
|
||||||
mingw32-make.exe binaries
|
mingw32-make.exe binaries
|
||||||
bindir="$(pwd)"
|
bindir="$(pwd)"
|
||||||
SHIM_COMMIT=$(grep Microsoft/hcsshim vendor.conf | awk '{print $2}')
|
SHIM_COMMIT=$(grep Microsoft/hcsshim vendor.conf | awk '{print $2}')
|
||||||
@ -283,20 +262,18 @@ jobs:
|
|||||||
git fetch --tags origin "${SHIM_COMMIT}"
|
git fetch --tags origin "${SHIM_COMMIT}"
|
||||||
git checkout "${SHIM_COMMIT}"
|
git checkout "${SHIM_COMMIT}"
|
||||||
GO111MODULE=on go build -mod=vendor -o "${bindir}/containerd-shim-runhcs-v1.exe" ./cmd/containerd-shim-runhcs-v1
|
GO111MODULE=on go build -mod=vendor -o "${bindir}/containerd-shim-runhcs-v1.exe" ./cmd/containerd-shim-runhcs-v1
|
||||||
|
|
||||||
- name: Integration 1
|
- name: Integration 1
|
||||||
shell: bash
|
env:
|
||||||
run: |
|
CGO_ENABLED: 1
|
||||||
cd src/github.com/containerd/containerd
|
run: mingw32-make.exe integration
|
||||||
export CGO_ENABLED=1
|
|
||||||
mingw32-make.exe integration
|
|
||||||
# Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/175
|
# Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/175
|
||||||
- name: Integration 2
|
- name: Integration 2
|
||||||
shell: bash
|
env:
|
||||||
run: |
|
TESTFLAGS_PARALLEL: 1
|
||||||
cd src/github.com/containerd/containerd
|
CGO_ENABLED: 1
|
||||||
export TESTFLAGS_PARALLEL=1
|
run: mingw32-make.exe integration
|
||||||
export CGO_ENABLED=1
|
|
||||||
mingw32-make.exe integration
|
|
||||||
|
|
||||||
integration-linux:
|
integration-linux:
|
||||||
name: Linux Integration
|
name: Linux Integration
|
||||||
@ -315,13 +292,11 @@ jobs:
|
|||||||
runc: crun
|
runc: crun
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- uses: actions/setup-go@v1
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
with:
|
||||||
go-version: '1.15.2'
|
go-version: '1.15.2'
|
||||||
|
|
||||||
- name: Setup gosu
|
- name: Setup gosu
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
GOSU=/usr/local/bin/gosu
|
GOSU=/usr/local/bin/gosu
|
||||||
arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"
|
arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"
|
||||||
@ -330,17 +305,15 @@ jobs:
|
|||||||
sudo chown root ${GOSU}
|
sudo chown root ${GOSU}
|
||||||
sudo chmod +s ${GOSU}
|
sudo chmod +s ${GOSU}
|
||||||
|
|
||||||
- name: Set env
|
- uses: actions/checkout@v2
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
|
||||||
|
|
||||||
- name: Checkout containerd
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
path: src/github.com/containerd/containerd
|
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 }}
|
||||||
@ -427,11 +400,9 @@ jobs:
|
|||||||
# We can enable crun again when we get a better CI infra.
|
# We can enable crun again when we get a better CI infra.
|
||||||
runc: [runc]
|
runc: [runc]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout containerd
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Start vagrant
|
- run: vagrant up
|
||||||
run: vagrant up
|
|
||||||
|
|
||||||
- name: Integration
|
- name: Integration
|
||||||
env:
|
env:
|
||||||
|
Loading…
Reference in New Issue
Block a user