Re-enable Windows CI matrix for repro #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build HDF5 Filter | |
| on: | |
| #push: | |
| # branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| release: | |
| types: [ published ] | |
| # Need write permission to upload release assets | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| arch: amd64 | |
| lib_name: libh5z_ebcc*.so | |
| archive_name: ebcc-h5plugin-linux-amd64.zip | |
| - os: ubuntu-latest | |
| arch: arm64 | |
| lib_name: libh5z_ebcc*.so | |
| archive_name: ebcc-h5plugin-linux-arm64.zip | |
| - os: windows-latest | |
| arch: amd64 | |
| lib_name: h5z_ebcc*.dll | |
| archive_name: ebcc-h5plugin-windows-amd64.zip | |
| - os: macos-latest | |
| arch: arm64 | |
| lib_name: libh5z_ebcc*.so | |
| archive_name: ebcc-h5plugin-macos-arm64.zip | |
| steps: | |
| - name: Checkout repository and submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install wheel cmake | |
| - name: Build wheel | |
| run: pip wheel . -w dist --no-deps | |
| - name: Unpack wheel and find library | |
| shell: bash | |
| run: | | |
| # Unzip the wheel file to a temporary directory | |
| unzip dist/*.whl -d wheel_contents | |
| # Find the library file, move it to a known location, and record its name | |
| LIB_FILE=$(find wheel_contents -name "${{ matrix.lib_name }}" | head -1) | |
| mv "$LIB_FILE" . | |
| echo "LIB_FILE=$(basename $LIB_FILE)" >> $GITHUB_ENV | |
| echo "WHL_FILE=$(ls dist/*.whl | head -1)" >> $GITHUB_ENV | |
| - name: Archive dynamic library (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| run: zip ${{ matrix.archive_name }} $LIB_FILE | |
| - name: Archive dynamic library (Windows) | |
| if: runner.os == 'Windows' | |
| shell: powershell | |
| run: Compress-Archive -Path $env:LIB_FILE -DestinationPath ${{ matrix.archive_name }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.archive_name }} | |
| path: | | |
| ${{ matrix.archive_name }} | |
| dist/*.whl | |
| - name: Run HDF5 example | |
| shell: bash | |
| run: | | |
| python -m pip install . | |
| python examples/example_hdf5.py | |
| - name: Upload asset to GitHub Release | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| ${{ matrix.archive_name }} | |
| ${{ env.WHL_FILE }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |