Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Mar 7, 2024
1 parent b6a1fad commit 8e6a1b5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
28 changes: 14 additions & 14 deletions .github/actions/nss/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Fetch and build NSS
description: Fetch and build NSS

inputs:
type:
description: 'Whether to do a debug or release build of NSS'
required: true
default: 'Debug'
description: "Whether to do a debug or release build of NSS"
default: "Release"

# This step might be removed if the distro included a recent enough
# version of NSS. Ubuntu 20.04 only has 3.49, which is far too old.
Expand All @@ -19,31 +19,31 @@ runs:
- name: Checkout NSPR
uses: actions/checkout@v4
with:
repository: 'nss-dev/nspr'
repository: "nss-dev/nspr"
path: ${{ github.workspace }}/nspr

- name: Checkout NSS
uses: actions/checkout@v4
with:
repository: 'nss-dev/nss'
repository: "nss-dev/nss"
path: ${{ github.workspace }}/nss

- name: Build
shell: bash
run: |
# We want to do an optimized build for accurate CPU profiling, but
# we also want debug symbols for that, which the normal optimized NSS
# build process doesn't provide.
[ "${{ runner.os }}" != "Windows" ] && export CFLAGS=-ggdb3
if [ "${{ inputs.type }}" != "Debug" ]; then
export OPT="-o"
export NSS_TARGET=Release
# 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"
NSS_TARGET=Release
[ "${{ runner.os }}" != "Windows" ] && CFLAGS="-ggdb3 -fnoomit-frame-pointer"
else
export NSS_TARGET=Debug
NSS_TARGET=Debug
fi
$NSS_DIR/build.sh -g -Ddisable_tests=1 $OPT --static
$NSS_DIR/build.sh -g -Ddisable_tests=1 $OPT --static -v
echo "NSS_TARGET=$NSS_TARGET" >> "$GITHUB_ENV"
export NSS_OUT="$NSS_DIR/../dist/$NSS_TARGET"
NSS_OUT="$NSS_DIR/../dist/$NSS_TARGET"
echo "LD_LIBRARY_PATH=$NSS_OUT/lib" >> "$GITHUB_ENV"
echo "DYLD_FALLBACK_LIBRARY_PATH=$NSS_OUT/lib" >> "$GITHUB_ENV"
echo "$NSS_OUT/lib" >> "$GITHUB_PATH"
Expand Down
3 changes: 1 addition & 2 deletions .github/actions/rust/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Install Rust
description: Install Rust and related tools

inputs:
version:
description: 'Rust toolchain version to install'
required: true
default: 'stable'
components:
description: 'Rust components to install'
required: false
default: ''

runs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:

- name: Fetch and build NSS and NSPR
uses: ./.github/actions/nss
with:
type: Release

- name: Build
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ jobs:
- name: Fetch and build NSS and NSPR
uses: ./.github/actions/nss
with:
type: Debug

- name: Build
run: cargo +${{ matrix.rust-toolchain }} build $BUILD_TYPE --all-targets --features ci

- name: Run tests and determine coverage
run: |
cargo +${{ matrix.rust-toolchain }} llvm-cov nextest $BUILD_TYPE --all-targets --features ci --no-fail-fast --lcov --output-path lcov.info
find $NSS_DIR/../dist
cargo +${{ matrix.rust-toolchain }} bench --features bench --no-run || find $NSS_DIR/../dist
cargo +${{ matrix.rust-toolchain }} bench --features bench --no-run
- name: Run client/server transfer
run: |
Expand All @@ -128,7 +128,7 @@ jobs:
- name: Check formatting
run: |
if [ "${{ matrix.rust-toolchain }}" != "nightly" ]; then
export CONFIG_PATH="--config-path=$(mktemp)"
CONFIG_PATH="--config-path=$(mktemp)"
fi
cargo +${{ matrix.rust-toolchain }} fmt --all -- --check $CONFIG_PATH
if: success() || failure()
Expand Down
1 change: 1 addition & 0 deletions neqo-crypto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ fn build_nss(dir: PathBuf) {
let mut build_nss = vec![
String::from("./build.sh"),
String::from("-Ddisable_tests=1"),
// Generate static libraries in addition to shared libraries.
String::from("--static"),
];
if !is_debug() {
Expand Down

0 comments on commit 8e6a1b5

Please sign in to comment.