Skip to content

Commit d96f883

Browse files
committed
Fix cross-build: install Rust via rustup, collect bitstring submodules
tibs 0.5.7 requires Rust edition 2024, but the ubuntu 22.04 apt package only provides Cargo 1.75.0. Install Rust via rustup to get a recent enough version. Also add --collect-submodules bitstring for the same PyInstaller hidden import issue as the main build.
1 parent d212814 commit d96f883

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ jobs:
7676
python3 python3-pip python3-setuptools python3-wheel python3-dev \
7777
libffi-dev \
7878
libssl-dev \
79-
rustc cargo \
79+
# Rust is installed via rustup below (apt version is too old for tibs).
80+
# rustc cargo \
8081
build-essential \
8182
pkg-config \
8283
git \
@@ -97,15 +98,18 @@ jobs:
9798
# Via https://github.com/rust-lang/cargo/issues/10781#issuecomment-1351670409
9899
export CARGO_NET_GIT_FETCH_WITH_CLI=true
99100
set -e
101+
# Install Rust via rustup (apt version is too old for tibs edition2024).
102+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
103+
source "\$HOME/.cargo/env"
100104
export PATH=\$PATH:/home/builder/.local/bin
101105
echo \$HOME
102106
echo \$PATH
103107
cd /sources
104108
python -m pip install --upgrade pip
105109
pip install pyinstaller
106110
pip install --user -e .
107-
pyinstaller --distpath ./${{ matrix.arch }} -F --icon=ci/espressif.ico --add-data="${{ env.STUBS_DIR }}1/*.json:${{ env.STUBS_DIR }}1/" --add-data="${{ env.STUBS_DIR }}2/*.json:${{ env.STUBS_DIR }}2/" esptool.py
108-
pyinstaller --distpath ./${{ matrix.arch }} -F --icon=ci/espressif.ico --add-data="${{ env.EFUSE_DIR }}*.yaml:${{ env.EFUSE_DIR }}" espefuse.py
111+
pyinstaller --distpath ./${{ matrix.arch }} -F --icon=ci/espressif.ico --collect-submodules bitstring --add-data="${{ env.STUBS_DIR }}1/*.json:${{ env.STUBS_DIR }}1/" --add-data="${{ env.STUBS_DIR }}2/*.json:${{ env.STUBS_DIR }}2/" esptool.py
112+
pyinstaller --distpath ./${{ matrix.arch }} -F --icon=ci/espressif.ico --collect-submodules bitstring --add-data="${{ env.EFUSE_DIR }}*.yaml:${{ env.EFUSE_DIR }}" espefuse.py
109113
pyinstaller --distpath ./${{ matrix.arch }} -F --icon=ci/espressif.ico espsecure.py
110114
pyinstaller --distpath ./${{ matrix.arch }} -F --icon=ci/espressif.ico esp_rfc2217_server.py
111115
./${{ matrix.arch }}/esptool -h

0 commit comments

Comments
 (0)