Skip to content

Commit

Permalink
Github release action install OpenSSL on multi platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrDeveloper committed Jun 16, 2023
1 parent 05fa970 commit 4a48984
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ jobs:
gql_dry_run: ${{ env.GQL_DRY_RUN }}

steps:
- name: Install OpenSSL
run: |
sudo apt-get install libssl-dev
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
- name: Inputs from workflow dispatch
shell: bash
if: ${{ github.event_name == 'workflow_dispatch' }}
Expand Down Expand Up @@ -128,6 +122,21 @@ jobs:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}

- name: Install OpenSSL on Ubuntu
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get install pkg-config libssl-dev
- name: Install OpenSSL on Windows
if: matrix.os == 'windows-2022'
run: |
vcpkg install openssl:x64-windows-static-md
- name: Install OpenSSL on Macos
if: matrix.os == 'macos-12'
run: |
brew install openssl@3
- name: Use Cross
shell: bash
run: |
Expand All @@ -148,6 +157,7 @@ jobs:
- name: Build release file
shell: bash
run: |
chmod +x scripts/cargo-out-dir
outdir="$(scripts/cargo-out-dir "${{ env.TARGET_DIR }}")"
bin="gql-${{ matrix.name }}"
Expand Down
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ git2 = "0.17.1"
regex = "1"
lazy_static = "1.4.0"
termcolor = "1.2.0"

[build-dependencies.git2]
version = "0.17.1"
default-features = false
openssl = { version = "0.10", features = ["vendored"] }

0 comments on commit 4a48984

Please sign in to comment.