Skip to content

Commit

Permalink
Patch ntapi for v1.16.x to provide windows binaries (#31982)
Browse files Browse the repository at this point in the history
* Shift crossbeam comment for upcoming 2nd patch... (#31963)

* Patch ntapi to restore windows build (#31961)

* Patch ntapi to restore windows build

* Update Cargo.lock...

* Add comment for justification of this patching

MSxDOS/ntapi#11
MSxDOS/ntapi#12

* Revert "ci: stop windows building on master temporarily (#31353)"

This reverts commit 2dcdfff.

* Use solana-labs fork

* Ugh..

* Patch ntapi more thoroughly (#31970)

* Patch spl-token-cli build as well...

* Patch sbf/Cargo.toml for consistency

* Remove --locked for cli-arg based patch... (#31971)

* Bump patched ntapi from v0.3.6 to v0.3.7 (#31981)

* Revert "ci: stop windows build (#31893)"

This reverts commit 30f9e43.
  • Loading branch information
ryoqun committed Jun 6, 2023
1 parent 333bb3f commit ca2881a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release-artifacts-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: release-artifacts-auto
on:
push:
branches:
# - master
- master
- v[0-9]+.[0-9]+
- '!v1.16'
tags:
- v[0-9]+.[0-9]+.[0-9]+

Expand Down
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,14 @@ x509-parser = "0.14.0"
zeroize = { version = "1.3", default-features = false }
zstd = "0.11.2"

# for details, see https://github.com/solana-labs/crossbeam/commit/fd279d707025f0e60951e429bf778b4813d1b6bf
[patch.crates-io]
# for details, see https://github.com/solana-labs/crossbeam/commit/fd279d707025f0e60951e429bf778b4813d1b6bf
crossbeam-epoch = { git = "https://github.com/solana-labs/crossbeam", rev = "fd279d707025f0e60951e429bf778b4813d1b6bf" }

# Rust 1.69+ broke ntapi v0.3.x, which doesn't contain proper fix:
# https://github.com/MSxDOS/ntapi/pull/12
ntapi = { git = "https://github.com/solana-labs/ntapi", rev = "97ede981a1777883ff86d142b75024b023f04fad" }

# We include the following crates as our dependencies above from crates.io:
#
# * spl-associated-token-account
Expand Down
5 changes: 2 additions & 3 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions programs/sbf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ members = [
targets = ["x86_64-unknown-linux-gnu"]

[patch.crates-io]
# Rust 1.69+ broke ntapi v0.3.x, which doesn't contain proper fix:
# https://github.com/MSxDOS/ntapi/pull/12
ntapi = { git = "https://github.com/solana-labs/ntapi", rev = "97ede981a1777883ff86d142b75024b023f04fad" }

# We include the following crates as our dependencies from crates.io:
#
# * spl-associated-token-account
Expand Down
6 changes: 5 additions & 1 deletion scripts/cargo-install-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,12 @@ mkdir -p "$installDir/bin"

# Exclude `spl-token` binary for net.sh builds
if [[ -z "$validatorOnly" ]]; then
# the patch-related configs are needed for rust 1.69+ on Windows; see Cargo.toml
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
"$cargo" $maybeRustVersion install --locked spl-token-cli --root "$installDir"
"$cargo" $maybeRustVersion \
--config 'patch.crates-io.ntapi.git="https://github.com/solana-labs/ntapi"' \
--config 'patch.crates-io.ntapi.rev="97ede981a1777883ff86d142b75024b023f04fad"' \
install --locked spl-token-cli --root "$installDir"
fi
)

Expand Down

0 comments on commit ca2881a

Please sign in to comment.