Setup dependencies between jobs
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
This commit is contained in:
parent
e598e5e0c6
commit
6d4429edde
77
.github/workflows/build.yml
vendored
77
.github/workflows/build.yml
vendored
@ -1,77 +0,0 @@
|
|||||||
name: Build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- 'release/**'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- 'release/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
binaries:
|
|
||||||
name: Binaries
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
timeout-minutes: 10
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-18.04, macos-10.15, windows-2019]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: '1.13.8'
|
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y btrfs-tools libseccomp-dev
|
|
||||||
|
|
||||||
- name: Make
|
|
||||||
run: |
|
|
||||||
make build
|
|
||||||
make binaries
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
man:
|
|
||||||
name: Mans
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: '1.13.8'
|
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: go get -u github.com/cpuguy83/go-md2man
|
|
||||||
|
|
||||||
- name: Make
|
|
||||||
run: make man
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
174
.github/workflows/checks.yml
vendored
174
.github/workflows/checks.yml
vendored
@ -1,174 +0,0 @@
|
|||||||
name: Checks
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [master]
|
|
||||||
pull_request:
|
|
||||||
branches: [master]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
#
|
|
||||||
# golangci-lint
|
|
||||||
#
|
|
||||||
linters:
|
|
||||||
name: Linters
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-18.04, macos-10.15] # TODO: pass linters on 'windows-2019'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: '1.13.9'
|
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install dev tools
|
|
||||||
env:
|
|
||||||
GO111MODULE: off
|
|
||||||
shell: bash
|
|
||||||
run: script/setup/install-dev-tools
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Make check
|
|
||||||
shell: bash
|
|
||||||
run: make check
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
#
|
|
||||||
# Project checks
|
|
||||||
#
|
|
||||||
project:
|
|
||||||
name: Project
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
#
|
|
||||||
# Install Go
|
|
||||||
#
|
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: '1.13.9'
|
|
||||||
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Checkout repos
|
|
||||||
#
|
|
||||||
- name: Checkout this repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
fetch-depth: 25
|
|
||||||
|
|
||||||
- name: Checkout project repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: containerd/project
|
|
||||||
path: src/github.com/containerd/project
|
|
||||||
|
|
||||||
#
|
|
||||||
# Go get dependencies
|
|
||||||
#
|
|
||||||
- name: Install dependencies
|
|
||||||
env:
|
|
||||||
GO111MODULE: off
|
|
||||||
run: |
|
|
||||||
go get -u github.com/vbatts/git-validation
|
|
||||||
go get -u github.com/kunalkushwaha/ltag
|
|
||||||
go get -u github.com/LK4D4/vndr
|
|
||||||
|
|
||||||
#
|
|
||||||
# DCO / File headers / Vendor directory validation
|
|
||||||
#
|
|
||||||
- name: DCO
|
|
||||||
env:
|
|
||||||
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
|
|
||||||
DCO_VERBOSITY: "-q"
|
|
||||||
DCO_RANGE: ""
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
run: |
|
|
||||||
set -x
|
|
||||||
if [ -z "${GITHUB_COMMIT_URL}" ]; then
|
|
||||||
DCO_RANGE=$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})
|
|
||||||
else
|
|
||||||
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
|
|
||||||
fi
|
|
||||||
../project/script/validate/dco
|
|
||||||
|
|
||||||
- name: Headers
|
|
||||||
run: ../project/script/validate/fileheader ../project/
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Vendor
|
|
||||||
run: ../project/script/validate/vendor
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
#
|
|
||||||
# Protobuf checks
|
|
||||||
#
|
|
||||||
protos:
|
|
||||||
name: Protobuf
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: '1.13.9'
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
env:
|
|
||||||
GOPATH: ${{ runner.workspace }}
|
|
||||||
GO111MODULE: off
|
|
||||||
with:
|
|
||||||
path: ./src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install protobuf
|
|
||||||
env:
|
|
||||||
GOPATH: ${{ runner.workspace }}
|
|
||||||
GO111MODULE: off
|
|
||||||
run: |
|
|
||||||
sudo env PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
|
|
||||||
sudo chmod +x /usr/local/bin/protoc
|
|
||||||
sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
|
|
||||||
sudo chmod -R og+r /usr/local/include/google/protobuf/
|
|
||||||
protoc --version
|
|
||||||
|
|
||||||
- name: Go get gogo
|
|
||||||
env:
|
|
||||||
GOPATH: ${{ runner.workspace }}
|
|
||||||
GO111MODULE: off
|
|
||||||
# Get proto files, ignore "package github.com/gogo/googleapis: no Go files in ~/go/src/github.com/gogo/googleapis"
|
|
||||||
run: go get -u github.com/gogo/googleapis || true
|
|
||||||
|
|
||||||
- name: Install dev tools
|
|
||||||
env:
|
|
||||||
GOPATH: ${{ runner.workspace }}
|
|
||||||
GO111MODULE: off
|
|
||||||
run: script/setup/install-dev-tools
|
|
||||||
|
|
||||||
- name: Make
|
|
||||||
env:
|
|
||||||
GOPATH: ${{ runner.workspace }}
|
|
||||||
GO111MODULE: off
|
|
||||||
run: |
|
|
||||||
export PATH=$PATH:$(go env GOPATH)/bin
|
|
||||||
make check-protos check-api-descriptors
|
|
360
.github/workflows/ci.yml
vendored
Normal file
360
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- 'release/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- 'release/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
#
|
||||||
|
# golangci-lint
|
||||||
|
#
|
||||||
|
linters:
|
||||||
|
name: Linters
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-18.04, macos-10.15] # TODO: pass linters on 'windows-2019'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: '1.13.9'
|
||||||
|
|
||||||
|
- name: Set env
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install dev tools
|
||||||
|
env:
|
||||||
|
GO111MODULE: off
|
||||||
|
shell: bash
|
||||||
|
run: script/setup/install-dev-tools
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Make check
|
||||||
|
shell: bash
|
||||||
|
run: make check
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
#
|
||||||
|
# Project checks
|
||||||
|
#
|
||||||
|
project:
|
||||||
|
name: Project
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
steps:
|
||||||
|
#
|
||||||
|
# Install Go
|
||||||
|
#
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: '1.13.9'
|
||||||
|
|
||||||
|
- name: Set env
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checkout repos
|
||||||
|
#
|
||||||
|
- name: Checkout this repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/containerd
|
||||||
|
fetch-depth: 25
|
||||||
|
|
||||||
|
- name: Checkout project repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: containerd/project
|
||||||
|
path: src/github.com/containerd/project
|
||||||
|
|
||||||
|
#
|
||||||
|
# Go get dependencies
|
||||||
|
#
|
||||||
|
- name: Install dependencies
|
||||||
|
env:
|
||||||
|
GO111MODULE: off
|
||||||
|
run: |
|
||||||
|
go get -u github.com/vbatts/git-validation
|
||||||
|
go get -u github.com/kunalkushwaha/ltag
|
||||||
|
go get -u github.com/LK4D4/vndr
|
||||||
|
|
||||||
|
#
|
||||||
|
# DCO / File headers / Vendor directory validation
|
||||||
|
#
|
||||||
|
- name: DCO
|
||||||
|
env:
|
||||||
|
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
|
||||||
|
DCO_VERBOSITY: "-q"
|
||||||
|
DCO_RANGE: ""
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
if [ -z "${GITHUB_COMMIT_URL}" ]; then
|
||||||
|
DCO_RANGE=$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})
|
||||||
|
else
|
||||||
|
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
|
||||||
|
fi
|
||||||
|
../project/script/validate/dco
|
||||||
|
|
||||||
|
- name: Headers
|
||||||
|
run: ../project/script/validate/fileheader ../project/
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Vendor
|
||||||
|
run: ../project/script/validate/vendor
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
#
|
||||||
|
# Protobuf checks
|
||||||
|
#
|
||||||
|
protos:
|
||||||
|
name: Protobuf
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: '1.13.9'
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ runner.workspace }}
|
||||||
|
GO111MODULE: off
|
||||||
|
with:
|
||||||
|
path: ./src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install protobuf
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ runner.workspace }}
|
||||||
|
GO111MODULE: off
|
||||||
|
run: |
|
||||||
|
sudo env PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
|
||||||
|
sudo chmod +x /usr/local/bin/protoc
|
||||||
|
sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
|
||||||
|
sudo chmod -R og+r /usr/local/include/google/protobuf/
|
||||||
|
protoc --version
|
||||||
|
|
||||||
|
- name: Go get gogo
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ runner.workspace }}
|
||||||
|
GO111MODULE: off
|
||||||
|
# Get proto files, ignore "package github.com/gogo/googleapis: no Go files in ~/go/src/github.com/gogo/googleapis"
|
||||||
|
run: go get -u github.com/gogo/googleapis || true
|
||||||
|
|
||||||
|
- name: Install dev tools
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ runner.workspace }}
|
||||||
|
GO111MODULE: off
|
||||||
|
run: script/setup/install-dev-tools
|
||||||
|
|
||||||
|
- name: Make
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ runner.workspace }}
|
||||||
|
GO111MODULE: off
|
||||||
|
run: |
|
||||||
|
export PATH=$PATH:$(go env GOPATH)/bin
|
||||||
|
make check-protos check-api-descriptors
|
||||||
|
|
||||||
|
man:
|
||||||
|
name: Mans
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: '1.13.8'
|
||||||
|
|
||||||
|
- name: Set env
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: go get -u github.com/cpuguy83/go-md2man
|
||||||
|
|
||||||
|
- name: Make
|
||||||
|
run: make man
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build containerd binaries
|
||||||
|
#
|
||||||
|
binaries:
|
||||||
|
name: Binaries
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
timeout-minutes: 10
|
||||||
|
needs: [project, linters, protos, man]
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-18.04, macos-10.15, windows-2019]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: '1.13.8'
|
||||||
|
|
||||||
|
- name: Set env
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install Linux dependencies
|
||||||
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y btrfs-tools libseccomp-dev
|
||||||
|
|
||||||
|
- name: Make
|
||||||
|
run: |
|
||||||
|
make build
|
||||||
|
make binaries
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
#
|
||||||
|
# Integration and CRI tests
|
||||||
|
#
|
||||||
|
integration:
|
||||||
|
name: Integration
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
timeout-minutes: 10
|
||||||
|
needs: [project, linters, protos, man]
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
runtime: [v1, v2]
|
||||||
|
runc: [runc, crun]
|
||||||
|
exclude:
|
||||||
|
- runtime: v1
|
||||||
|
runc: crun
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Set env
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
|
- name: Checkout containerd
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install containerd dependencies
|
||||||
|
env:
|
||||||
|
RUNC_FLAVOR: ${{ matrix.runc }}
|
||||||
|
run: |
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-seccomp
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH RUNC_FLAVOR=$RUNC_FLAVOR script/setup/install-runc
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-critools
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install protobuf
|
||||||
|
run: |
|
||||||
|
sudo env PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
|
||||||
|
sudo chmod +x /usr/local/bin/protoc
|
||||||
|
sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
|
||||||
|
sudo chmod -R og+r /usr/local/include/google/protobuf/
|
||||||
|
protoc --version
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install criu
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y \
|
||||||
|
libprotobuf-dev \
|
||||||
|
libprotobuf-c-dev \
|
||||||
|
protobuf-c-compiler \
|
||||||
|
protobuf-compiler \
|
||||||
|
python-protobuf \
|
||||||
|
libnl-3-dev \
|
||||||
|
libnet-dev \
|
||||||
|
libcap-dev \
|
||||||
|
python-future \
|
||||||
|
socat
|
||||||
|
wget https://github.com/checkpoint-restore/criu/archive/v3.13.tar.gz -O criu.tar.gz
|
||||||
|
tar -zxf criu.tar.gz
|
||||||
|
cd criu-3.13
|
||||||
|
sudo make install-criu
|
||||||
|
|
||||||
|
- name: Install containerd
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: 1
|
||||||
|
run: |
|
||||||
|
make binaries
|
||||||
|
sudo make install
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Integration 1
|
||||||
|
env:
|
||||||
|
GOPROXY: direct
|
||||||
|
TEST_RUNTIME: io.containerd.runc.${{ matrix.runtime }}
|
||||||
|
run: |
|
||||||
|
sudo GOPATH=$GOPATH GOPROXY=$GOPROXY TEST_RUNTIME=$TEST_RUNTIME make integration EXTRA_TESTFLAGS=-no-criu 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
|
||||||
|
- name: Integration 2
|
||||||
|
env:
|
||||||
|
GOPROXY: direct
|
||||||
|
TEST_RUNTIME: io.containerd.runc.${{ matrix.runtime }}
|
||||||
|
run: |
|
||||||
|
sudo GOPATH=$GOPATH GOPROXY=$GOPROXY TEST_RUNTIME=$TEST_RUNTIME TESTFLAGS_PARALLEL=1 make integration EXTRA_TESTFLAGS=-no-criu
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: CRI test
|
||||||
|
env:
|
||||||
|
TEST_RUNTIME: io.containerd.runc.${{ matrix.runtime }}
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p /etc/containerd
|
||||||
|
sudo bash -c "cat > /etc/containerd/config.toml <<EOF
|
||||||
|
[plugins.cri.containerd.default_runtime]
|
||||||
|
runtime_type = \"${TEST_RUNTIME}\"
|
||||||
|
EOF"
|
||||||
|
sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log &
|
||||||
|
sudo ctr version
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8
|
||||||
|
TEST_RC=$?
|
||||||
|
test $TEST_RC -ne 0 && cat /tmp/containerd-cri.log
|
||||||
|
sudo pkill containerd
|
||||||
|
sudo rm -rf /etc/containerd
|
||||||
|
test $TEST_RC -eq 0 || /bin/false
|
156
.github/workflows/tests.yml
vendored
156
.github/workflows/tests.yml
vendored
@ -1,156 +0,0 @@
|
|||||||
name: Tests
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- 'release/**'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- 'release/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
integration:
|
|
||||||
name: Integration
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
timeout-minutes: 10
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
runtime: [v1, v2]
|
|
||||||
runc: [runc, crun]
|
|
||||||
exclude:
|
|
||||||
- runtime: v1
|
|
||||||
runc: crun
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
|
||||||
|
|
||||||
- name: Checkout containerd
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
env:
|
|
||||||
RUNC_FLAVOR: ${{ matrix.runc }}
|
|
||||||
run: |
|
|
||||||
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-seccomp
|
|
||||||
sudo PATH=$PATH GOPATH=$GOPATH RUNC_FLAVOR=$RUNC_FLAVOR script/setup/install-runc
|
|
||||||
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install binaries
|
|
||||||
env:
|
|
||||||
CGO_ENABLED: 1
|
|
||||||
run: |
|
|
||||||
make binaries
|
|
||||||
sudo make install
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Integration 1
|
|
||||||
env:
|
|
||||||
GOPROXY: direct
|
|
||||||
TEST_RUNTIME: io.containerd.runc.${{ matrix.runtime }}
|
|
||||||
run: |
|
|
||||||
sudo GOPATH=$GOPATH GOPROXY=$GOPROXY TEST_RUNTIME=$TEST_RUNTIME make integration EXTRA_TESTFLAGS=-no-criu 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
|
|
||||||
- name: Integration 2
|
|
||||||
env:
|
|
||||||
GOPROXY: direct
|
|
||||||
TEST_RUNTIME: io.containerd.runc.${{ matrix.runtime }}
|
|
||||||
run: |
|
|
||||||
sudo GOPATH=$GOPATH GOPROXY=$GOPROXY TEST_RUNTIME=$TEST_RUNTIME TESTFLAGS_PARALLEL=1 make integration EXTRA_TESTFLAGS=-no-criu
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
cri:
|
|
||||||
name: CRI
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
timeout-minutes: 10
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
runtime: [v1, v2]
|
|
||||||
runc: [runc, crun]
|
|
||||||
exclude:
|
|
||||||
- runtime: v1
|
|
||||||
runc: crun
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set env
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
|
||||||
|
|
||||||
- name: Checkout containerd
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
env:
|
|
||||||
RUNC_FLAVOR: ${{ matrix.runc }}
|
|
||||||
run: |
|
|
||||||
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-seccomp
|
|
||||||
sudo PATH=$PATH GOPATH=$GOPATH RUNC_FLAVOR=$RUNC_FLAVOR script/setup/install-runc
|
|
||||||
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni
|
|
||||||
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-critools
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install protobuf
|
|
||||||
run: |
|
|
||||||
sudo env PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
|
|
||||||
sudo chmod +x /usr/local/bin/protoc
|
|
||||||
sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
|
|
||||||
sudo chmod -R og+r /usr/local/include/google/protobuf/
|
|
||||||
protoc --version
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Install criu
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y \
|
|
||||||
libprotobuf-dev \
|
|
||||||
libprotobuf-c-dev \
|
|
||||||
protobuf-c-compiler \
|
|
||||||
protobuf-compiler \
|
|
||||||
python-protobuf \
|
|
||||||
libnl-3-dev \
|
|
||||||
libnet-dev \
|
|
||||||
libcap-dev \
|
|
||||||
python-future \
|
|
||||||
socat
|
|
||||||
wget https://github.com/checkpoint-restore/criu/archive/v3.13.tar.gz -O criu.tar.gz
|
|
||||||
tar -zxf criu.tar.gz
|
|
||||||
cd criu-3.13
|
|
||||||
sudo make install-criu
|
|
||||||
|
|
||||||
- name: Install containerd
|
|
||||||
run: |
|
|
||||||
make binaries
|
|
||||||
sudo make install
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: CRI test
|
|
||||||
env:
|
|
||||||
TEST_RUNTIME: io.containerd.runc.${{ matrix.runtime }}
|
|
||||||
run: |
|
|
||||||
sudo mkdir -p /etc/containerd
|
|
||||||
sudo bash -c "cat > /etc/containerd/config.toml <<EOF
|
|
||||||
[plugins.cri.containerd.default_runtime]
|
|
||||||
runtime_type = \"${TEST_RUNTIME}\"
|
|
||||||
EOF"
|
|
||||||
sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log &
|
|
||||||
sudo ctr version
|
|
||||||
sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8
|
|
||||||
TEST_RC=$?
|
|
||||||
test $TEST_RC -ne 0 && cat /tmp/containerd-cri.log
|
|
||||||
sudo pkill containerd
|
|
||||||
sudo rm -rf /etc/containerd
|
|
||||||
test $TEST_RC -eq 0 || /bin/false
|
|
Loading…
Reference in New Issue
Block a user