From fa82854a5d1e2faa640382375c42812c048226dc Mon Sep 17 00:00:00 2001 From: "w.pomp" Date: Fri, 17 Apr 2026 13:52:57 +0200 Subject: [PATCH] CI workflow --- .github/workflows/CI.yml | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e1fd8a3..84485b9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,33 +33,27 @@ jobs: uses: actions/cache@v4 with: path: | - ${{ runner.temp }}/cargo - ${{ runner.temp }}/rustup - ${{ runner.temp }}/osxcross ~/.cache/pip ~/.cache/pip-wheel ~/.cache/sccache ~/.cache/cargo-xwin - key: rust-cache-${{ matrix.platform.target }}-${{ hashFiles('**/Cargo.lock') }}-${{ runner.os }}-${{ github.ref }} - restore-keys: | - rust-cache-${{ matrix.platform.target }}-${{ runner.os }}- - rust-cache-${{ runner.os }}- + ~/.cargo + ~/.osxcross + key: cache-ubuntu-maturin-cross-compile - - name: Install Rust (rustup) if needed + - name: Install Rust run: | - set -e - export RUSTUP_HOME="${{ runner.temp }}/rustup" - export CARGO_HOME="${{ runner.temp }}/cargo" 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: | - export RUSTUP_HOME="${{ runner.temp }}/rustup" - export CARGO_HOME="${{ runner.temp }}/cargo" - source "$CARGO_HOME/env" 2>/dev/null || true + source "~/.cargo/env" 2>/dev/null || true python -m pip install --upgrade pip pip install maturin ziglang if ! command -v sccache >/dev/null 2>&1; then @@ -69,9 +63,7 @@ jobs: - name: Install xwin run: | - export RUSTUP_HOME="${{ runner.temp }}/rustup" - export CARGO_HOME="${{ runner.temp }}/cargo" - source "$CARGO_HOME/env" 2>/dev/null || true + source "~/.cargo/env" 2>/dev/null || true if ! command -v cargo-xwin >/dev/null 2>&1; then cargo install cargo-xwin || pip install cargo-xwin cargo xwin cache xwin @@ -80,17 +72,17 @@ jobs: - name: Install osxcross run: | - export PATH="${{ runner.temp }}/osxcross/bin${PATH:+:${PATH}}" + export PATH="~/.osxcross/bin${PATH:+:${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 ${{ runner.temp }}/ + tar -xzf osxcross.tar.gz -C ~/ + mv ~/osxcross ~/.osxcross 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}}" + source "~/.cargo/env" 2>/dev/null || true + export PATH="~/.osxcross/bin${PATH:+:${PATH}}" maturin sdist --out dist rustup default nightly rustup target add x86_64-unknown-linux-gnu --toolchain nightly