From d6fa0820705583098cbcf1545b249883f16d44ec Mon Sep 17 00:00:00 2001 From: jstzwj <1103870790@qq.com> Date: Sun, 5 Jan 2025 02:41:12 +0800 Subject: [PATCH] setup rust --- .github/workflows/linux_wheel.yml | 2 +- setup_rust.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 setup_rust.sh diff --git a/.github/workflows/linux_wheel.yml b/.github/workflows/linux_wheel.yml index 28cbee8..6383cc9 100644 --- a/.github/workflows/linux_wheel.yml +++ b/.github/workflows/linux_wheel.yml @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} env: CIBW_BEFORE_BUILD: pip install setuptools==58.0.1&&pip install Cython==0.29.37&&pip install -U wheel numpy - CIBW_BEFORE_TEST: apk add rustup&&rustup update&&pip install Cython==0.29.37&&pip install -U maturin + CIBW_BEFORE_TEST: apk add bash&&bash setup_rust.sh&&pip install Cython==0.29.37&&pip install -U maturin CIBW_TEST_REQUIRES: pytest pandas polars CIBW_TEST_COMMAND: > cd .. && diff --git a/setup_rust.sh b/setup_rust.sh new file mode 100644 index 0000000..08311a7 --- /dev/null +++ b/setup_rust.sh @@ -0,0 +1,4 @@ +#!/bin/bash +curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y +echo 'source $HOME/.cargo/env' >> $HOME/.bashrc +export PATH="/root/.cargo/bin:${PATH}" \ No newline at end of file