diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e02f1f3..53b9e6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -42,26 +42,51 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} files: ./cov.xml - build: + build_optimized: + name: Build optimized wheels on ${{ matrix.os }} + needs: test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-13, macos-14] + + steps: + - uses: actions/checkout@v4 + + # Used to host cibuildwheel + - uses: actions/setup-python@v5 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.19.2 + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + env: + SLHDSA_BUILD_OPTIMIZED: "1" + + - uses: actions/upload-artifact@v4 + with: + name: slhdsa-optimized-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl + + build_unoptimized: + name: Build unoptimized wheels needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install pdm - python -m pdm install --prod - - name: Build - run: | - python -m pdm build --no-sdist - - name: Upload package - uses: actions/upload-artifact@v4 - with: - name: Wheel - path: dist/*.whl - + - uses: actions/checkout@v4 + + # Used to host cibuildwheel + - uses: actions/setup-python@v5 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.19.2 + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + + - uses: actions/upload-artifact@v4 + with: + name: slhdsa-unoptimized-wheels-${{ strategy.job-index }} + path: ./wheelhouse/*.whl