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
49 changes: 49 additions & 0 deletions .github/actions/meson-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Meson Build'
description: 'Build project using Meson and Ninja'

inputs:
compiler:
description: 'C++ compiler to use (e.g., g++-9, clang++-18, icpx)'
required: true
meson-options:
description: 'Additional Meson options'
required: false
default: '-Dbuild_tests=true --warnlevel 2 --werror --buildtype release'
cxxflags:
description: 'Additional CXXFLAGS'
required: false
default: ''
build-examples:
description: 'Whether to build examples first'
required: false
default: 'false'
pre-build-commands:
description: 'Commands to run before build (e.g., source environment)'
required: false
default: ''

runs:
using: 'composite'
steps:
- name: Build examples
if: inputs.build-examples == 'true'
shell: bash
env:
CXX: ${{ inputs.compiler }}
CXXFLAGS: ${{ inputs.cxxflags }}
run: |
${{ inputs.pre-build-commands }}
cd examples
make all

- name: Build with Meson
shell: bash
env:
CXX: ${{ inputs.compiler }}
CXXFLAGS: ${{ inputs.cxxflags }}
run: |
${{ inputs.pre-build-commands }}
make clean
meson setup ${{ inputs.meson-options }} builddir
cd builddir
ninja
40 changes: 40 additions & 0 deletions .github/actions/setup-build-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Setup Build Environment'
description: 'Common setup for building and testing x86-simd-sort'

inputs:
compiler:
description: 'Compiler to install (e.g., g++-9, clang-18)'
required: true
extra-packages:
description: 'Additional apt packages to install'
required: false
default: ''
setup-sde:
description: 'Whether to setup Intel SDE'
required: false
default: 'true'
sde-version:
description: 'Intel SDE version to install'
required: false
default: '9.58.0'

runs:
using: 'composite'
steps:
- name: Install dependencies
shell: bash
run: |
sudo apt update
sudo apt -y install ${{ inputs.compiler }} libgtest-dev meson wget git ${{ inputs.extra-packages }}

- name: Setup Intel SDE
if: inputs.setup-sde == 'true'
uses: petarpetrovt/setup-sde@31aa4a8e85e109bef00f1d838613fcc6ec421271 # v5.0
with:
environmentVariableName: SDE_PATH
sdeVersion: ${{ inputs.sde-version }}

- name: Add Intel SDE to PATH
if: inputs.setup-sde == 'true'
shell: bash
run: echo "$SDE_PATH" >> "$GITHUB_PATH"
26 changes: 16 additions & 10 deletions .github/workflows/build-numpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,14 @@ jobs:
with:
python-version: '3.12'

- name: Install Intel SDE
run: |
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/859732/sde-external-9.58.0-2025-06-16-lin.tar.xz
mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/
sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde
- name: Setup Intel SDE
uses: petarpetrovt/setup-sde@31aa4a8e85e109bef00f1d838613fcc6ec421271 # v5.0
with:
environmentVariableName: SDE_PATH
sdeVersion: 9.58.0

- name: Add Intel SDE to PATH
run: echo "$SDE_PATH" >> "$GITHUB_PATH"

- name: Install NumPy dependencies
working-directory: ${{ github.workspace }}/numpy
Expand Down Expand Up @@ -98,11 +101,14 @@ jobs:
sudo apt update
sudo apt -y install g++-12 gcc-12 git

- name: Install Intel SDE
run: |
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/859732/sde-external-9.58.0-2025-06-16-lin.tar.xz
mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/
sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde
- name: Setup Intel SDE
uses: petarpetrovt/setup-sde@31aa4a8e85e109bef00f1d838613fcc6ec421271 # v5.0
with:
environmentVariableName: SDE_PATH
sdeVersion: 9.58.0

- name: Add Intel SDE to PATH
run: echo "$SDE_PATH" >> "$GITHUB_PATH"

- name: Checkout NumPy main
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-on-32bit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cmake .. -DBUILD_GMOCK=OFF
make install

## Install Intel SDE
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/859732/sde-external-9.58.0-2025-06-16-lin.tar.xz
wget -O /tmp/sde.tar.xz https://downloadmirror.intel.com/915934/sde-external-10.8.0-2026-03-15-lin.tar.xz
mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/
mv /tmp/sde/* /opt/sde && ln -s /opt/sde/sde /usr/bin/sde

Expand Down
Loading
Loading