From 6a30d2f654f5b73111f5aa7a8fa6931b26b450c4 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 17 Sep 2024 17:12:10 +0300 Subject: [PATCH] Env --- .github/actions/nss/action.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/actions/nss/action.yml b/.github/actions/nss/action.yml index 3c2b1b958e..31e3b15d17 100644 --- a/.github/actions/nss/action.yml +++ b/.github/actions/nss/action.yml @@ -169,16 +169,9 @@ runs: # See https://github.com/ilammy/msvc-dev-cmd#name-conflicts-with-shell-bash rm /usr/bin/link.exe || true - - name: Build + - name: Set up environment shell: bash run: | - if [ "${{ inputs.type }}" != "Debug" ]; then - # We want to do an optimized build for accurate CPU profiling, but - # we also want debug symbols and frame pointers for that, which the normal optimized NSS - # build process doesn't provide. - OPT="-o" - [ "${{ runner.os }}" != "Windows" ] && export CFLAGS="-ggdb3 -fno-omit-frame-pointer" - fi NSS_TARGET="${{ inputs.type }}" echo "NSS_TARGET=$NSS_TARGET" >> "$GITHUB_ENV" NSS_OUT="$NSS_DIR/../dist/$NSS_TARGET" @@ -186,8 +179,20 @@ runs: echo "DYLD_FALLBACK_LIBRARY_PATH=$NSS_OUT/lib" >> "$GITHUB_ENV" echo "$NSS_OUT/lib" >> "$GITHUB_PATH" echo "NSS_DIR=$NSS_DIR" >> "$GITHUB_ENV" - [ "$SCCACHE_CC" ] && [ "$SCCACHE_CXX" ] && export CC="$SCCACHE_CC" CXX="$SCCACHE_CXX" - [ "$BUILD_NSS" == "1" ] && $NSS_DIR/build.sh -g -Ddisable_tests=1 $OPT --static env: NSS_DIR: ${{ github.workspace }}/nss NSPR_DIR: ${{ github.workspace }}/nspr + + - name: Build + shell: bash + if: env.BUILD_NSS == '1' + run: | + if [ "${{ inputs.type }}" != "Debug" ]; then + # We want to do an optimized build for accurate CPU profiling, but + # we also want debug symbols and frame pointers for that, which the normal optimized NSS + # build process doesn't provide. + OPT="-o" + [ "${{ runner.os }}" != "Windows" ] && export CFLAGS="-ggdb3 -fno-omit-frame-pointer" + fi + [ "$SCCACHE_CC" ] && [ "$SCCACHE_CXX" ] && export CC="$SCCACHE_CC" CXX="$SCCACHE_CXX" + $NSS_DIR/build.sh -g -Ddisable_tests=1 $OPT --static