From f15c066fd96c9e1b12930f3a5e79c48dedd9e54f Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 17 Sep 2024 17:31:50 +0300 Subject: [PATCH] NSS_PREBUILT --- .github/actions/nss/action.yml | 1 + neqo-crypto/build.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/nss/action.yml b/.github/actions/nss/action.yml index 31e3b15d17..d0d1b172bd 100644 --- a/.github/actions/nss/action.yml +++ b/.github/actions/nss/action.yml @@ -179,6 +179,7 @@ runs: echo "DYLD_FALLBACK_LIBRARY_PATH=$NSS_OUT/lib" >> "$GITHUB_ENV" echo "$NSS_OUT/lib" >> "$GITHUB_PATH" echo "NSS_DIR=$NSS_DIR" >> "$GITHUB_ENV" + echo "NSS_PREBUILT=1" >> "$GITHUB_ENV" env: NSS_DIR: ${{ github.workspace }}/nss NSPR_DIR: ${{ github.workspace }}/nspr diff --git a/neqo-crypto/build.rs b/neqo-crypto/build.rs index 34cc842b5e..69ab267f6b 100644 --- a/neqo-crypto/build.rs +++ b/neqo-crypto/build.rs @@ -317,7 +317,10 @@ fn setup_standalone(nss: &str) -> Vec { "The NSS_DIR environment variable is expected to be an absolute path." ); - build_nss(nss.clone()); + // If NSS_PREBUILT is set, we assume that the NSS libraries are already built. + if env::var("NSS_PREBUILT").unwrap_or_default() != "1" { + build_nss(nss.clone()); + } // $NSS_DIR/../dist/ let nssdist = nss.parent().unwrap().join("dist");