CI workflow
This commit is contained in:
+18
-11
@@ -1,8 +1,3 @@
|
||||
# This file is autogenerated by maturin v1.8.4
|
||||
# To update, run
|
||||
#
|
||||
# maturin generate-ci github
|
||||
#
|
||||
name: CI
|
||||
|
||||
on:
|
||||
@@ -34,8 +29,11 @@ jobs:
|
||||
|
||||
- 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: Cache Rust and sccache
|
||||
uses: actions/cache@v4
|
||||
@@ -43,6 +41,7 @@ jobs:
|
||||
path: |
|
||||
${{ runner.temp }}/cargo
|
||||
${{ runner.temp }}/rustup
|
||||
${{ runner.temp }}/osxcross
|
||||
~/.cache/pip
|
||||
~/.cache/pip-wheel
|
||||
~/.cache/sccache
|
||||
@@ -59,10 +58,6 @@ jobs:
|
||||
if ! command -v rustc >/dev/null 2>&1; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
fi
|
||||
source "$CARGO_HOME/env" 2>/dev/null || true
|
||||
rustup default nightly
|
||||
rustup target add x86_64-unknown-linux-gnu --toolchain nightly
|
||||
rustup target add x86_64-pc-windows-msvc --toolchain nightly
|
||||
shell: bash
|
||||
|
||||
- name: Install sccache and maturin
|
||||
@@ -71,21 +66,33 @@ jobs:
|
||||
export CARGO_HOME="${{ runner.temp }}/cargo"
|
||||
source "$CARGO_HOME/env" 2>/dev/null || true
|
||||
python -m pip install --upgrade pip
|
||||
pip install maturin
|
||||
pip install maturin ziglang
|
||||
if ! command -v sccache >/dev/null 2>&1; then
|
||||
cargo install sccache || pip install sccache
|
||||
cargo install cargo-xwin || pip install cargo-xwin
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Install osxcross
|
||||
run: |
|
||||
if ! command -v osxcross >/dev/null 2>&1; then
|
||||
wget https://nextcloud.wimpomp.nl/s/DcrTwoP3SeY7DQF/download -O osxcross.tar.gz
|
||||
tar -xzvf osxcross.tar.gz -C ${{ runner.temp }}/
|
||||
fi
|
||||
|
||||
- name: Build wheels
|
||||
run: |
|
||||
export CARGO_HOME="${{ runner.temp }}/cargo"
|
||||
source "$CARGO_HOME/env" 2>/dev/null || true
|
||||
export PATH={{ runner.temp }}/osxcross/bin${PATH:+:${PATH}}
|
||||
maturin sdist --out dist
|
||||
rustup default nightly
|
||||
rustup target add x86_64-unknown-linux-gnu --toolchain nightly
|
||||
maturin build --release --out dist --target x86_64-unknown-linux-gnu
|
||||
rustup target add x86_64-pc-windows-msvc --toolchain nightly
|
||||
maturin build --release --out dist --target x86_64-pc-windows-msvc
|
||||
maturin build --release --out dist --target x86_64-unknown-linux-gnu
|
||||
rustup target add x86_64-apple-darwin --toolchain nightly
|
||||
maturin build --release --target x86_64-apple-darwin --out dist --zig
|
||||
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v3.2.2
|
||||
|
||||
Reference in New Issue
Block a user