Skip to content

Commit

Permalink
fixup! Build CLI with musl
Browse files Browse the repository at this point in the history
  • Loading branch information
FirelightFlagboy committed Oct 31, 2024
1 parent 7f93b92 commit 49d36e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/package-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ jobs:
fail-fast: false
matrix:
include:
# The MUSL target provide a statically linked CLI
- target: x86_64-unknown-linux-musl
suffix: linux-x86_64-musl
type: static
# The GNU target provide a dynamically linked CLI
- target: x86_64-unknown-linux-gnu
suffix: linux-x86_64-gnu
type: dynamic
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin v4.2.1
with:
Expand Down Expand Up @@ -107,11 +107,13 @@ jobs:
timeout-minutes: 5

- name: Build CLI
shell: bash
run: >-
cross build -p parsec-cli
--release
--target=${{ matrix.target }}
${{ matrix.type == 'static' && '--features=vendored-openssl' || '' }}
$(python make.py parsec-cli-release-cargo-flags)
env:
LIBPARSEC_FORCE_VENDORED_OPENSSL: ${{ matrix.target == 'x86_64-unknown-linux-musl' && 'true' || 'false' }}
timeout-minutes: 15

- name: Debug target folder
Expand Down
6 changes: 6 additions & 0 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
WEB_DEV_CARGO_FLAGS = "--dev -- --features test-utils"
WEB_CI_CARGO_FLAGS = f"{WEB_DEV_CARGO_FLAGS} --profile=ci-rust"

CLI_RELEASE_CARGO_FLAGS = f"--release {MAYBE_FORCE_VENDORED_OPENSSL}"

# TL;DR: ONLY USE THE REAL ZSTD IN PRODUCTION !!!
#
# `libparsec_zstd` is just a shim over `zstd` crate to provide a simpler-to-build
Expand Down Expand Up @@ -244,6 +246,10 @@ def prepare(self) -> None:
# Flags used in poetry's `server/build.py` when generating the dev wheel
("python-dev-libparsec-cargo-flags",): Echo(PYTHON_DEV_CARGO_FLAGS),
#
# Parsec CLI
#
("parsec-cli-release-cargo-flags",): Echo(CLI_RELEASE_CARGO_FLAGS),
#
# Electron bindings
#
("electron-dev-install", "ei"): (
Expand Down

0 comments on commit 49d36e1

Please sign in to comment.