Skip to content

Commit

Permalink
build: enable vendored-openssl via feature to ease cross compilation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
evilrobot-01 authored Apr 29, 2024
1 parent a71b2bd commit 2be2836
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
target: aarch64-unknown-linux-gnu
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
cpu: skylake
# macOS
- os: macos-14
target: aarch64-apple-darwin
Expand All @@ -33,7 +30,7 @@ jobs:
env:
RUSTFLAGS: "${{ matrix.platform.cpu != '' && format('-C target-cpu={0}', matrix.platform.cpu) || '' }} ${{ matrix.platform.target == 'aarch64-unknown-linux-gnu' && '-C linker=aarch64-linux-gnu-gcc' || '' }}"
path: "target/${{ matrix.platform.target }}/production"
package: "pop-cli-${{ matrix.platform.target }}${{ matrix.platform.cpu != '' && format('-{0}', matrix.platform.cpu) || '' }}.tar.gz"
package: "pop-${{ matrix.platform.target }}${{ matrix.platform.cpu != '' && format('-{0}', matrix.platform.cpu) || '' }}.tar.gz"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -57,20 +54,21 @@ jobs:
run: rustup target add ${{ matrix.platform.target }}

- name: Build pop-cli
run: cargo build --profile=production -p pop-cli --target ${{ matrix.platform.target }}
run: cargo build --profile=production -p pop-cli --target ${{ matrix.platform.target }} --features static-ssl

- name: Package binary (Linux)
if: contains(matrix.platform.target, 'linux')
run: |
cd ${{ env.path }}
sha256sum pop-cli > pop-cli.sha256
tar -czf ${{ env.package }} pop-cli pop-cli.sha256
sha256sum pop > pop.sha256
tar -czf ${{ env.package }} pop pop.sha256
- name: Package binary (macOS)
if: contains(matrix.platform.target, 'apple')
run: |
cd ${{ env.path }}
shasum -a 256 pop-cli > pop-cli.sha256
tar -czf ${{ env.package }} pop-cli pop-cli.sha256
shasum -a 256 pop > pop.sha256
tar -czf ${{ env.package }} pop pop.sha256
- name: Upload binary
uses: actions/upload-artifact@v3
Expand Down
10 changes: 10 additions & 0 deletions Cargo.lock

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

7 changes: 4 additions & 3 deletions crates/pop-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@ strum.workspace = true
strum_macros.workspace = true

# contracts
pop-contracts = { path = "../pop-contracts", optional = true}
pop-contracts = { path = "../pop-contracts", optional = true }
sp-core = { workspace = true, optional = true }
sp-weights = { workspace = true, optional = true }

# parachains
pop-parachains = { path = "../pop-parachains", optional = true }
dirs = { version = "5.0", optional = true}
git2.workspace = true
dirs = { version = "5.0", optional = true }
git2.workspace = true

[dev-dependencies]
assert_cmd = "2.0.14"
predicates = "3.1.0"

[features]
default = ["contract", "parachain"]
static-ssl = ["git2/vendored-openssl"]
contract = [
"dep:pop-contracts",
"dep:sp-core",
Expand Down

0 comments on commit 2be2836

Please sign in to comment.