@ -43,13 +43,18 @@ ci:
- target
- target
- .gitlab-ci.d
- .gitlab-ci.d
nix: artifacts:
artifacts:
stage : artifacts
stage : artifacts
image : nixos/nix:2.20.4
image : nixos/nix:2.20.4
script:
script:
- ./bin/nix-build-and-cache .#static-x86_64-unknown-linux-musl
- ./bin/nix-build-and-cache .#static-x86_64-unknown-linux-musl
- cp result/bin/conduit x86_64-unknown-linux-musl
- cp result/bin/conduit x86_64-unknown-linux-musl
- mkdir -p target/release
- cp result/bin/conduit target/release
- direnv exec . cargo deb --no-build
- mv target/debian/*.deb x86_64-unknown-linux-musl.deb
# Since the OCI image package is based on the binary package, this has the
# Since the OCI image package is based on the binary package, this has the
# fun side effect of uploading the normal binary too. Conduit users who are
# fun side effect of uploading the normal binary too. Conduit users who are
# deploying with Nix can leverage this fact by adding our binary cache to
# deploying with Nix can leverage this fact by adding our binary cache to
@ -70,29 +75,10 @@ nix:artifacts:
paths:
paths:
- x86_64-unknown-linux-musl
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-musl.deb
- oci-image-amd64.tar.gz
- oci-image-amd64.tar.gz
- oci-image-arm64v8.tar.gz
- oci-image-arm64v8.tar.gz
debian:x86_64-unknown-linux-gnu:
stage : artifacts
# See also `rust-toolchain.toml`
image : rust:1.75.0
script:
- apt-get update && apt-get install -y --no-install-recommends libclang-dev
- cargo install cargo-deb
- cargo deb
# Make the output less difficult to find
- mv target/debian/*.deb conduit.deb
artifacts:
paths:
- conduit.deb
cache:
key : debian
paths:
- target
- .gitlab-ci.d
.push-oci-image:
.push-oci-image:
stage : publish
stage : publish
image : docker:25.0.0
image : docker:25.0.0
@ -124,7 +110,7 @@ debian:x86_64-unknown-linux-gnu:
docker manifest push $IMAGE_NAME:latest
docker manifest push $IMAGE_NAME:latest
fi
fi
dependencies:
dependencies:
- nix: artifacts
- artifacts
only:
only:
- next
- next
- master
- master