Merge pull request #7489 from AkihiroSuda/switch-away-from-ubuntu-18.04

CI: update GHA instances from Ubuntu 18.04 to 20.04
This commit is contained in:
Kazuyoshi Kato 2022-10-13 11:33:55 -07:00 committed by GitHub
commit 766e933151
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 23 deletions

View File

@ -25,9 +25,15 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-18.04, macos-12, windows-2019] os: [ubuntu-20.04, macos-12, windows-2019]
steps: steps:
- name: Install dependencies
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libbtrfs-dev
- uses: actions/setup-go@v3 - uses: actions/setup-go@v3
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
@ -44,7 +50,7 @@ jobs:
# #
project: project:
name: Project Checks name: Project Checks
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
@ -72,7 +78,7 @@ jobs:
# #
protos: protos:
name: Protobuf name: Protobuf
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
timeout-minutes: 5 timeout-minutes: 5
defaults: defaults:
@ -108,7 +114,7 @@ jobs:
man: man:
name: Manpages name: Manpages
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
@ -218,9 +224,15 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-18.04, macos-12, windows-2019, windows-2022] os: [ubuntu-20.04, macos-12, windows-2019, windows-2022]
go-version: ["1.19.2", "1.18.7"] go-version: ["1.19.2", "1.18.7"]
steps: steps:
- name: Install dependencies
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libbtrfs-dev
- uses: actions/setup-go@v3 - uses: actions/setup-go@v3
with: with:
go-version: ${{ matrix.go-version }} go-version: ${{ matrix.go-version }}
@ -402,7 +414,7 @@ jobs:
integration-linux: integration-linux:
name: Linux Integration name: Linux Integration
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
timeout-minutes: 40 timeout-minutes: 40
needs: [project, linters, protos, man] needs: [project, linters, protos, man]
@ -436,7 +448,7 @@ jobs:
env: env:
RUNC_FLAVOR: ${{ matrix.runc }} RUNC_FLAVOR: ${{ matrix.runc }}
run: | run: |
sudo apt-get install -y gperf sudo apt-get install -y gperf libbtrfs-dev
script/setup/install-seccomp script/setup/install-seccomp
script/setup/install-runc script/setup/install-runc
script/setup/install-cni $(grep containernetworking/plugins go.mod | awk '{print $2}') script/setup/install-cni $(grep containernetworking/plugins go.mod | awk '{print $2}')

View File

@ -11,7 +11,7 @@ env:
jobs: jobs:
check: check:
name: Check Signed Tag name: Check Signed Tag
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
timeout-minutes: 5 timeout-minutes: 5
outputs: outputs:
stringver: ${{ steps.contentrel.outputs.stringver }} stringver: ${{ steps.contentrel.outputs.stringver }}
@ -53,29 +53,29 @@ jobs:
build: build:
name: Build Release Binaries name: Build Release Binaries
runs-on: ubuntu-${{ matrix.ubuntu }} runs-on: ubuntu-20.04
needs: [check] needs: [check]
timeout-minutes: 30 timeout-minutes: 30
strategy: strategy:
matrix: matrix:
include: include:
# Choose an old release of Ubuntu to avoid glibc issue https://github.com/containerd/containerd/issues/7255 # Choose an old release of Ubuntu to avoid glibc issue https://github.com/containerd/containerd/issues/7255
- ubuntu: 18.04 - dockerfile-ubuntu: 18.04
platform: linux/amd64 dockerfile-platform: linux/amd64
- ubuntu: 18.04 - dockerfile-ubuntu: 18.04
platform: linux/arm64 dockerfile-platform: linux/arm64
- ubuntu: 18.04 - dockerfile-ubuntu: 18.04
platform: linux/ppc64le dockerfile-platform: linux/ppc64le
# riscv64 isn't supported by Ubuntu 18.04 # riscv64 isn't supported by Ubuntu 18.04
- ubuntu: 22.04 - dockerfile-ubuntu: 22.04
platform: linux/riscv64 dockerfile-platform: linux/riscv64
- ubuntu: 18.04 - dockerfile-ubuntu: 18.04
platform: windows/amd64 dockerfile-platform: windows/amd64
steps: steps:
- name: Set env - name: Set env
shell: bash shell: bash
env: env:
MOS: ubuntu-${{ matrix.ubuntu }} MOS: ubuntu-20.04
run: | run: |
releasever=${{ github.ref }} releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}" releasever="${releasever#refs/tags/}"
@ -107,14 +107,14 @@ jobs:
export PREFIX_LEN=12 export PREFIX_LEN=12
BUILD_ARGS="--build-arg GATEWAY --build-arg PREFIX_LEN" BUILD_ARGS="--build-arg GATEWAY --build-arg PREFIX_LEN"
fi fi
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ . docker buildx build ${cache} --build-arg RELEASE_VER --build-arg UBUNTU_VERSION=${{ matrix.dockerfile-ubuntu }} --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
echo PLATFORM_CLEAN=${PLATFORM/\//-} >> $GITHUB_ENV echo PLATFORM_CLEAN=${PLATFORM/\//-} >> $GITHUB_ENV
# Remove symlinks since we don't want these in the release Artifacts # Remove symlinks since we don't want these in the release Artifacts
find ./releases/ -maxdepth 1 -type l | xargs rm find ./releases/ -maxdepth 1 -type l | xargs rm
working-directory: src/github.com/containerd/containerd working-directory: src/github.com/containerd/containerd
env: env:
PLATFORM: ${{ matrix.platform }} PLATFORM: ${{ matrix.dockerfile-platform }}
- name: Save Artifacts - name: Save Artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
@ -123,7 +123,7 @@ jobs:
release: release:
name: Create containerd Release name: Create containerd Release
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
timeout-minutes: 10 timeout-minutes: 10
needs: [build, check] needs: [build, check]
steps: steps: