Skip to content

build

build #311

Workflow file for this run

name: build
on: [workflow_call, workflow_dispatch]
jobs:
build-winmac:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-msvc
os: windows-2022
arch: x64
- target: i686-pc-windows-msvc
os: windows-2022
arch: x86
- target: x86_64-apple-darwin
os: macos-15-intel
arch: x64
min_macos: "10.13"
- target: aarch64-apple-darwin
os: macos-15
arch: arm64
min_macos: "11.0"
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install Nightly Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2025-02-01
components: rustfmt
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
architecture: ${{ matrix.arch }}
- name: Install Python packages
run: pip install -r python/requirements.txt
- name: Build wheel
shell: bash
run: |
export MACOSX_DEPLOYMENT_TARGET=${{ matrix.min_macos }}
make TARGET=${{ matrix.target }}
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: pyxel-${{ matrix.target }}
path: dist/*
build-linux:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
image: messense/manylinux2014-cross:x86_64
- target: i686-unknown-linux-gnu
image: messense/manylinux2014-cross:i686
- target: aarch64-unknown-linux-gnu
image: messense/manylinux2014-cross:aarch64
- target: armv7-unknown-linux-gnueabihf
image: messense/manylinux2014-cross:armv7l
runs-on: ubuntu-22.04
container: ${{ matrix.image }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install Nightly Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2025-02-01
components: rustfmt
- name: Install Python packages
run: pip install -r python/requirements.txt
- name: Install build deps (X11/ALSA headers)
run: |
if command -v yum >/dev/null 2>&1; then
yum install -y gcc gcc-c++ make pkgconfig \
alsa-lib-devel \
libX11-devel libXext-devel libXcursor-devel libXrandr-devel libXi-devel libXinerama-devel
fi
- name: Build wheel
run: |
export CC=$TARGET_CC
export AR=$TARGET_AR
export RANLIB=$TARGET_RANLIB
make TARGET=${{ matrix.target }}
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: pyxel-${{ matrix.target }}
path: dist/*