CI workflow
This commit is contained in:
+15
-14
@@ -21,18 +21,11 @@ jobs:
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
- name: Install llvm
|
||||
run: |
|
||||
if ! command -v llvm-dlltool >/dev/null 2>&1; then
|
||||
sudo apt update
|
||||
sudo apt install -y llvm
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Setup caching
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
/var/cache/apt
|
||||
~/.cache/pip
|
||||
~/.cache/pip-wheel
|
||||
~/.cache/sccache
|
||||
@@ -41,19 +34,27 @@ jobs:
|
||||
~/.osxcross
|
||||
key: cache-ubuntu-maturin-cross-compile
|
||||
|
||||
- name: Install llvm
|
||||
run: |
|
||||
if ! command -v llvm-dlltool >/dev/null 2>&1; then
|
||||
sudo apt update
|
||||
sudo apt install -y llvm
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
source "~/.cargo/env" 2>/dev/null
|
||||
if ! command -v rustc >/dev/null 2>&1; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
else
|
||||
rustup update
|
||||
fi
|
||||
|
||||
shell: bash
|
||||
|
||||
- name: Install sccache and maturin
|
||||
run: |
|
||||
source "~/.cargo/env" 2>/dev/null || true
|
||||
source "~/.cargo/env" 2>/dev/null
|
||||
python -m pip install --upgrade pip
|
||||
pip install maturin ziglang
|
||||
if ! command -v sccache >/dev/null 2>&1; then
|
||||
@@ -63,7 +64,7 @@ jobs:
|
||||
|
||||
- name: Install xwin
|
||||
run: |
|
||||
source "~/.cargo/env" 2>/dev/null || true
|
||||
source "~/.cargo/env" 2>/dev/null
|
||||
if ! command -v cargo-xwin >/dev/null 2>&1; then
|
||||
cargo install cargo-xwin || pip install cargo-xwin
|
||||
cargo xwin cache xwin
|
||||
@@ -72,7 +73,7 @@ jobs:
|
||||
|
||||
- name: Install osxcross
|
||||
run: |
|
||||
export PATH="~/.osxcross/bin${PATH:+:${PATH}}"
|
||||
export PATH="~/.osxcross/bin:$PATH"
|
||||
if ! command -v osxcross >/dev/null 2>&1; then
|
||||
wget https://nextcloud.wimpomp.nl/s/DcrTwoP3SeY7DQF/download -O osxcross.tar.gz
|
||||
tar -xzf osxcross.tar.gz -C ~/
|
||||
@@ -81,8 +82,8 @@ jobs:
|
||||
|
||||
- name: Build wheels
|
||||
run: |
|
||||
source "~/.cargo/env" 2>/dev/null || true
|
||||
export PATH="~/.osxcross/bin${PATH:+:${PATH}}"
|
||||
source "~/.cargo/env" 2>/dev/null
|
||||
export PATH="~/.osxcross/bin:$PATH"
|
||||
maturin sdist --out dist
|
||||
rustup default nightly
|
||||
rustup target add x86_64-unknown-linux-gnu --toolchain nightly
|
||||
|
||||
Reference in New Issue
Block a user