Skip to content

Commit 329c03f

Browse files
committed
try to remove reliance on openSSL
This project's production code never does `git clone`, so we really shouldn't need the `https` feature of the `git2` crate enabled.
1 parent 0a045b8 commit 329c03f

7 files changed

Lines changed: 363 additions & 84 deletions

File tree

.github/workflows/node-js-packaging.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
settings:
4646
- host: macos-latest
4747
target: x86_64-apple-darwin
48-
build: yarn build --target x86_64-apple-darwin --features openssl-vendored
48+
build: yarn build --target x86_64-apple-darwin
4949
- host: windows-latest
5050
build: yarn build --target x86_64-pc-windows-msvc
5151
target: x86_64-pc-windows-msvc
@@ -54,22 +54,22 @@ jobs:
5454
target: i686-pc-windows-msvc
5555
- host: ubuntu-latest
5656
target: x86_64-unknown-linux-gnu
57-
build: yarn build --target x86_64-unknown-linux-gnu --use-cross --features openssl-vendored
57+
build: yarn build --target x86_64-unknown-linux-gnu --use-cross
5858
- host: ubuntu-latest
5959
target: x86_64-unknown-linux-musl
60-
build: yarn build --target x86_64-unknown-linux-musl -x --features openssl-vendored
60+
build: yarn build --target x86_64-unknown-linux-musl -x
6161
- host: macos-latest
6262
target: aarch64-apple-darwin
63-
build: yarn build --target aarch64-apple-darwin --features openssl-vendored
63+
build: yarn build --target aarch64-apple-darwin
6464
- host: ubuntu-latest
6565
target: aarch64-unknown-linux-gnu
66-
build: yarn build --target aarch64-unknown-linux-gnu --use-cross --features openssl-vendored
66+
build: yarn build --target aarch64-unknown-linux-gnu --use-cross
6767
- host: ubuntu-latest
6868
target: armv7-unknown-linux-gnueabihf
69-
build: yarn build --target armv7-unknown-linux-gnueabihf --use-cross --features openssl-vendored
69+
build: yarn build --target armv7-unknown-linux-gnueabihf --use-cross
7070
- host: ubuntu-latest
7171
target: aarch64-unknown-linux-musl
72-
build: yarn build --target aarch64-unknown-linux-musl -x --features openssl-vendored
72+
build: yarn build --target aarch64-unknown-linux-musl -x
7373
- host: windows-latest
7474
target: aarch64-pc-windows-msvc
7575
build: yarn build --target aarch64-pc-windows-msvc
@@ -139,8 +139,7 @@ jobs:
139139
- uses: actions/checkout@v6
140140
with:
141141
persist-credentials: false
142-
- name: Build
143-
id: build
142+
- name: setup FreeBSD VM
144143
uses: cross-platform-actions/action@0c165ad7eb2d6a7e8552d6af5aad2bbedfc646b0 # v1.1.0
145144
env:
146145
DEBUG: napi:*
@@ -151,29 +150,30 @@ jobs:
151150
memory: 8G
152151
cpu_count: 3
153152
environment_variables: DEBUG RUSTUP_IO_THREADS
154-
shell: bash
155-
run: |
156-
sudo pkg install -y -f curl node libnghttp2 npm cmake
157-
sudo npm install -g yarn --ignore-scripts
158-
curl https://sh.rustup.rs -sSf --output rustup.sh
159-
sh rustup.sh -y --profile minimal --default-toolchain stable
160-
source "$HOME/.cargo/env"
161-
echo "~~~~ rustc --version ~~~~"
162-
rustc --version
163-
echo "~~~~ node -v ~~~~"
164-
node -v
165-
echo "~~~~ yarn --version ~~~~"
166-
yarn --version
167-
pwd
168-
ls -lah
169-
whoami
170-
env
171-
freebsd-version
172-
yarn install
173-
yarn build
174-
rm -rf node_modules
175-
rm -rf target
176-
rm -rf .yarn/cache
153+
- name: Build
154+
shell: cpa.sh {0}
155+
run: |-
156+
sudo pkg install -y -f curl node libnghttp2 npm cmake
157+
sudo npm install -g yarn --ignore-scripts
158+
curl https://sh.rustup.rs -sSf --output rustup.sh
159+
sh rustup.sh -y --profile minimal --default-toolchain stable
160+
source "$HOME/.cargo/env"
161+
echo "~~~~ rustc --version ~~~~"
162+
rustc --version
163+
echo "~~~~ node -v ~~~~"
164+
node -v
165+
echo "~~~~ yarn --version ~~~~"
166+
yarn --version
167+
pwd
168+
ls -lah
169+
whoami
170+
env
171+
freebsd-version
172+
yarn install
173+
yarn build
174+
rm -rf node_modules
175+
rm -rf target
176+
rm -rf .yarn/cache
177177
- name: Upload artifact
178178
uses: actions/upload-artifact@v7
179179
with:

.github/workflows/python-packaging.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,34 +72,33 @@ jobs:
7272
with:
7373
python-version: '3.x'
7474

75-
- name: Calculate openssl-vendored
76-
shell: bash
77-
id: is-openssl-vendored
78-
run: |
79-
if [[ "${{ startsWith(matrix.platform.target, 'x86') }}" == "true" ]]; then
80-
echo "enabled=" >> $GITHUB_OUTPUT
81-
else
82-
echo "enabled=--features openssl-vendored" >> $GITHUB_OUTPUT
83-
fi
84-
8575
- name: Build wheels
8676
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
8777
with:
8878
target: ${{ matrix.platform.target }}
89-
args: --release --out dist --find-interpreter ${{ steps.is-openssl-vendored.outputs.enabled }}
90-
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
79+
# Use the zig toolchain for all targets except ppc64le.
80+
# Note, this is meant to avoid build errors in aws-lc-sys crate, which compiles C code.
81+
args: >-
82+
--release --out dist --find-interpreter
83+
${{ matrix.platform.target != 'ppc64le' && '--zig' || ''}}
84+
# avoid cache-poisoning potential for actually distributed builds
85+
sccache: ${{ startsWith(github.ref, 'refs/tags') && 'false' || 'true' }}
9186
manylinux: auto
87+
# here we either install the ppc64le compiler/toolchain or install zig on all others
9288
before-script-linux: |
9389
case "${{ matrix.platform.target }}" in
94-
"aarch64" | "armv7" | "s390x" | "ppc64le")
95-
# NOTE: pypa/manylinux docker images are Debian based
96-
sudo apt-get update
97-
sudo apt-get install -y pkg-config libssl-dev
90+
ppc64le)
91+
apt-get update
92+
apt-get install -y \
93+
pkg-config \
94+
gcc-powerpc64le-linux-gnu \
95+
g++-powerpc64le-linux-gnu \
96+
binutils-powerpc64le-linux-gnu \
97+
libc6-dev-ppc64el-cross
9898
;;
99-
"x86" | "x86_64")
100-
# NOTE: rust-cross/manylinux docker images are CentOS based
101-
yum update -y
102-
yum install -y openssl openssl-devel
99+
*)
100+
# spell-checker: disable-next-line
101+
pip install ziglang
103102
;;
104103
esac
105104
- name: Upload wheels

0 commit comments

Comments
 (0)