Skip to content

Begin using Mac runners #2

Begin using Mac runners

Begin using Mac runners #2

Workflow file for this run

name: Test MacOS
on:
push:
branches:
- master
pull_request:
# By default this workflow is run on the "opened", "synchronize" and
# "reopened" events. We add "labelled" so it will run if the PR is given a label.
types: [opened, synchronize, reopened, labeled]
concurrency:
# Cancels jobs running if new commits are pushed
group: >
${{ github.workflow }}-
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Firedrake
runs-on: [self-hosted, macOS]
# Only run this action if we are pushing to master or the PR is labelled "macOS"
if: ${{ (github.ref == 'refs/heads/master') || contains(github.event.pull_request.labels.*.name, 'macOS') }}
env:
FIREDRAKE_CI_TESTS: 1
PYOP2_CI_TESTS: 1
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
steps:
- uses: actions/checkout@v4
- name: Build Firedrake
run: |
./firedrake/scripts/firedrake-install \
$COMPLEX \
--honour-petsc-dir \
--mpicc="$MPICH_DIR"/mpicc \
--mpicxx="$MPICH_DIR"/mpicxx \
--mpif90="$MPICH_DIR"/mpif90 \
--mpiexec="$MPICH_DIR"/mpiexec \
--venv-name firedrake_venv \
--no-package-manager \
--disable-ssh \
--documentation-dependencies \
--torch \
--jax \
--netgen \
--slepc \
--install thetis \
--install gusto \
--install icepack \
--install irksome \
--install femlium \
--install fascd \
--install defcon \
--install gadopt \
--install asQ \
|| (cat firedrake-install.log && /bin/false)
# - name: Install test dependencies
# run: |
# . ../firedrake_venv/bin/activate
# python "$(which firedrake-clean)"
# python -m pip install \
# pytest-xdist pytest-timeout ipympl
# python -m pip list
# - name: Test Firedrake
# run: |
# . ../firedrake_venv/bin/activate
# echo OMP_NUM_THREADS is "$OMP_NUM_THREADS"
# echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS"
# python -m pytest -v tests/test_0init.py
# python -m pytest \
# --durations=200 \
# --timeout=1800 \
# --timeout-method=thread \
# -o faulthandler_timeout=1860 \
# -n 12 --dist worksteal \
# --junit-xml=firedrake.xml \
# -sv tests
# timeout-minutes: 120
# - name: Publish Test Report
# uses: mikepenz/[email protected]
# if: ${{ always() && ( github.ref != 'refs/heads/master') }}
# with:
# report_paths: '/__w/firedrake/firedrake/firedrake.xml'
# comment: true
# check_name: "Firedrake ${{ matrix.scalar-type }}"
# updateComment: true
# flaky_summary: true
# - name: Test pyadjoint
# if: ${{ matrix.scalar-type == 'real' }}
# run: |
# . ../firedrake_venv/bin/activate
# cd ../firedrake_venv/src/pyadjoint
# python -m pytest \
# --durations=200 \
# --timeout=600 \
# --timeout-method=thread \
# -o faulthandler_timeout=660 \
# -n 12 --dist worksteal \
# -sv tests/firedrake_adjoint
# timeout-minutes: 30
# - name: Cleanup
# # Belt and braces: clean up before and after the run.
# if: ${{ always() }}
# run: |
# cd ..
# rm -rf firedrake_venv
# docker_tag:
# name: "Set the Docker release tag"
# runs-on: [self-hosted, Linux]
# if: ${{ github.ref == 'refs/heads/master' }}
# steps:
# - name: Set release tag
# # Set a release tag if triggered by monthly CRON job
# if: github.event.schedule == '0 0 1 * *'
# run: |
# DATE_TAG="$(date +%Y-%m)"
# echo "RELEASE_TAG=$DATE_TAG" >> "$GITHUB_ENV"
# - name: Print release tag being used
# run: |
# echo The release tag is "$RELEASE_TAG"
# outputs:
# tag: ${{ env.RELEASE_TAG }}
# docker:
# name: "Build Docker containers"
# # Only run on master, but always generate firedrake-env image,
# # even if build fails (see docker.yml)
# if: ${{ (github.ref == 'refs/heads/master') && always() }}
# needs: [build, docker_tag]
# uses: ./.github/workflows/docker.yml
# with:
# tag: ${{ needs.docker_tag.outputs.tag }}
# status: ${{ needs.build.result }}
# secrets: inherit