Skip to content

Commit

Permalink
ci_: run generate, update docker file deps
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-sirotin committed Oct 2, 2024
1 parent 8f32e57 commit 5becff3
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
6 changes: 5 additions & 1 deletion _assets/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM golang:1.21-alpine3.18 as builder
ENV CC=clang
ENV CXX=clang++

RUN apk add --no-cache make llvm clang musl-dev linux-headers
RUN apk add --no-cache git make llvm clang musl-dev linux-headers protobuf-dev~3.21

ARG build_tags
ARG build_flags
Expand All @@ -14,6 +14,10 @@ ARG build_target=statusgo
RUN mkdir -p /go/src/github.com/status-im/status-go
WORKDIR /go/src/github.com/status-im/status-go
ADD . .

RUN go install go.uber.org/mock/[email protected]
RUN go install github.com/kevinburke/go-bindata/v4/[email protected]
RUN go install google.golang.org/protobuf/cmd/[email protected]
RUN make $build_target BUILD_TAGS="$build_tags" BUILD_FLAGS="$build_flags" SHELL="/bin/sh"

# Copy the binary to the second image
Expand Down
10 changes: 10 additions & 0 deletions _assets/ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ pipeline {
}
}

stage('Generate') {
environment {
/* Regenerate at least once */
GO_GENERATE_FAST_RECACHE = "true"
}
steps { script {
nix.shell('make generate', pure: false)
} }
}

stage('Compile') {
steps { script {
nix.shell('make statusgo-android', pure: false)
Expand Down
9 changes: 9 additions & 0 deletions _assets/ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ pipeline {
)
/* fix for gomobile complaining about missing packages */
CGO_ENABLED = "1"
/* Use `go generate`, ignore cache on CI.
Also, `go-generate-fast` was struggling with some paths access and didn't work anyway */
GO_GENERATE_FAST = "false"
}

stages {
Expand All @@ -57,6 +60,12 @@ pipeline {
}
}

stage('Generate') {
steps { script {
nix.shell('make generate', pure: false)
} }
}

stage('Compile') {
steps { script {
nix.shell('make statusgo-ios', pure: false, sandbox: false)
Expand Down
10 changes: 10 additions & 0 deletions _assets/ci/Jenkinsfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ pipeline {
}
}

stage('Generate') {
environment {
/* Regenerate at least once */
GO_GENERATE_FAST_RECACHE = "true"
}
steps { script {
nix.shell('make generate', pure: false)
} }
}

/* Sanity-check C bindings */
stage('Build Static Lib') {
steps { script {
Expand Down
11 changes: 10 additions & 1 deletion _assets/ci/Jenkinsfile.tests
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ pipeline {
}
}

stage('Generate') {
environment {
/* Regenerate at least once */
GO_GENERATE_FAST_RECACHE = "true"
}
steps { script {
nix.shell('make generate', pure: false)
} }
}

stage('Vendor Check') {
steps { script {
nix.shell('make vendor', pure: false)
Expand Down Expand Up @@ -166,7 +176,6 @@ pipeline {
"--filter",
"--lightpush"
].join(' ')) { c2 ->
nix.shell('make generate-handlers', pure: true)
withCredentials([
string(
credentialsId: 'codeclimate-test-reporter-id',
Expand Down

0 comments on commit 5becff3

Please sign in to comment.