Skip to content

Commit

Permalink
Enable drone for cngcrypto
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdurham committed May 10, 2024
1 parent 3fa7beb commit e3fee48
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
21 changes: 19 additions & 2 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ platform:
os: linux
steps:
- commands:
- make generate-ui
- make generate-ui generate-winmanifest
- GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make alloy
image: grafana/alloy-build-image:v0.1.1
name: Build
Expand Down Expand Up @@ -388,6 +388,23 @@ trigger:
type: docker
---
kind: pipeline
name: Build alloy (Windows amd64 cngcrypto)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui generate-winmanifest
- GO_TAGS="builtinassets cngcrypto" GOOS=windows GOARCH=amd64 GOARM= GOEXPERIMENT=cngcrypto
make alloy
image: grafana/alloy-build-image:v0.1.1-boringcrypto
name: Build
trigger:
event:
- pull_request
type: docker
---
kind: pipeline
name: Publish Linux alloy-devel container
platform:
arch: amd64
Expand Down Expand Up @@ -835,6 +852,6 @@ kind: secret
name: updater_private_key
---
kind: signature
hmac: edfc9eabaa8e7af503b548fca203b5e7491258cbf778e172db3fc0cdd23ac3d4
hmac: 3493e2c2bedc85fd77eacc325eda97553ca2da3a00a8a5f9acde3c058562d0e6

...
18 changes: 15 additions & 3 deletions .drone/pipelines/crosscompile.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,20 @@ local targets = [
local targets_boringcrypto = [
'alloy',
];
local targets_boringcrypto_windows = [
'alloy',
];


local os_arch_types_boringcrypto = [
// Linux boringcrypto
{ name: 'Linux amd64 boringcrypto', os: 'linux', arch: 'amd64', experiment: 'boringcrypto' },
{ name: 'Linux arm64 boringcrypto', os: 'linux', arch: 'arm64', experiment: 'boringcrypto' },
];
local windows_os_arch_types_boringcrypto = [
// Windows boringcrypto
{ name: 'Windows amd64 cngcrypto', os: 'windows', arch: 'amd64', experiment: 'cngcrypto', additional_tags: 'cngcrypto' },
];

local build_environments(targets, tuples, image) = std.flatMap(function(target) (
std.map(function(platform) (
Expand All @@ -52,7 +59,7 @@ local build_environments(targets, tuples, image) = std.flatMap(function(target)

target: target,

tags: go_tags[platform.os],
tags: go_tags[platform.os] + (if 'additional_tags' in platform then ' '+platform.additional_tags else '') ,
} + (if 'experiment' in platform then { GOEXPERIMENT: platform.experiment } else {}),

trigger: {
Expand All @@ -63,7 +70,10 @@ local build_environments(targets, tuples, image) = std.flatMap(function(target)
name: 'Build',
image: image,
commands: [
'make generate-ui',
'make generate-ui' +
(if env.GOOS == 'windows'
then ' generate-winmanifest'
else ""),
(if 'GOEXPERIMENT' in env
then 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s GOEXPERIMENT=%(GOEXPERIMENT)s make %(target)s' % env
else 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s make %(target)s') % env,
Expand All @@ -74,4 +84,6 @@ local build_environments(targets, tuples, image) = std.flatMap(function(target)
), targets);

build_environments(targets, os_arch_tuples, build_image.linux) +
build_environments(targets_boringcrypto, os_arch_types_boringcrypto, build_image.boringcrypto)
build_environments(targets_boringcrypto, os_arch_types_boringcrypto, build_image.boringcrypto) +
build_environments(targets_boringcrypto_windows, windows_os_arch_types_boringcrypto, build_image.boringcrypto)

0 comments on commit e3fee48

Please sign in to comment.