Remove unnecessary function buildForArch()
Signed-off-by: Jacob Kiers <jacob@jacobkiers.net>
This commit is contained in:
parent
a427e41bd5
commit
6bdd545cec
@ -6,36 +6,34 @@ local archs = [
|
||||
{ target: 'x86_64-unknown-linux-musl', short: 'amd64-musl' },
|
||||
];
|
||||
|
||||
local getStepName(arch) = 'check ' + arch.short;
|
||||
local getStepName(arch) = 'build ' + arch.short;
|
||||
|
||||
local buildForArch(arch) = {
|
||||
name: getStepName(arch),
|
||||
image: 'img.kie.rs/jjkiers/rust-dind-cross:1.62-slim',
|
||||
volumes: [
|
||||
{
|
||||
name: 'dockersock',
|
||||
path: '/var/run',
|
||||
local add_build_steps() = [
|
||||
{
|
||||
name: getStepName(arch),
|
||||
image: 'img.kie.rs/jjkiers/rust-dind-cross:1.62-slim',
|
||||
volumes: [
|
||||
{
|
||||
name: 'dockersock',
|
||||
path: '/var/run',
|
||||
},
|
||||
{
|
||||
name: 'rustup',
|
||||
path: '/usr/local/rustup',
|
||||
},
|
||||
],
|
||||
commands: [
|
||||
'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,
|
||||
},
|
||||
{
|
||||
name: 'rustup',
|
||||
path: '/usr/local/rustup',
|
||||
},
|
||||
],
|
||||
commands: [
|
||||
'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,
|
||||
},
|
||||
depends_on: ['wait-for-docker'],
|
||||
};
|
||||
|
||||
local check_steps() = [
|
||||
buildForArch(a)
|
||||
for a in archs
|
||||
depends_on: ['wait-for-docker'],
|
||||
}
|
||||
for arch in archs
|
||||
];
|
||||
|
||||
{
|
||||
@ -60,7 +58,7 @@ local check_steps() = [
|
||||
path: '/var/run',
|
||||
}],
|
||||
}] +
|
||||
check_steps() +
|
||||
add_build_steps() +
|
||||
[
|
||||
{
|
||||
name: 'build',
|
||||
|
Loading…
Reference in New Issue
Block a user