Add matrix objects
continuous-integration/drone/push Build is failing Details

Signed-off-by: Jacob Kiers <jacob@jacobkiers.net>
This commit is contained in:
Jacob Kiers 2022-09-07 20:50:04 +02:00
parent eb9d8c58f5
commit a866a5ada2
1 changed files with 12 additions and 10 deletions

View File

@ -1,12 +1,12 @@
local archs = [
'aarch64-unknown-linux-gnu',
'aarch64-unknown-linux-musl',
'x86_64-pc-windows-gnu',
'x86_64-unknown-linux-gnu',
'x86_64-unknown-linux-musl',
{ target: 'aarch64-unknown-linux-gnu', short: 'arm64-gnu' },
{ target: 'aarch64-unknown-linux-musl', short: 'arm64-musl' },
{ target: 'x86_64-pc-windows-gnu', short: 'windows-amd64' },
{ target: 'x86_64-unknown-linux-gnu', short: 'amd64-gnu' },
{ target: 'x86_64-unknown-linux-musl', short: 'amd64-musl' },
];
local getStepName(arch) = 'check ' + arch;
local getStepName(arch) = 'check ' + arch.short;
local buildForArch(arch) = {
name: getStepName(arch),
@ -22,10 +22,10 @@ local buildForArch(arch) = {
},
],
commands: [
'echo Hello World from Jsonnet on ' + arch + '!',
'cross build --release --target ' + arch,
'rm -rf target/' + arch + '/release/{build,deps,examples,incremental}',
'ls -lah target/' + arch + '/release',
'echo Hello World from Jsonnet on ' + arch.target + '!',
'cross build --release --target ' + arch.target,
'rm -rf target/' + arch.target + '/release/{build,deps,examples,incremental}',
'cp target/' + arch.target + '/release/drone-test artifacts/drone-test-' + arch.short,
],
environment: {
CROSS_REMOTE: true,
@ -53,6 +53,7 @@ local check_steps() = [
'while ! docker image ls; do sleep 1; done',
'docker info',
'docker pull hello-world:latest',
'mkdir artifacts',
],
volumes: [{
name: 'dockersock',
@ -66,6 +67,7 @@ local check_steps() = [
image: 'img.kie.rs/jjkiers/rust-dind-cross:1.62-slim',
commands: [
'ls -lah target/',
'ls -lah artifacts',
],
depends_on: [getStepName(a) for a in archs],
},