Compare commits

..

No commits in common. "b5a83988e899197986efaf4009f329a2778cccd9" and "a427e41bd501e8546cbd47f2a584dab40b9e8cdf" have entirely different histories.

View File

@ -1,17 +1,14 @@
local archs = [
{ 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-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) = 'Build for ' + arch.short;
local getStepName(arch) = 'check ' + arch.short;
local getExeName(arch) = if std.startsWith(arch.short, 'windows') then '.exe' else '';
local add_build_steps() = [
{
local buildForArch(arch) = {
name: getStepName(arch),
image: 'img.kie.rs/jjkiers/rust-dind-cross:1.62-slim',
volumes: [
@ -27,15 +24,18 @@ local add_build_steps() = [
commands: [
'echo Hello World from Jsonnet on ' + arch.target + '!',
'cross build --release --target ' + arch.target,
'cp target/' + arch.target + '/release/drone-test' + getExeName(arch) + ' artifacts/drone-test-' + arch.short + getExeName(arch),
'rm -rf target/' + arch.target + '/release/*',
'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'],
}
for arch in archs
};
local check_steps() = [
buildForArch(a)
for a in archs
];
{
@ -47,7 +47,7 @@ local add_build_steps() = [
},
steps:
[{
name: 'Wait for Docker',
name: 'wait-for-docker',
image: 'img.kie.rs/jjkiers/rust-dind-cross:1.62-slim',
commands: [
'while ! docker image ls; do sleep 1; done',
@ -60,12 +60,13 @@ local add_build_steps() = [
path: '/var/run',
}],
}] +
add_build_steps() +
check_steps() +
[
{
name: 'Show built artifacts',
name: 'build',
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],