Merge pull request #7968 from AkihiroSuda/ci-test-release

CI: test release.yml on every PR
This commit is contained in:
Phil Estes 2023-01-20 08:03:27 -05:00 committed by GitHub
commit 3f565daf68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 34 deletions

View File

@ -132,7 +132,8 @@ jobs:
- run: go install github.com/cpuguy83/go-md2man/v2@v2.0.2
- run: make man
# Make sure binaries compile with other platforms
# Make sure binaries compile with other minor platforms.
# Well-known architectures are covered in release.yml.
crossbuild:
name: Crossbuild Binaries
needs: [project, linters, protos, man]
@ -142,20 +143,12 @@ jobs:
fail-fast: false
matrix:
include:
- goos: linux
goarch: arm64
- goos: linux
goarch: arm
goarm: "7"
- goos: linux
goarch: arm
goarm: "5"
- goos: linux
goarch: ppc64le
- goos: linux
goarch: riscv64
- goos: linux
goarch: s390x
- goos: freebsd
goarch: amd64
- goos: freebsd
@ -189,26 +182,6 @@ jobs:
echo "CGO_ENABLED=1" >> $GITHUB_ENV
echo "CC=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
;;
linux/arm64)
packages+=" crossbuild-essential-arm64"
echo "CGO_ENABLED=1" >> $GITHUB_ENV
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
;;
linux/ppc64le)
packages+=" crossbuild-essential-ppc64el"
echo "CGO_ENABLED=1" >> $GITHUB_ENV
echo "CC=powerpc64le-linux-gnu-gcc" >> $GITHUB_ENV
;;
linux/riscv64)
packages+=" crossbuild-essential-riscv64"
echo "CGO_ENABLED=1" >> $GITHUB_ENV
echo "CC=riscv64-linux-gnu-gcc" >> $GITHUB_ENV
;;
linux/s390x)
packages+=" crossbuild-essential-s390x"
echo "CGO_ENABLED=1" >> $GITHUB_ENV
echo "CC=s390x-linux-gnu-gcc" >> $GITHUB_ENV
;;
windows/arm/v7)
echo "CGO_ENABLED=0" >> $GITHUB_ENV
;;

View File

@ -1,7 +1,14 @@
on:
push:
branches:
- main
- "release/**"
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- main
- "release/**"
name: Containerd Release
@ -14,6 +21,7 @@ permissions: # added using https://github.com/step-security/secure-workflows
jobs:
check:
name: Check Signed Tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-20.04
timeout-minutes: 5
outputs:
@ -57,7 +65,6 @@ jobs:
build:
name: Build Release Binaries
runs-on: ubuntu-20.04
needs: [check]
timeout-minutes: 30
strategy:
matrix:
@ -77,15 +84,13 @@ jobs:
- dockerfile-ubuntu: 18.04
dockerfile-platform: windows/amd64
steps:
- name: Set env
- name: Set RELEASE_VER
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
shell: bash
env:
MOS: ubuntu-20.04
run: |
releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}"
echo "RELEASE_VER=${releasever}" >> $GITHUB_ENV
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
- name: Checkout containerd
uses: actions/checkout@v3
with:
@ -128,6 +133,7 @@ jobs:
release:
name: Create containerd Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
runs-on: ubuntu-20.04