Skip to content

Commit

Permalink
fix(ci): Fix protobuf error
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyinc committed Oct 4, 2024
1 parent 40534ea commit 528b430
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Protobuf Compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libprotobuf-dev
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand All @@ -49,13 +45,21 @@ jobs:
sccache: 'true'
# manylinux: auto
manylinux: ${{ matrix.platform.target == 'aarch64' && '2_24' || 'auto' }}
docker-options: |
-e PROTOC=/usr/bin/protoc
before-script-linux: |
yum install -y protobuf-compiler
echo "Which protoc: $(which protoc)"
echo "Environment variables: $PROTOC"
ls -l /usr/bin/protoc
PROTOC_VERSION="28.2"
PROTOC_ZIP="protoc-${PROTOC_VERSION}-linux-${{ matrix.target }}.zip"
curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"
unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
rm -f $PROTOC_ZIP
echo "PROTOC=/usr/local/bin/protoc" >> $GITHUB_ENV
# docker-options: |
# -e PROTOC=/usr/bin/protoc
# before-script-linux: |
# yum install -y protobuf-compiler
# echo "Which protoc: $(which protoc)"
# echo "Environment variables: $PROTOC"
# ls -l /usr/bin/protoc
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -80,24 +84,28 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Protobuf Compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libprotobuf-dev
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path bindings/lyric-py/Cargo.toml
sccache: 'true'
manylinux: musllinux_1_2
docker-options: |
-e PROTOC=/usr/bin/protoc
before-script-linux: |
apt-get update && apt-get install -y protobuf-compiler libprotobuf-dev
echo "Which protoc: $(which protoc)"
echo "Environment variables: $PROTOC"
ls -l /usr/bin/protoc
PROTOC_VERSION="28.2"
PROTOC_ZIP="protoc-${PROTOC_VERSION}-linux-${{ matrix.target }}.zip"
curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"
unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
rm -f $PROTOC_ZIP
echo "PROTOC=/usr/local/bin/protoc" >> $GITHUB_ENV
# docker-options: |
# -e PROTOC=/usr/bin/protoc
# before-script-linux: |
# apt-get update && apt-get install -y protobuf-compiler libprotobuf-dev
# echo "Which protoc: $(which protoc)"
# echo "Environment variables: $PROTOC"
# ls -l /usr/bin/protoc
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 528b430

Please sign in to comment.