Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions .github/workflows/JS_build_test_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
name: "[${{ matrix.settings.target }}] Build & Test"
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -113,7 +113,7 @@ jobs:
if: ${{ matrix.settings.target == 'x86_64-pc-windows-msvc' }}
run: npm install -g corepack --force
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
if: ${{ !matrix.settings.docker }}
with:
cache: yarn
Expand All @@ -127,7 +127,7 @@ jobs:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
Expand All @@ -153,7 +153,7 @@ jobs:
run: yarn install
working-directory: ./js/optify-config
- name: Setup node x86
uses: actions/setup-node@v4
uses: actions/setup-node@v6
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
architecture: x86
Expand All @@ -173,7 +173,7 @@ jobs:
shell: bash
working-directory: ./js/optify-config
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bindings-${{ matrix.settings.target }}
path: ./js/optify-config/${{ env.APP_NAME }}.*.node
Expand All @@ -183,7 +183,7 @@ jobs:
runs-on: ubuntu-latest
name: "[FreeBSD] Build"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -194,7 +194,7 @@ jobs:
shared-key: freebsd-rust
- name: "Build & Test"
id: build
uses: cross-platform-actions/action@v0.29.0
uses: cross-platform-actions/action@v1.0.0
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
rm -rf target
rm -rf .yarn/cache
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bindings-freebsd
path: ./js/optify-config/${{ env.APP_NAME }}.*.node
Expand All @@ -256,7 +256,7 @@ jobs:
- '20'
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -272,7 +272,7 @@ jobs:
if: ${{ matrix.settings.target == 'x86_64-pc-windows-msvc' }}
run: npm install -g corepack --force
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
architecture: x64
cache: yarn
Expand All @@ -283,7 +283,7 @@ jobs:
yarn install
working-directory: ./js/optify-config
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: bindings-${{ matrix.settings.target }}
path: ./js/optify-config
Expand All @@ -307,7 +307,7 @@ jobs:
- '20'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -319,7 +319,7 @@ jobs:
- name: Install corepack
run: npm install -g corepack
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
cache: yarn
cache-dependency-path: ./js/optify-config/yarn.lock
Expand All @@ -333,7 +333,7 @@ jobs:
yarn build:ts
working-directory: ./js/optify-config
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: bindings-x86_64-unknown-linux-gnu
path: ./js/optify-config
Expand All @@ -351,7 +351,7 @@ jobs:
- '20'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -361,7 +361,7 @@ jobs:
cache-on-failure: true
shared-key: linux-aarch64-gnu-rust
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: bindings-aarch64-unknown-linux-gnu
path: ./js/optify-config
Expand All @@ -378,7 +378,7 @@ jobs:
yarn build:ts
working-directory: ./js/optify-config
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
Expand All @@ -400,7 +400,7 @@ jobs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -410,7 +410,7 @@ jobs:
cache-on-failure: true
shared-key: linux-aarch64-musl-rust
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: bindings-aarch64-unknown-linux-musl
path: ./js/optify-config
Expand All @@ -428,7 +428,7 @@ jobs:
yarn build:ts
working-directory: ./js/optify-config
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
Expand All @@ -451,7 +451,7 @@ jobs:
- build
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -463,7 +463,7 @@ jobs:
- name: Install corepack
run: npm install -g corepack
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
cache: yarn
cache-dependency-path: ./js/optify-config/yarn.lock
Expand All @@ -472,12 +472,12 @@ jobs:
run: yarn install
working-directory: ./js/optify-config
- name: Download macOS x64 artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: bindings-x86_64-apple-darwin
path: ./js/optify-config/artifacts
- name: Download macOS arm64 artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: bindings-aarch64-apple-darwin
path: ./js/optify-config/artifacts
Expand All @@ -491,7 +491,7 @@ jobs:
shell: bash
working-directory: ./js/optify-config
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bindings-universal-apple-darwin
path: ./js/optify-config/${{ env.APP_NAME }}.*.node
Expand All @@ -508,7 +508,7 @@ jobs:
- test-linux-aarch64-musl-binding
- universal-macOS
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -520,7 +520,7 @@ jobs:
- name: Install corepack
run: npm install -g corepack
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
cache: yarn
cache-dependency-path: ./js/optify-config/yarn.lock
Expand All @@ -529,7 +529,7 @@ jobs:
run: yarn install
working-directory: ./js/optify-config
- name: Download all artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: ./js/optify-config/artifacts
- name: Move artifacts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
matrix:
os: ${{ fromJson(needs.setup.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Rust
- name: "[Rust] Setup cache"
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- name: "[JS] Install corepack"
run: npm install -g corepack
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
cache: yarn
cache-dependency-path: ./js/optify-config/yarn.lock
Expand All @@ -173,7 +173,7 @@ jobs:
working-directory: ./js/optify-config

# Python
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
name: "[Python] Setup"
with:
cache: pip
Expand Down
41 changes: 27 additions & 14 deletions .github/workflows/python_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,19 @@ jobs:
- runner: ubuntu-22.04
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
# manylinux builds run in a container and can leave root-owned files in
# python/optify/target, which breaks rust-cache save with tar permission errors.
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
workspaces: |
python/optify
rust/optify
cache-targets: false
cache-on-failure: true
shared-key: ${{ matrix.platform.runner }}-${{ matrix.platform.target }}-rust
- name: Build wheels
Expand All @@ -59,8 +62,16 @@ jobs:
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
working-directory: python/optify
# maturin-action enables sccache inside the manylinux container, but the
# rust-cache post step runs on the host and will fail `cargo metadata` if
# RUSTC_WRAPPER still points to the container-only sccache binary.
- name: "[Rust] Clear sccache wrapper"
shell: bash
run: |
echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
echo "SCCACHE_GHA_ENABLED=" >> "$GITHUB_ENV"
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wheels-linux-${{ matrix.platform.target }}
path: python/optify/dist
Expand All @@ -74,8 +85,8 @@ jobs:
- runner: windows-latest
target: x64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
architecture: ${{ matrix.platform.target }}
Expand All @@ -95,7 +106,7 @@ jobs:
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
working-directory: python/optify
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wheels-windows-${{ matrix.platform.target }}
path: python/optify/dist
Expand All @@ -109,8 +120,8 @@ jobs:
- runner: macos-latest
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: "[Rust] Setup cache"
Expand All @@ -129,15 +140,15 @@ jobs:
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
working-directory: python/optify
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wheels-macos-${{ matrix.platform.target }}
path: python/optify/dist
sdist:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false || github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: "[Rust] Setup cache"
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -153,7 +164,7 @@ jobs:
args: --out dist
working-directory: python/optify
- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wheels-sdist
path: python/optify/dist
Expand All @@ -170,11 +181,13 @@ jobs:
contents: write
# Used to generate artifact attestation
attestations: write
# Required by actions/attest when creating artifact metadata records.
artifact-metadata: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: actions/checkout@v6
- uses: actions/download-artifact@v8
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
uses: actions/attest@v4
with:
subject-path: 'wheels-*/*'
- name: "Publish to PyPI"
Expand Down
Loading
Loading