Skip to content

Commit 45697b6

Browse files
committed
ci: change to use GitHub actions
Signed-off-by: PoAn Yang <[email protected]>
1 parent fe00de2 commit 45697b6

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

.github/workflows/build.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
jobs:
8+
build-amd64:
9+
name: Build AMD64 binaries
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
# Build binaries
16+
- name: Run ci
17+
run: make ci
18+
19+
- uses: codecov/codecov-action@v4
20+
with:
21+
files: ./coverage.out
22+
flags: unittests
23+
token: ${{ secrets.CODECOV_TOKEN }}
24+
25+
build-arm64:
26+
name: Build ARM64 binaries
27+
runs-on: oracle-aarch64-2cpu-8gb
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
32+
# Build binaries
33+
- name: Run ci
34+
run: make ci
35+
36+
- uses: codecov/codecov-action@v4
37+
with:
38+
files: ./coverage.out
39+
flags: unittests
40+
token: ${{ secrets.CODECOV_TOKEN }}

Dockerfile.dapper

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.suse.com/bci/bci-base:15.5
1+
FROM registry.suse.com/bci/golang:1.22
22

33
ARG DAPPER_HOST_ARCH=amd64
44
ARG http_proxy
@@ -24,13 +24,9 @@ RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/syste
2424
RUN zypper -n install cmake curl wget git gcc tar xsltproc docbook-xsl-stylesheets python3 meson ninja python3-pip \
2525
e2fsprogs xfsprogs util-linux-systemd python3-pyelftools libcmocka-devel device-mapper
2626

27-
# Install Go & tools
28-
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH_s390x=s390x GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
29-
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
30-
RUN wget -O - https://storage.googleapis.com/golang/go1.22.2.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local
27+
# Install golangci-lint
3128
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
3229

33-
3430
# Build SPDK
3531
ENV SPDK_DIR /usr/src/spdk
3632
ENV SPDK_COMMIT_ID 62a8f8a9c5ac99f6e63d654f6fc6c427c5d8815b

0 commit comments

Comments
 (0)