Skip to content

Commit

Permalink
more?
Browse files Browse the repository at this point in the history
  • Loading branch information
soldni committed Jan 15, 2024
1 parent a694887 commit 9babe68
Showing 1 changed file with 45 additions and 49 deletions.
94 changes: 45 additions & 49 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,56 +160,52 @@ jobs:
name: "Build Linux (python${{ matrix.python }}, ${{ matrix.target }})"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Setup environment
run: |
sudo apt-get update
sudo apt-get install --yes --upgrade build-essential cmake protobuf-compiler libssl-dev glibc-source
- name: Install 32bit version of libc
if: ${{ contains(matrix.target, 'i686') }}
run: |
sudo apt-get install --yes --upgrade libc6-dev-i386
- name: Setup cross-compilation to ARM
if: ${{ contains(matrix.target, 'aarch64') }}
run: |
sudo apt-get install --yes --upgrade gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
CROSS_TOOLCHAIN_PREFIX=aarch64-linux-gnu-
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="$CROSS_TARGET_RUNNER"
AR_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"ar
CC_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc
CXX_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"g++
CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_gnu=/opt/toolchain.cmake
RUST_TEST_THREADS=1
PKG_CONFIG_ALLOW_CROSS=1
RUST_BACKTRACE=1
# export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
# export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
# export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
- name: Add Rust Target
run: |
rustup target add ${{ matrix.target }}
- name: Install Maturin
run: pip install 'maturin[patchelf]>=1.1,<2.0'
- name: Building wheels
run: |
echo "rust backtrace: $RUST_BACKTRACE"
maturin build \
--release \
--out dist \
--target ${{ matrix.target }} \
--interpreter 'python${{ matrix.python }}'
# --manylinux ${{ matrix.target == 'x86' && 'auto' || '2_28' }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# - uses: actions/setup-python@v5
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: ${{ matrix.target == 'x86' && 'false' || 'true' }}
# manylinux: ${{ matrix.target == 'x86' && 'auto' || '2_28' }}
# python-version: ${{ matrix.python }}
# cache: 'pip'
# - name: Setup environment
# run: |
# sudo apt-get update
# sudo apt-get install --yes --upgrade build-essential cmake protobuf-compiler libssl-dev glibc-source
# - name: Install 32bit version of libc
# if: ${{ contains(matrix.target, 'i686') }}
# run: |
# sudo apt-get install --yes --upgrade libc6-dev-i386
# - name: Setup cross-compilation to ARM
# if: ${{ contains(matrix.target, 'aarch64') }}
# run: |
# sudo apt-get install --yes --upgrade gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
# CROSS_TOOLCHAIN_PREFIX="aarch64-linux-gnu-"
# CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="${CROSS_TOOLCHAIN_PREFIX}-gcc"
# AR_aarch64_unknown_linux_gnu="${CROSS_TOOLCHAIN_PREFIX}-ar"
# CC_aarch64_unknown_linux_gnu="${CROSS_TOOLCHAIN_PREFIX}-gcc"
# CXX_aarch64_unknown_linux_gnu="${CROSS_TOOLCHAIN_PREFIX}-g++""
# RUST_BACKTRACE=1
# # export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
# # export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
# # export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
# - name: Add Rust Target
# run: |
# rustup target add ${{ matrix.target }}
# - name: Install Maturin
# run: pip install 'maturin[patchelf]>=1.1,<2.0'
# - name: Building wheels
# run: |
# echo "rust backtrace: $RUST_BACKTRACE"
# maturin build \
# --release \
# --out dist \
# --target ${{ matrix.target }} \
# --interpreter 'python${{ matrix.python }}'
# --manylinux ${{ matrix.target == 'x86' && 'auto' || '2_28' }}
- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: ${{ matrix.target == 'x86' && 'false' || 'true' }}
manylinux: ${{ matrix.target == 'x86' && 'auto' || '2_28' }}
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 9babe68

Please sign in to comment.