Skip to content

Commit

Permalink
Backport no OpenSSL to old versions (v1 v2 v3) (#583)
Browse files Browse the repository at this point in the history
* Backport rustls support

* fix release logic
  • Loading branch information
awnion authored Sep 20, 2023
1 parent 7401f2f commit 2ce67be
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 36 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
contents: write

env:
release: ${{ startsWith(github.ref, 'refs/tags/') || github.repository == 'gosh-sh/gosh' }}
release: ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'gosh-sh/gosh' }}
CARGO_TERM_COLOR: always

jobs:
Expand Down Expand Up @@ -108,8 +108,11 @@ jobs:
- name: Setup result cache
uses: actions/cache@v3
with:
path: ${{ env.CACHE_RESULT_DIR }}
key: result-${{ matrix.target }}-${{ matrix.bin }}
# IMPORTANT: path here should be relative to the workspace directory
path: |
.result
${{ matrix.dir }}/target
key: builder-${{ runner.os }}-result-${{ matrix.bin }}

- name: Check if can use cache
if: matrix.cache
Expand Down Expand Up @@ -154,7 +157,7 @@ jobs:
- name: Install MacOS tools
if: env.CACHE != 'true' && startsWith(matrix.os, 'macos-')
run: |
brew install protobuf
brew install protobuf zig
- name: Install common tools
if: env.CACHE != 'true'
Expand All @@ -169,17 +172,9 @@ jobs:
CARGO_NET_RETRY: 10
RUST_BACKTRACE: full
RUSTUP_MAX_RETRIES: 10

# IMPORTANT: don't use zigbuild on MacOS until openssl dependency present
# Right now they are: v1, v2, v3
# It doesn't cross compile (actually doesn't link) to aarch64 from x86_64
# rustls TLS works just fine
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
cargo build -r --target ${{ matrix.target }}
else
cargo zigbuild -r --target ${{ matrix.target }}
fi
cargo update
cargo zigbuild -r --target ${{ matrix.target }}
ls -lA target/${{ matrix.target }}/release
Expand Down Expand Up @@ -237,7 +232,7 @@ jobs:
if: env.release != 'true'
with:
draft: true
tag_name: rc-${{ needs.build.outputs.version || 'no-version' }}-${{ github.ref_name }}-${{ github.run_number }}
tag_name: ${{ github.ref_name }}-${{ github.run_number }}
files: |
${{ matrix.result }}.tar.gz
body: ""
Expand Down
16 changes: 9 additions & 7 deletions v1_x/git-remote-gosh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ git-traverse = '0.22.2'
hex = '0.4.3'
indexmap = '1.9.2'
lru = '0.8.1'
memcache = '0.17.0'
memcache = { version = '0.17.0', default-features = false } #! disable tls/openssl
mockall_double = '0.3.0'
object-pool = "0.5.4"
once_cell = "1.16.0"
openssl = {version = '0.10', features = ['vendored']}
opentelemetry = {version = "0.18.0", features = ["rt-tokio"]}
opentelemetry-otlp = {version = "0.11.0", features = ["grpc-tonic"]}
opentelemetry-semantic-conventions = "0.10.0"
Expand Down Expand Up @@ -94,22 +93,25 @@ default-features = true
version = '0.2.5'

[dependencies.reqwest]
features = ['blocking', 'gzip', 'json', 'multipart', 'stream']
default-features = false
features = ['blocking', 'gzip', 'json', 'multipart', 'stream', 'rustls-tls']
version = '0.11.14'

[dependencies.tokio]
features = ['full', 'rt']
version = '1.21.2'

[dependencies.ton_client]
git = 'https://github.com/tonlabs/ever-sdk.git'
git = 'https://github.com/gosh-sh/ever-sdk.git'
default-features = false
features = ['std', 'rustls-tls-webpki-roots']
package = 'ton_client'
tag = "1.41.1"
tag = "1.41.1-rustls"

[dependencies.ton_sdk]
git = 'https://github.com/tonlabs/ever-sdk.git'
git = 'https://github.com/gosh-sh/ever-sdk.git'
package = 'ton_sdk'
tag = "1.41.1"
tag = "1.41.1-rustls"

[dependencies.zstd]
default-features = false
Expand Down
16 changes: 9 additions & 7 deletions v2_x/git-remote-gosh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ git-traverse = '0.22.2'
hex = '0.4.3'
indexmap = '1.9.2'
lru = '0.8.1'
memcache = '0.17.0'
memcache = { version = '0.17.0', default-features = false } #! disable tls/openssl
mockall_double = '0.3.0'
object-pool = "0.5.4"
once_cell = "1.16.0"
openssl = {version = '0.10', features = ['vendored']}
opentelemetry = {version = "0.18.0", features = ["rt-tokio"]}
opentelemetry-otlp = {version = "0.11.0", features = ["grpc-tonic"]}
opentelemetry-semantic-conventions = "0.10.0"
Expand Down Expand Up @@ -94,22 +93,25 @@ default-features = true
version = '0.2.5'

[dependencies.reqwest]
features = ['blocking', 'gzip', 'json', 'multipart', 'stream']
default-features = false
features = ['blocking', 'gzip', 'json', 'multipart', 'stream', 'rustls-tls']
version = '0.11.14'

[dependencies.tokio]
features = ['full', 'rt']
version = '1.21.2'

[dependencies.ton_client]
git = 'https://github.com/tonlabs/ever-sdk.git'
git = 'https://github.com/gosh-sh/ever-sdk.git'
default-features = false
features = ['std', 'rustls-tls-webpki-roots']
package = 'ton_client'
tag = "1.41.1"
tag = "1.41.1-rustls"

[dependencies.ton_sdk]
git = 'https://github.com/tonlabs/ever-sdk.git'
git = 'https://github.com/gosh-sh/ever-sdk.git'
package = 'ton_sdk'
tag = "1.41.1"
tag = "1.41.1-rustls"

[dependencies.zstd]
default-features = false
Expand Down
16 changes: 9 additions & 7 deletions v3_x/git-remote-gosh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ git-traverse = '0.22.2'
hex = '0.4.3'
indexmap = '1.9.2'
lru = '0.8.1'
memcache = '0.17.0'
memcache = { version = '0.17.0', default-features = false } #! disable tls/openssl
mockall_double = '0.3.0'
object-pool = "0.5.4"
once_cell = "1.16.0"
openssl = {version = '0.10', features = ['vendored']}
opentelemetry = {version = "0.18.0", features = ["rt-tokio"]}
opentelemetry-otlp = {version = "0.11.0", features = ["grpc-tonic"]}
opentelemetry-semantic-conventions = "0.10.0"
Expand Down Expand Up @@ -94,22 +93,25 @@ default-features = true
version = '0.2.5'

[dependencies.reqwest]
features = ['blocking', 'gzip', 'json', 'multipart', 'stream']
default-features = false
features = ['blocking', 'gzip', 'json', 'multipart', 'stream', 'rustls-tls']
version = '0.11.14'

[dependencies.tokio]
features = ['full', 'rt']
version = '1.21.2'

[dependencies.ton_client]
git = 'https://github.com/tonlabs/ever-sdk.git'
git = 'https://github.com/gosh-sh/ever-sdk.git'
default-features = false
features = ['std', 'rustls-tls-webpki-roots']
package = 'ton_client'
tag = "1.41.1"
tag = "1.41.1-rustls"

[dependencies.ton_sdk]
git = 'https://github.com/tonlabs/ever-sdk.git'
git = 'https://github.com/gosh-sh/ever-sdk.git'
package = 'ton_sdk'
tag = "1.41.1"
tag = "1.41.1-rustls"

[dependencies.zstd]
default-features = false
Expand Down

0 comments on commit 2ce67be

Please sign in to comment.