Build libraries #63
Workflow file for this run
This file contains 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 libraries | |
on: | |
create: | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
build_macosx: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# macos-13 is an intel runner, higher macos's are apple silicon | |
# At some point, maybe get this to work on windows-latest | |
os: [macos-13, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up CMake | |
uses: lukka/get-cmake@latest | |
- name: Run the build | |
if: matrix.os == 'macos-13' | |
run: | | |
git config --global --add safe.directory $(pwd) | |
./build_macosx.sh "x86_64" | |
tar -czf macosx_x86_64.tar.gz installed/ | |
- name: Run the build | |
if: matrix.os == 'macos-latest' | |
run: | | |
git config --global --add safe.directory $(pwd) | |
./build_macosx.sh "arm64" | |
tar -czf macosx_arm64.tar.gz installed/ | |
- name: Upload tarballs | |
uses: actions/upload-artifact@v3 | |
with: | |
path: "*.tar.gz" | |
build_windows_x86_64: | |
name: Build Windows (x86_64) | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run the build | |
run: | | |
git config --global --add safe.directory $(pwd) | |
./build_windows.sh | |
tar -czf windows_x86_64.tar.gz installed/ | |
shell: bash | |
- name: Upload tarballs | |
uses: actions/upload-artifact@v3 | |
with: | |
path: "*.tar.gz" | |
publish: | |
name: Publish libraries | |
needs: [build_macosx, build_windows_x86_64] | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download macosx artifact | |
uses: actions/download-artifact@v3 | |
with: | |
path: dump | |
- name: List artifacts | |
run: ls -lR | |
working-directory: dump | |
- name: Publish release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: "HDF5 binaries" | |
files: dump/*/* |