Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLI] Update build_cli_release.ps1 to include openssl #9447

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

0xmigo
Copy link
Contributor

@0xmigo 0xmigo commented Aug 2, 2023

Description

Update the build script to make sure openssl install correctly. Otherwise we will see the following error when running the windows build

error: failed to run custom build command for openssl-sys v0.9.85

Caused by:
  process didn't exit successfully: `D:\a\aptos-core\aptos-core\target\cli\build\openssl-sys-c16c984f65a02d8a\build-script-main` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_DIR
  OPENSSL_DIR unset
  note: vcpkg did not find openssl: Could not find Vcpkg tree: No vcpkg installation found. Set the VCPKG_ROOT environment variable or run 'vcpkg integrate install'

  --- stderr
  thread 'main' panicked at '

  Could not find directory of OpenSSL installation, and this `-sys` crate cannot
  proceed without this knowledge. If OpenSSL is installed and this crate had
  trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
  compilation process.

  Make sure you also have the development packages of openssl installed.
  For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

  If you're in a situation where you think the directory *should* be found
  automatically, please open a bug at https://github.com/sfackler/rust-openssl
  and include information about your system as well as this message.

  $HOST = x86_64-pc-windows-msvc
  $TARGET = x86_64-pc-windows-msvc
  openssl-sys = 0.9.85


  It looks like you're compiling for MSVC but we couldn't detect an OpenSSL
  installation. If there isn't one installed then you can try the rust-openssl
  README for more information about how to download precompiled binaries of
  OpenSSL:

  https://github.com/sfackler/rust-openssl#windows

  ', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openssl-sys-0.9.85\build\find_normal.rs:190:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Compressing CLI to aptos-cli-2.0.3-Windows-x86_64.zip
Compress-Archive: D:\a\aptos-core\aptos-core\scripts\cli\build_cli_release.ps1:32
Line |
  32 |  Compress-Archive -Path target\cli\$CRATE_NAME.exe -DestinationPath $Z …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The path 'target\cli\aptos.exe' either does not exist or is not a valid file system path.

Error: Process completed with exit code 1.

Test Plan

Did a dry run and make sure it build successfully

https://github.com/aptos-labs/aptos-core/actions/runs/5757104296

@0xmigo 0xmigo requested review from gregnazario and a team August 2, 2023 23:50
@0xmigo 0xmigo force-pushed the jin/add_openssl_on_windows_cli_build branch from b032087 to 3e8ffc4 Compare August 3, 2023 00:57
Comment on lines 19 to 26
# Note: This is required to bypass openssl isssue on Windows.
echo "Setting up vcpkg"
echo "VCPKG_ROOT=$VCPKG_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md --clean-after-build

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, this actually should solve the problem how I did it let me see if I can involve it in a new build

@0xmigo 0xmigo force-pushed the jin/add_openssl_on_windows_cli_build branch from 3e8ffc4 to 1ec8b59 Compare August 3, 2023 21:55
@0xmigo 0xmigo force-pushed the jin/add_openssl_on_windows_cli_build branch 2 times, most recently from 8fbcea9 to 07b4ddc Compare August 3, 2023 23:56
@0xmigo 0xmigo force-pushed the jin/add_openssl_on_windows_cli_build branch from 07b4ddc to b38a34b Compare August 4, 2023 00:45
@0xmigo 0xmigo requested review from banool, 0xmaayan, xbtmatt and a team August 4, 2023 02:29
@0xmigo 0xmigo enabled auto-merge (squash) August 4, 2023 15:53
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

✅ Forge suite compat success on aptos-node-v1.5.1 ==> b38a34b6673cd5a828a23b7e2e0819610e1a09d5

Compatibility test results for aptos-node-v1.5.1 ==> b38a34b6673cd5a828a23b7e2e0819610e1a09d5 (PR)
1. Check liveness of validators at old version: aptos-node-v1.5.1
compatibility::simple-validator-upgrade::liveness-check : committed: 4340 txn/s, latency: 7407 ms, (p50: 7200 ms, p90: 10500 ms, p99: 13000 ms), latency samples: 177980
2. Upgrading first Validator to new version: b38a34b6673cd5a828a23b7e2e0819610e1a09d5
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 1879 txn/s, latency: 15563 ms, (p50: 19800 ms, p90: 21900 ms, p99: 22300 ms), latency samples: 92080
3. Upgrading rest of first batch to new version: b38a34b6673cd5a828a23b7e2e0819610e1a09d5
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 1764 txn/s, latency: 15842 ms, (p50: 19000 ms, p90: 22000 ms, p99: 22600 ms), latency samples: 91760
4. upgrading second batch to new version: b38a34b6673cd5a828a23b7e2e0819610e1a09d5
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 3347 txn/s, latency: 9411 ms, (p50: 10200 ms, p90: 13200 ms, p99: 13800 ms), latency samples: 133900
5. check swarm health
Compatibility test for aptos-node-v1.5.1 ==> b38a34b6673cd5a828a23b7e2e0819610e1a09d5 passed
Test Ok

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

✅ Forge suite realistic_env_max_load success on b38a34b6673cd5a828a23b7e2e0819610e1a09d5

two traffics test: inner traffic : committed: 6090 txn/s, latency: 6428 ms, (p50: 6000 ms, p90: 8100 ms, p99: 12900 ms), latency samples: 2636980
two traffics test : committed: 100 txn/s, latency: 3034 ms, (p50: 2800 ms, p90: 3400 ms, p99: 8000 ms), latency samples: 1860
Max round gap was 1 [limit 4] at version 666494. Max no progress secs was 4.355646 [limit 10] at version 666494.
Test Ok

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

✅ Forge suite framework_upgrade success on aptos-node-v1.5.1 ==> b38a34b6673cd5a828a23b7e2e0819610e1a09d5

Compatibility test results for aptos-node-v1.5.1 ==> b38a34b6673cd5a828a23b7e2e0819610e1a09d5 (PR)
Upgrade the nodes to version: b38a34b6673cd5a828a23b7e2e0819610e1a09d5
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 4277 txn/s, latency: 7652 ms, (p50: 7600 ms, p90: 11400 ms, p99: 14100 ms), latency samples: 158280
5. check swarm health
Compatibility test for aptos-node-v1.5.1 ==> b38a34b6673cd5a828a23b7e2e0819610e1a09d5 passed
Test Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants