Merge pull request #5 from virtualcell/core-pyi-stubs #65
Workflow file for this run
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 and Release | |
| # Builds the native standalone MovingBoundarySolver executable (+ static lib) | |
| # and attaches them to a GitHub Release on each v* tag. | |
| # | |
| # Windows is intentionally excluded: the native solver links the bundled | |
| # FronTier library, which does not compile under MSVC (same blocker as the | |
| # Windows wheels — see issue #2). Linux + macOS executables are built here; | |
| # Python wheels are built/published separately by wheels.yml. | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| include: | |
| - os: ubuntu-latest | |
| artifact_prefix: linux | |
| - os: macos-latest | |
| artifact_prefix: macos | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Configure git for private submodules | |
| shell: bash | |
| run: | | |
| git config --global url."https://x-access-token:${{ secrets.SUBMODULE_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Initialize submodules | |
| shell: bash | |
| run: git submodule update --init --recursive | |
| - name: Install Ubuntu dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libhdf5-dev python3-dev python3-pip pybind11-dev libboost-dev libcurl4-openssl-dev | |
| pip3 install pybind11 | |
| - name: Install macOS dependencies | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install cmake hdf5 python pybind11 boost curl | |
| - name: Configure CMake | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DOPTION_TARGET_MESSAGING=ON | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Run tests | |
| run: | | |
| cd build | |
| ctest --output-on-failure -j"$(getconf _NPROCESSORS_ONLN)" | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p artifacts | |
| cp build/bin/MovingBoundarySolver artifacts/MovingBoundarySolver-${{ matrix.artifact_prefix }} | |
| cp build/bin/libMovingBoundaryLib.a artifacts/libMovingBoundaryLib-${{ matrix.artifact_prefix }}.a | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_prefix }}-artifacts | |
| path: artifacts/ | |
| retention-days: 1 | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: all-artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: all-artifacts/**/* | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Display release info | |
| run: | | |
| echo "Release created successfully!" | |
| find all-artifacts -type f -exec echo " - {}" \; |