File tree Expand file tree Collapse file tree 2 files changed +24
-11
lines changed
Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 66 paths :
77 - " cli/**"
88 - " .github/workflows/release-cli.yml"
9+ pull_request :
10+ paths :
11+ - " cli/**"
12+ - " .github/workflows/release-cli.yml"
913 workflow_dispatch :
1014
1115jobs :
3741 with :
3842 platforms : arm64
3943
44+ - name : Login to GHCR
45+ uses : docker/login-action@v3
46+ with :
47+ registry : ghcr.io
48+ username : ${{ github.actor }}
49+ password : ${{ secrets.GITHUB_TOKEN }}
50+
4051 - name : Install Poetry
4152 uses : snok/install-poetry@v1
4253 with :
7081
7182 - name : Build CLI binary
7283 working-directory : cli
84+ env :
85+ NIXOPUS_DISABLE_DOCKER : ${{ github.event_name == 'pull_request' && '1' || '' }}
7386 run : |
7487 chmod +x build.sh
7588 if [ ! -d "helpers" ]; then
Original file line number Diff line number Diff line change @@ -164,19 +164,19 @@ run_pyinstaller_build() {
164164 ;;
165165 esac
166166
167- if [[ -n " $MANYLINUX_IMAGE " ]] ; then
168- log_info " Building with PyInstaller inside $MANYLINUX_IMAGE for wide glibc compatibility... "
169- docker run --rm -v " $( cd .. && pwd ) " :/work -w /work/cli " $MANYLINUX_IMAGE " bash -lc \
170- " export PATH=/opt/python/ $PYTAG /bin: \$ PATH && \
171- python3 -m pip install -U pip && \
167+ # Use official PyInstaller image to ensure presence of libpython shared library
168+ PYI_IMAGE= " ghcr.io/pyinstaller/pyinstaller:py3.11 "
169+ log_info " Building with PyInstaller inside $PYI_IMAGE for reliable shared-lib Python... "
170+ docker run --rm -v " $( cd .. && pwd ) " :/work -w /work/cli " $PYI_IMAGE " bash -lc \
171+ " python3 -m pip install -U pip && \
172172python3 -m pip install 'poetry==1.8.3' && \
173+ poetry config virtualenvs.in-project true && \
173174poetry install --with dev && \
174175poetry run pyinstaller --clean --noconfirm $SPEC_FILE " || {
175- log_error " Dockerized build failed"
176- exit 1
177- }
178- return
179- fi
176+ log_error " Dockerized build failed"
177+ exit 1
178+ }
179+ return
180180
181181 log_warning " Unsupported arch $ARCH for manylinux; building on host (may require newer glibc)"
182182 fi
@@ -361,4 +361,4 @@ main() {
361361 fi
362362}
363363
364- main " $@ "
364+ main " $@ "
You can’t perform that action at this time.
0 commit comments