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

Problem: cross-compiling don't work #874

Merged
merged 16 commits into from
Feb 23, 2023

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Feb 15, 2023

Solution:

  • support cross-compiling in most of cases, now we can release all rocksdb enabled binaries in github action without emulator.
  • need a few tweaks on upstream

Support cross-compiling modes:

Build Machine Host Machine
Linux Linux of different architecture
Linux Windows(mingwW64)
x86_64-darwin aarch64-darwin

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

flake.nix Outdated Show resolved Hide resolved
flake.nix Outdated Show resolved Hide resolved
flake.nix Outdated Show resolved Hide resolved
default.nix Outdated Show resolved Hide resolved
@yihuang yihuang force-pushed the cross-compiling branch 4 times, most recently from 0d052af to 0c433a5 Compare February 22, 2023 03:14
@yihuang yihuang marked this pull request as ready for review February 22, 2023 03:15
@yihuang yihuang requested a review from a team as a code owner February 22, 2023 03:15
@yihuang yihuang requested review from calvinaco and devashishdxt and removed request for a team February 22, 2023 03:15
Solution:
- remove some obstacles, now it at least works for linux.
- darwin still need some fixes in nixpkgs side, see: NixOS/nixpkgs#216431

update release flow

upload build result to check

Problem: windows build in CI fails (crypto-org-chain#868)

* Problem: windows build in CI fails

Solution:
- patch grocksdb to remove binding of not exported apis
- add workflow to test windows build in PR

* use crypto-org-chain fork

update gomod2nix

fix mac cross compiling

fix cross-compiling tarball

windows bundle script

support windows tarball

add unified job for cross-compiling

grocksdb link options

configure differnt build machine for different hosts

don't fail fast

simplify

don't run unittest in nix build

update grocksdb dependency

tidy

fix grocksdb

grocksdb upstream repo
app/versiondb_placeholder.go Outdated Show resolved Hide resolved
scripts/release.sh Outdated Show resolved Hide resolved
@yihuang yihuang enabled auto-merge (squash) February 23, 2023 04:22
@yihuang yihuang added the backport/v1.0.x backport to release/v1.0.x label Feb 23, 2023
@yihuang yihuang merged commit 65d7297 into crypto-org-chain:main Feb 23, 2023
yihuang added a commit to yihuang/cronos that referenced this pull request Feb 23, 2023
Solution:
- update nixpkgs and workaround for some issues.

Signed-off-by: yihuang <huang@crypto.com>
yihuang added a commit that referenced this pull request Feb 23, 2023
* Problem: cross-compiling don't work (backport #874)

Solution:
- update nixpkgs and workaround for some issues.

Signed-off-by: yihuang <huang@crypto.com>

* remove build-windows job

* remove build-windows.sh

---------

Signed-off-by: yihuang <huang@crypto.com>
@yihuang yihuang deleted the cross-compiling branch March 1, 2023 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v1.0.x backport to release/v1.0.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants