Fully remove docker-in-docker and cross
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: Jacob Kiers <code@kiers.eu>
This commit is contained in:
parent
3b5016b887
commit
b7cfd7c758
@ -12,25 +12,21 @@ local getStepName(arch) = 'Build for ' + arch.short;
|
||||
local builtExecutableName(arch) = executableName + if std.length(std.findSubstr(arch.short, 'windows')) > 0 then '.exe' else '';
|
||||
local targetExecutableName(arch) = executableName + '-' + arch.target + if std.length(std.findSubstr(arch.short, 'windows')) > 0 then '.exe' else '';
|
||||
|
||||
//local rustupAddTarget(arch) = 'rustup target add ' + arch.target;
|
||||
|
||||
local add_build_steps() = [
|
||||
{
|
||||
name: getStepName(arch),
|
||||
image: build_image,
|
||||
volumes: [
|
||||
{
|
||||
name: 'dockersock',
|
||||
path: '/var/run',
|
||||
},
|
||||
],
|
||||
commands: [
|
||||
'echo Hello World from Jsonnet on ' + arch.target + '!',
|
||||
'rustup target add ' + arch.target,
|
||||
'scripts/prepare-build.sh',
|
||||
'cross zigbuild --release --target ' + arch.target,
|
||||
'cargo zigbuild --release --target ' + arch.target,
|
||||
'cp target/' + arch.target + '/release/' + builtExecutableName(arch) + ' artifacts/' + targetExecutableName(arch),
|
||||
'rm -rf target/' + arch.target + '/release/*',
|
||||
],
|
||||
depends_on: ['Wait for Docker'],
|
||||
// depends_on: ['Prepare'],
|
||||
}
|
||||
for arch in archs
|
||||
];
|
||||
@ -43,26 +39,12 @@ local add_build_steps() = [
|
||||
arch: 'amd64',
|
||||
},
|
||||
steps:
|
||||
[{
|
||||
name: 'Wait for Docker',
|
||||
image: build_image,
|
||||
commands: [
|
||||
'mkdir artifacts',
|
||||
'echo Using image: ' + build_image,
|
||||
'while ! docker image ls; do sleep 1; done',
|
||||
'cargo --version',
|
||||
'rustc --version',
|
||||
'docker info',
|
||||
'docker pull hello-world:latest',
|
||||
],
|
||||
environment: {
|
||||
CROSS_REMOTE: true,
|
||||
},
|
||||
volumes: [{
|
||||
name: 'dockersock',
|
||||
path: '/var/run',
|
||||
}],
|
||||
}] +
|
||||
// [{
|
||||
// name: 'Prepare',
|
||||
// image: build_image,
|
||||
// commands: ['scripts/prepare-build.sh'] +
|
||||
// [rustupAddTarget(a) for a in archs],
|
||||
// }] +
|
||||
add_build_steps() +
|
||||
[
|
||||
{
|
||||
@ -91,28 +73,5 @@ local add_build_steps() = [
|
||||
},
|
||||
],
|
||||
|
||||
services: [{
|
||||
name: 'docker',
|
||||
image: 'docker:dind',
|
||||
privileged: true,
|
||||
volumes: [
|
||||
{
|
||||
name: 'dockersock',
|
||||
path: '/var/run',
|
||||
},
|
||||
{
|
||||
name: 'docker-storage',
|
||||
path: '/var/lib/docker',
|
||||
},
|
||||
],
|
||||
}],
|
||||
|
||||
volumes: [
|
||||
{
|
||||
name: 'dockersock',
|
||||
temp: {},
|
||||
},
|
||||
],
|
||||
|
||||
image_pull_secrets: ['docker_private_repo'],
|
||||
}
|
||||
|
@ -2,16 +2,18 @@
|
||||
set -x
|
||||
apt-get update && apt-get install -y jq curl
|
||||
|
||||
pushd $(mktmp -d)
|
||||
|
||||
# Install minisign
|
||||
wget https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz -O - | tar --strip-components 2 -C /usr/local/bin/ -vxzf - minisign-linux/x86_64/minisign
|
||||
wget -nv https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz -O - | tar --strip-components 2 -C /usr/local/bin/ -vxzf - minisign-linux/x86_64/minisign
|
||||
|
||||
# Installing zig, checking its validity
|
||||
mkdir -p /usr/local/bin
|
||||
wget https://ziglang.org/download/index.json -O zig-versions.json
|
||||
wget -nv https://ziglang.org/download/index.json -O zig-versions.json
|
||||
|
||||
echo "$(jq -r '.master."x86_64-linux".shasum' zig-versions.json) zig.tar.xz" > zig.tar.xz.shasum
|
||||
wget -c $(jq -r '.master."x86_64-linux".tarball' zig-versions.json) -O zig.tar.xz
|
||||
wget -c "$(jq -r '.master."x86_64-linux".tarball' zig-versions.json).minisig" -O zig.tar.xz.minisig
|
||||
wget -nv -c $(jq -r '.master."x86_64-linux".tarball' zig-versions.json) -O zig.tar.xz
|
||||
wget -nv -c "$(jq -r '.master."x86_64-linux".tarball' zig-versions.json).minisig" -O zig.tar.xz.minisig
|
||||
sha256sum -c zig.tar.xz.shasum
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
@ -36,4 +38,6 @@ rm -rf zig*
|
||||
|
||||
# Installing binstall and zigbuild
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
cargo binstall -y cargo-zigbuild
|
||||
cargo binstall -y cargo-zigbuild
|
||||
|
||||
popd
|
Loading…
Reference in New Issue
Block a user