Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
817bb23
Bump PyBind11 version (2.13.6)
ThePituLegend Apr 9, 2025
9172345
Allow installation of Python bindings from source
ThePituLegend Apr 9, 2025
1eb0c01
Fix example fo Python binding
ThePituLegend Apr 9, 2025
b97f9ca
Python Packaging setup
ThePituLegend Apr 14, 2025
280972e
Cleaned common imports
ThePituLegend Apr 14, 2025
4ad8489
Modify CMake for Windows compilation
ThePituLegend Apr 14, 2025
46c5fe7
Fix wrong test
ThePituLegend Apr 15, 2025
65e9fc0
Fix void* pointer arithmetic
ThePituLegend Apr 15, 2025
fc0fe35
WIP: Windows Support
ThePituLegend Apr 15, 2025
71ac5b3
Fix mask shift
ThePituLegend Apr 16, 2025
9d52a25
More fixes towards Windows support
ThePituLegend Apr 16, 2025
b51c31f
Fix UB shift
ThePituLegend Apr 16, 2025
810b177
Compilation support for Windows (MSVC, Clang and GCC)
ThePituLegend Apr 17, 2025
266c572
Update Build&Test CI to handle Windows
ThePituLegend Apr 17, 2025
d14d294
Minor problems on Python Package
ThePituLegend Apr 17, 2025
d3a7736
Update CI to only trigger on main pushes
ThePituLegend Apr 25, 2025
cb2167e
Update Python Tests
ThePituLegend Apr 25, 2025
10b1fdf
Update CI to include Apple Silicon
ThePituLegend Apr 25, 2025
cec7b98
Increase compile & testing parallelism
ThePituLegend Apr 25, 2025
2b8d52e
Enable CI to build Python Wheels
ThePituLegend Apr 25, 2025
8fc84ab
Update .gitignore
ThePituLegend Apr 30, 2025
f7457cc
Python binding SIMD vs Scalar dynamic dispatch
ThePituLegend Apr 29, 2025
2e42d0f
Update tests for new Python binding approach
ThePituLegend Apr 30, 2025
f95353d
Real "FORCESCALAR" mode on Windows
ThePituLegend Apr 29, 2025
a125c5c
Update CI
ThePituLegend Apr 30, 2025
f0d3abd
Do not error on unused compile flags
ThePituLegend Apr 30, 2025
0482121
Update CI
ThePituLegend Apr 30, 2025
9fcb43a
Update release system.
ThePituLegend May 5, 2025
0d70f31
Update README
ThePituLegend May 5, 2025
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
28 changes: 16 additions & 12 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: Build and Test

on:
push:
branches: [ main ]
paths-ignore: # Skip the workflow if only documentation files are changed
- '**/*.md'
- '**/LICENSE'
Expand All @@ -16,16 +15,21 @@ on:

jobs:
Build-and-Test:
name: Build and Test on ${{ matrix.os }} with ${{ matrix.compiler.cpp }}
runs-on: ${{ matrix.os }}

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
# fail-fast: false

matrix:
os: [ubuntu-22.04, macos-13]
os: [ubuntu-24.04, macos-13, macos-14, windows-2022]
build_type: [Debug]
compiler: [ {cpp: g++, c: gcc}, {cpp: clang++, c: clang} ]
compiler: [ {cpp: g++, c: gcc}, {cpp: clang++, c: clang}, {cpp: cl, c: cl} ]
exclude:
- os: ubuntu-24.04
compiler: {cpp: cl, c: cl}
- os: macos-13
compiler: {cpp: cl, c: cl}
- os: macos-14
compiler: {cpp: cl, c: cl}

steps:
- uses: actions/checkout@v4
Expand All @@ -50,12 +54,12 @@ jobs:
-S ${{ github.workspace }}

- name: Build
run: cmake --build ${{ steps.strings.outputs.build-dir }} --config ${{ matrix.build_type }} --parallel 2
run: cmake --build ${{ steps.strings.outputs.build-dir }} --config ${{ matrix.build_type }} --parallel 4

- name: Install
run: sudo cmake --install ${{ steps.strings.outputs.build-dir }} --config ${{ matrix.build_type }} # Test if install works
run: cmake --install ${{ steps.strings.outputs.build-dir }} --config ${{ matrix.build_type }} --prefix ./test-install

- name: Run Tests
run: |
cd ${{ steps.strings.outputs.build-dir }}
ctest --build-config ${{ matrix.build_type }} --output-on-failure -E edlib_tests
shell: bash
working-directory: ${{ steps.strings.outputs.build-dir }}
run: ctest --build-config ${{ matrix.build_type }} --parallel 4 --output-on-failure -E edlib_tests
94 changes: 74 additions & 20 deletions .github/workflows/publish_release_binaries.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
name: Handle Release

on:
release:
types: [created]
name: Handle Release
workflow_dispatch:

jobs:
Publish-Release-Binaries:
runs-on: ubuntu-latest
Build-Release-Binaries:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
label: linux.x86_64
simd: true
ext: ""
- os: macos-13
label: darwin.x86_64
simd: true
ext: ""
- os: macos-14
label: darwin.aarch64
simd: false
ext: ""
- os: windows-2022
label: windows.x86_64
simd: true
ext: ".exe"

steps:
- name: Checkout the repository
Expand All @@ -13,50 +35,82 @@ jobs:
fetch-depth: 1
submodules: recursive

- name: Set reusable strings
- name: Set reusable paths
id: strings
shell: bash
run: |
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
echo "bin-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT"
echo "release-dir=${{ github.workspace }}/bin/release" >> "$GITHUB_OUTPUT"

- name: Create release directory
run: mkdir -p ${{ steps.strings.outputs.release-dir }}

- name: Configure CMake (w/ vector support)
- name: Configure CMake (SIMD)
if: matrix.simd == true
run: >
cmake -B ${{ steps.strings.outputs.build-dir }}
-DQUICKED_NONATIVE=ON
${{ matrix.os == 'macos-14' && '-DCMAKE_APPLE_SILICON_PROCESSOR=arm64' || '' }}
-S ${{ github.workspace }}

- name: Build (w/ vector support)
run: cmake --build ${{ steps.strings.outputs.build-dir }} --config Release --parallel 2
- name: Build (SIMD)
if: matrix.simd == true
run: cmake --build ${{ steps.strings.outputs.build-dir }} --config Release --parallel 4

- name: Move the target artifacts (w/ vector support)
- name: Move artifacts (SIMD)
if: matrix.simd == true
shell: bash
run: |
mkdir -p ${{ steps.strings.outputs.bin-dir }}/release
mv ${{ steps.strings.outputs.bin-dir }}/align_benchmark ${{ steps.strings.outputs.bin-dir }}/release/align_benchmark-x86_64-SIMD
mv ${{ steps.strings.outputs.bin-dir }}/generate_dataset ${{ steps.strings.outputs.bin-dir }}/release/generate_dataset-x86_64-SIMD
mv "${{ steps.strings.outputs.bin-dir }}/align_benchmark${{ matrix.ext }}" \
"${{ steps.strings.outputs.release-dir }}/align_benchmark-${{ matrix.label }}-SIMD${{ matrix.ext }}"
mv "${{ steps.strings.outputs.bin-dir }}/generate_dataset${{ matrix.ext }}" \
"${{ steps.strings.outputs.release-dir }}/generate_dataset-${{ matrix.label }}-SIMD${{ matrix.ext }}"

- name: Clean
if: matrix.simd == true
run: cmake --build ${{ steps.strings.outputs.build-dir }} --target clean

- name: Configure CMake (w/o vector support)
- name: Configure CMake (Scalar)
run: >
cmake -B ${{ steps.strings.outputs.build-dir }}
-DQUICKED_NONATIVE=ON
-DQUICKED_FORCESCALAR=ON
${{ matrix.os == 'macos-14' && '-DCMAKE_APPLE_SILICON_PROCESSOR=arm64' || '' }}
-S ${{ github.workspace }}

- name: Build (w/o vector support)
run: cmake --build ${{ steps.strings.outputs.build-dir }} --config Release --parallel 2
- name: Build (Scalar)
run: cmake --build ${{ steps.strings.outputs.build-dir }} --config Release --parallel 4

- name: Move the target artifacts (w/o vector support)
- name: Move artifacts (Scalar)
shell: bash
run: |
mkdir -p ${{ steps.strings.outputs.bin-dir }}/release
mv ${{ steps.strings.outputs.bin-dir }}/align_benchmark ${{ steps.strings.outputs.bin-dir }}/release/align_benchmark-x86_64
mv ${{ steps.strings.outputs.bin-dir }}/generate_dataset ${{ steps.strings.outputs.bin-dir }}/release/generate_dataset-x86_64
mv "${{ steps.strings.outputs.bin-dir }}/align_benchmark${{ matrix.ext }}" \
"${{ steps.strings.outputs.release-dir }}/align_benchmark-${{ matrix.label }}${{ matrix.ext }}"
mv "${{ steps.strings.outputs.bin-dir }}/generate_dataset${{ matrix.ext }}" \
"${{ steps.strings.outputs.release-dir }}/generate_dataset-${{ matrix.label }}${{ matrix.ext }}"

- name: Upload per-platform artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.label }}
path: ${{ steps.strings.outputs.release-dir }}/*

Upload-Release-Binaries:
runs-on: ubuntu-latest
needs: Build-Release-Binaries

steps:
- name: Download all release artifacts
uses: actions/download-artifact@v4
with:
pattern: release-*
merge-multiple: true
path: ./all_binaries

- name: Upload the artifacts
- name: Upload the artifacts to the release
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: '${{ steps.strings.outputs.bin-dir }}/release/*'
args: './all_binaries/*'
59 changes: 59 additions & 0 deletions .github/workflows/python_wheels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build Python Wheels

on:
release:
types: [created]
workflow_dispatch:

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-13, macos-14, windows-2022] # Macos 13 (Intel) / Macos 14 (Apple Silicon)

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.23.2
env:
# Pass Apple Silicon architecture to CMake when on macos-14
CIBW_ENVIRONMENT: CMAKE_ARGS="-DQUICKED_NONATIVE=ON ${{ matrix.os == 'macos-14' && '-DCMAKE_APPLE_SILICON_PROCESSOR=arm64' || '' }}"

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_all:
needs: [build_wheels, make_sdist]
environment: PyPI
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ build
.built
lib
bin
dist
wheelhouse
.vscode
Testing
Loading