Homebrew formula #141
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: Homebrew | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| homebrew-mfc: | |
| name: Test Homebrew package (macOS) | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Homebrew | |
| uses: Homebrew/actions/setup-homebrew@master | |
| - name: Install MFC via Homebrew | |
| run: | | |
| set -euo pipefail | |
| # Prefer bottle; fall back to source build if needed | |
| brew install mflowcode/mfc/mfc || brew install --build-from-source mflowcode/mfc/mfc | |
| - name: Run MFC test case | |
| run: | | |
| set -euo pipefail | |
| echo "Running a simple test case (1D Sod shock tube)..." | |
| TESTDIR=$(mktemp -d) | |
| cp "$(brew --prefix mfc)/examples/1D_sodshocktube/case.py" "$TESTDIR/" | |
| echo "Running with $(sysctl -n hw.ncpu) processors..." | |
| mfc "$TESTDIR/case.py" -j "$(sysctl -n hw.ncpu)" | |
| test -d "$TESTDIR/silo_hdf5" | |
| echo "✅ Test case completed successfully and produced output" | |
| - name: Basic installation verification | |
| run: | | |
| set -euo pipefail | |
| echo "1. Checking binaries..." | |
| test -x "$(brew --prefix mfc)/bin/pre_process" | |
| test -x "$(brew --prefix mfc)/bin/simulation" | |
| test -x "$(brew --prefix mfc)/bin/post_process" | |
| test -x "$(brew --prefix mfc)/bin/mfc" | |
| echo "2. Checking toolchain..." | |
| test -d "$(brew --prefix mfc)/toolchain" | |
| echo "3. Checking Python venv..." | |
| test -d "$(brew --prefix mfc)/libexec/venv" | |
| test -x "$(brew --prefix mfc)/libexec/venv/bin/python" | |
| echo "4. Checking examples..." | |
| test -d "$(brew --prefix mfc)/examples" | |
| echo "5. Testing mfc command..." | |
| mfc --help | |
| echo "✅ All verification checks passed" |