From b7a2482e4dd18598914b359f3bab552ec99f7e4d Mon Sep 17 00:00:00 2001 From: strawberry Date: Thu, 11 Apr 2024 00:12:10 -0400 Subject: [PATCH] output jemalloc and hmalloc builds in CI, add back target check for cargo.toml Signed-off-by: strawberry --- .github/workflows/ci.yml | 120 +++++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + 2 files changed, 121 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5f3f582..f5aa36a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,48 @@ jobs: path: target/debian/*.deb if-no-files-found: error + - name: Build static-x86_64-unknown-linux-musl-jemalloc and Create static deb-x86_64-unknown-linux-musl-jemalloc + run: | + ./bin/nix-build-and-cache .#static-x86_64-unknown-linux-musl-jemalloc + mkdir -p target/release + cp -v -f result/bin/conduit target/release + direnv exec . cargo deb --no-build + + - name: Upload artifact static-x86_64-unknown-linux-musl-jemalloc + uses: actions/upload-artifact@v4 + with: + name: static-x86_64-unknown-linux-musl-jemalloc + path: result/bin/conduit + if-no-files-found: error + + - name: Upload artifact deb-x86_64-unknown-linux-musl-jemalloc + uses: actions/upload-artifact@v4 + with: + name: x86_64-unknown-linux-musl-jemalloc.deb + path: target/debian/*.deb + if-no-files-found: error + + - name: Build static-x86_64-unknown-linux-musl-hmalloc and Create static deb-x86_64-unknown-linux-musl-hmalloc + run: | + ./bin/nix-build-and-cache .#static-x86_64-unknown-linux-musl-hmalloc + mkdir -p target/release + cp -v -f result/bin/conduit target/release + direnv exec . cargo deb --no-build + + - name: Upload artifact static-x86_64-unknown-linux-musl-hmalloc + uses: actions/upload-artifact@v4 + with: + name: static-x86_64-unknown-linux-musl-hmalloc + path: result/bin/conduit + if-no-files-found: error + + - name: Upload artifact deb-x86_64-unknown-linux-musl-hmalloc + uses: actions/upload-artifact@v4 + with: + name: x86_64-unknown-linux-musl-hmalloc.deb + path: target/debian/*.deb + if-no-files-found: error + - name: Build static-aarch64-unknown-linux-musl run: | @@ -130,6 +172,28 @@ jobs: path: result/bin/conduit if-no-files-found: error + - name: Build static-aarch64-unknown-linux-musl-jemalloc + run: | + ./bin/nix-build-and-cache .#static-aarch64-unknown-linux-musl-jemalloc + + - name: Upload artifact static-aarch64-unknown-linux-musl-jemalloc + uses: actions/upload-artifact@v4 + with: + name: static-aarch64-unknown-linux-musl-jemalloc + path: result/bin/conduit + if-no-files-found: error + + - name: Build static-aarch64-unknown-linux-musl-hmalloc + run: | + ./bin/nix-build-and-cache .#static-aarch64-unknown-linux-musl-hmalloc + + - name: Upload artifact static-aarch64-unknown-linux-musl-hmalloc + uses: actions/upload-artifact@v4 + with: + name: static-aarch64-unknown-linux-musl-hmalloc + path: result/bin/conduit + if-no-files-found: error + - name: Build oci-image-x86_64-unknown-linux-gnu run: | @@ -145,6 +209,34 @@ jobs: # don't compress again compression-level: 0 + - name: Build oci-image-x86_64-unknown-linux-gnu-jemalloc + run: | + ./bin/nix-build-and-cache .#oci-image-jemalloc + cp -v -f result oci-image-amd64.tar.gz + + - name: Upload artifact oci-image-x86_64-unknown-linux-gnu-jemalloc + uses: actions/upload-artifact@v4 + with: + name: oci-image-x86_64-unknown-linux-gnu-jemalloc + path: oci-image-amd64.tar.gz + if-no-files-found: error + # don't compress again + compression-level: 0 + + - name: Build oci-image-x86_64-unknown-linux-gnu-hmalloc + run: | + ./bin/nix-build-and-cache .#oci-image-hmalloc + cp -v -f result oci-image-amd64.tar.gz + + - name: Upload artifact oci-image-x86_64-unknown-linux-gnu-hmalloc + uses: actions/upload-artifact@v4 + with: + name: oci-image-x86_64-unknown-linux-gnu-hmalloc + path: oci-image-amd64.tar.gz + if-no-files-found: error + # don't compress again + compression-level: 0 + - name: Build oci-image-aarch64-unknown-linux-musl run: | @@ -160,6 +252,34 @@ jobs: # don't compress again compression-level: 0 + - name: Build oci-image-aarch64-unknown-linux-musl-jemalloc + run: | + ./bin/nix-build-and-cache .#oci-image-aarch64-unknown-linux-musl-jemalloc + cp -v -f result oci-image-arm64v8.tar.gz + + - name: Upload artifact oci-image-aarch64-unknown-linux-musl-jemalloc + uses: actions/upload-artifact@v4 + with: + name: oci-image-aarch64-unknown-linux-musl-jemalloc + path: oci-image-arm64v8.tar.gz + if-no-files-found: error + # don't compress again + compression-level: 0 + + - name: Build oci-image-aarch64-unknown-linux-musl-hmalloc + run: | + ./bin/nix-build-and-cache .#oci-image-aarch64-unknown-linux-musl-hmalloc + cp -v -f result oci-image-arm64v8.tar.gz + + - name: Upload artifact oci-image-aarch64-unknown-linux-musl-hmalloc + uses: actions/upload-artifact@v4 + with: + name: oci-image-aarch64-unknown-linux-musl-hmalloc + path: oci-image-arm64v8.tar.gz + if-no-files-found: error + # don't compress again + compression-level: 0 + - name: Extract metadata for Dockerhub env: diff --git a/Cargo.toml b/Cargo.toml index 94e3e99f..43e2dfa2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -308,6 +308,7 @@ hyperlocal = { git = "https://github.com/softprops/hyperlocal", rev = "2ee4d1496 "server", ] } # unix socket support +[target.'cfg(all(not(target_env = "msvc"), not(target_os = "macos"), target_os = "linux"))'.dependencies] hardened_malloc-rs = { version = "0.1", optional = true, features = [ "static", "clang",