Skip to content

Commit 2952b66

Browse files
committed
CI: add riscv64 builds
Signed-off-by: Akihiro Suda <[email protected]> (cherry picked from commit d4127a9) Signed-off-by: Akihiro Suda <[email protected]>
1 parent 6b2dc9a commit 2952b66

3 files changed

Lines changed: 33 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
crossbuild:
120120
name: Crossbuild Binaries
121121
needs: [project, linters, protos, man]
122-
runs-on: ubuntu-18.04
122+
runs-on: ubuntu-20.04
123123
timeout-minutes: 10
124124
strategy:
125125
fail-fast: false
@@ -135,6 +135,8 @@ jobs:
135135
goarm: "5"
136136
- goos: linux
137137
goarch: ppc64le
138+
- goos: linux
139+
goarch: riscv64
138140
- goos: freebsd
139141
goarch: amd64
140142
- goos: freebsd
@@ -151,7 +153,7 @@ jobs:
151153
- run: |
152154
set -e -x
153155
154-
packages=""
156+
packages="libbtrfs-dev"
155157
platform="${{matrix.goos}}/${{matrix.goarch}}"
156158
if [ -n "${{matrix.goarm}}" ]; then
157159
platform+="/v${{matrix.goarm}}"
@@ -178,6 +180,11 @@ jobs:
178180
echo "CGO_ENABLED=1" >> $GITHUB_ENV
179181
echo "CC=powerpc64le-linux-gnu-gcc" >> $GITHUB_ENV
180182
;;
183+
linux/riscv64)
184+
packages+=" crossbuild-essential-riscv64"
185+
echo "CGO_ENABLED=1" >> $GITHUB_ENV
186+
echo "CC=riscv64-linux-gnu-gcc" >> $GITHUB_ENV
187+
;;
181188
windows/arm/v7)
182189
echo "CGO_ENABLED=0" >> $GITHUB_ENV
183190
;;

.github/workflows/nightly.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,31 @@ jobs:
3636

3737
- name: Install dependencies
3838
run: |
39-
sudo add-apt-repository "deb [arch=arm64,s390x,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc) main" || true
40-
sudo add-apt-repository "deb [arch=arm64,s390x,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-updates main" || true
39+
sudo add-apt-repository "deb [arch=arm64,s390x,ppc64el,riscv64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc) main" || true
40+
sudo add-apt-repository "deb [arch=arm64,s390x,ppc64el,riscv64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-updates main" || true
4141
4242
sudo dpkg --add-architecture arm64
4343
sudo dpkg --add-architecture s390x
4444
sudo dpkg --add-architecture ppc64el
45+
sudo dpkg --add-architecture riscv64
4546
4647
sudo apt-get update || true
4748
4849
sudo apt-get install -y \
4950
crossbuild-essential-arm64 \
5051
crossbuild-essential-s390x \
5152
crossbuild-essential-ppc64el \
53+
crossbuild-essential-riscv64 \
5254
libseccomp-dev:amd64 \
5355
libseccomp-dev:arm64 \
5456
libseccomp-dev:s390x \
5557
libseccomp-dev:ppc64el \
58+
libseccomp-dev:riscv64 \
5659
libbtrfs-dev:amd64 \
5760
libbtrfs-dev:arm64 \
5861
libbtrfs-dev:s390x \
59-
libbtrfs-dev:ppc64el
62+
libbtrfs-dev:ppc64el \
63+
libbtrfs-dev:riscv64
6064
6165
- name: Build amd64
6266
env:
@@ -96,6 +100,16 @@ jobs:
96100
make binaries
97101
mv bin bin_ppc64le
98102
103+
- name: Build riscv64
104+
env:
105+
GOOS: linux
106+
GOARCH: riscv64
107+
CGO_ENABLED: 1
108+
CC: riscv64-linux-gnu-gcc
109+
run: |
110+
make binaries
111+
mv bin bin_riscv64
112+
99113
#
100114
# Upload
101115
#
@@ -124,6 +138,12 @@ jobs:
124138
name: linux_ppc64le
125139
path: src/github.com/containerd/containerd/bin_ppc64le
126140

141+
- name: Upload artifacts (linux_riscv64)
142+
uses: actions/upload-artifact@v1
143+
with:
144+
name: linux_riscv64
145+
path: src/github.com/containerd/containerd/bin_riscv64
146+
127147
windows:
128148
name: Windows
129149
runs-on: windows-latest

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
- linux/amd64
6161
- linux/arm64
6262
- linux/ppc64le
63+
- linux/riscv64
6364
- windows/amd64
6465
steps:
6566
- name: Install Go

0 commit comments

Comments
 (0)