Merge pull request #3829 from mxpv/cross

Cross-build nightly builds (arm64, s390x, ppc64el)
This commit is contained in:
Akihiro Suda 2019-11-15 13:13:45 +09:00 committed by GitHub
commit ec661e8ceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 126 additions and 16 deletions

View File

@ -4,12 +4,9 @@ on:
- cron: '0 0 * * *' # Every day at midnight - cron: '0 0 * * *' # Every day at midnight
jobs: jobs:
binaries: linux:
name: Binaries name: Linux
runs-on: ${{ matrix.os }} runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps: steps:
- name: Set up Go - name: Set up Go
@ -25,21 +22,127 @@ jobs:
with: with:
path: ./src/github.com/containerd/containerd path: ./src/github.com/containerd/containerd
- name: Ubuntu dependencies #
if: contains(matrix.os, 'ubuntu') # Build
run: | #
sudo apt-get install -y \
btrfs-tools \
libseccomp-dev
- name: Make - name: Install dependencies
run: | run: |
make binaries sudo add-apt-repository "deb [arch=arm64,s390x,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc) main" || true
sudo add-apt-repository "deb [arch=arm64,s390x,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-updates main" || true
sudo dpkg --add-architecture arm64
sudo dpkg --add-architecture s390x
sudo dpkg --add-architecture ppc64el
sudo apt-get update || true
sudo apt-get install -y \
crossbuild-essential-arm64 \
crossbuild-essential-s390x \
crossbuild-essential-ppc64el \
libseccomp-dev:amd64 \
libseccomp-dev:arm64 \
libseccomp-dev:s390x \
libseccomp-dev:ppc64el
- name: Build amd64
env: env:
GOPATH: ${{ runner.workspace }} GOPATH: ${{ runner.workspace }}
GOOS: linux
GOARCH: amd64
run: |
make binaries
mv bin bin_amd64
- name: Upload artifacts - name: Build arm64
env:
GOPATH: ${{ runner.workspace }}
GOOS: linux
GOARCH: arm64
CC: aarch64-linux-gnu-gcc
CGO_ENABLED: 1
run: |
make binaries
mv bin bin_arm64
- name: Build s390x
env:
GOPATH: ${{ runner.workspace }}
GOOS: linux
GOARCH: s390x
CGO_ENABLED: 1
CC: s390x-linux-gnu-gcc
run: |
make binaries
mv bin bin_s390x
- name: Build ppc64le
env:
GOPATH: ${{ runner.workspace }}
GOOS: linux
GOARCH: ppc64le
CGO_ENABLED: 1
CC: powerpc64le-linux-gnu-gcc
run: |
make binaries
mv bin bin_ppc64le
#
# Upload
#
- name: Upload artifacts (linux_amd64)
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ${{ matrix.os }} name: linux_amd64
path: bin_amd64
- name: Upload artifacts (linux_arm64)
uses: actions/upload-artifact@v1
with:
name: linux_arm64
path: bin_arm64
- name: Upload artifacts (linux_s390x)
uses: actions/upload-artifact@v1
with:
name: linux_s390x
path: bin_s390x
- name: Upload artifacts (linux_ppc64le)
uses: actions/upload-artifact@v1
with:
name: linux_ppc64le
path: bin_ppc64le
windows:
name: Windows
runs-on: windows-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.12
- name: Checkout
uses: actions/checkout@v1
env:
GOPATH: ${{ runner.workspace }}
GO111MODULE: off
with:
path: ./src/github.com/containerd/containerd
- name: Build amd64
env:
GOPATH: ${{ runner.workspace }}
GOOS: windows
GOARCH: amd64
run: |
make binaries
- name: Upload artifacts (windows_amd64)
uses: actions/upload-artifact@v1
with:
name: windows_amd64
path: bin path: bin

View File

@ -3,6 +3,7 @@
[![GoDoc](https://godoc.org/github.com/containerd/containerd?status.svg)](https://godoc.org/github.com/containerd/containerd) [![GoDoc](https://godoc.org/github.com/containerd/containerd?status.svg)](https://godoc.org/github.com/containerd/containerd)
[![Build Status](https://travis-ci.org/containerd/containerd.svg?branch=master)](https://travis-ci.org/containerd/containerd) [![Build Status](https://travis-ci.org/containerd/containerd.svg?branch=master)](https://travis-ci.org/containerd/containerd)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/containerd/containerd?branch=master&svg=true)](https://ci.appveyor.com/project/mlaventure/containerd-3g73f?branch=master) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/containerd/containerd?branch=master&svg=true)](https://ci.appveyor.com/project/mlaventure/containerd-3g73f?branch=master)
![](https://github.com/containerd/containerd/workflows/Nightly/badge.svg)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fcontainerd%2Fcontainerd.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fcontainerd%2Fcontainerd?ref=badge_shield) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fcontainerd%2Fcontainerd.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fcontainerd%2Fcontainerd?ref=badge_shield)
[![Go Report Card](https://goreportcard.com/badge/github.com/containerd/containerd)](https://goreportcard.com/report/github.com/containerd/containerd) [![Go Report Card](https://goreportcard.com/badge/github.com/containerd/containerd)](https://goreportcard.com/report/github.com/containerd/containerd)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1271/badge)](https://bestpractices.coreinfrastructure.org/projects/1271) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1271/badge)](https://bestpractices.coreinfrastructure.org/projects/1271)
@ -24,6 +25,12 @@ See how to build containerd from source at [BUILDING](BUILDING.md).
If you are interested in trying out containerd see our example at [Getting Started](docs/getting-started.md). If you are interested in trying out containerd see our example at [Getting Started](docs/getting-started.md).
## Nightly builds
There are nightly builds available for download [here](https://github.com/containerd/containerd/actions?query=workflow%3ANightly).
Binaries are generated from `master` branch every night for `Linux` and `Windows`.
Please be aware: nightly builds might have critical bugs, it's not recommended for use in prodution and no support provided.
## Runtime Requirements ## Runtime Requirements