Skip to content

Commit

Permalink
Upgrade macOS CI to Apple Silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsvu committed Jun 3, 2024
1 parent 5365820 commit 620a8a0
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -858,17 +858,15 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
# Build all test executables and run unit tests on macOS
unit_tests_macos:
name: Unit tests on macOS
runs-on: macos-13
runs-on: macos-14
env:
# We install some low-level dependencies with Homebrew. They get picked up
# by `spack external find`.
SPECTRE_BREW_DEPS: >- # Line breaks are spaces, no trailing newline
autoconf automake catch2 ccache cmake pkg-config boost
autoconf automake boost catch2 ccache cmake gsl hdf5 yaml-cpp
# We install these packages with Spack and cache them. The full specs are
# listed in support/DevEnvironments/spack.yaml. This list is only needed
# to create the cache.
SPECTRE_SPACK_DEPS: >-
blaze charmpp gsl hdf5 libxsmm openblas yaml-cpp
# listed below. This list is only needed to create the cache.
SPECTRE_SPACK_DEPS: charmpp
CCACHE_DIR: $HOME/ccache
CCACHE_TEMPDIR: $HOME/ccache-tmp
CCACHE_MAXSIZE: "2G"
Expand All @@ -877,6 +875,9 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
CCACHE_COMPILERCHECK: content
SPACK_SKIP_MODULES: true
SPACK_COLOR: always
# The number of cores to run on. This is given at:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NUM_CORES: 3
steps:
- name: Record start time
id: start
Expand All @@ -886,7 +887,7 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
- name: Install Homebrew dependencies
run: |
brew install $SPECTRE_BREW_DEPS
Expand All @@ -904,7 +905,7 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
run: |
cd $HOME
git clone -c feature.manyFiles=true --depth=1 \
--branch releases/v0.18 --single-branch \
--branch releases/v0.22 --single-branch \
https://github.com/spack/spack.git
- name: Configure Spack
# - To avoid re-building packages that are already installed by Homebrew
Expand All @@ -914,7 +915,7 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
source $HOME/spack/share/spack/setup-env.sh
spack debug report
spack compiler find && spack compiler list
spack external find && spack external find perl python
spack external find
spack config get packages
spack mirror add dependencies file://$HOME/dependencies/spack
# Install the remaining dependencies from source with Spack. We install
Expand All @@ -923,9 +924,9 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
- name: Install Spack dependencies
run: |
source $HOME/spack/share/spack/setup-env.sh
spack env create spectre support/DevEnvironments/spack.yaml
spack env create spectre
spack env activate spectre
spack remove catch2 doxygen jemalloc boost
spack add charmpp@7.0.0 backend=multicore build-target=charm++
spack concretize --reuse
spack install --no-check-signature
spack find -v
Expand Down Expand Up @@ -988,7 +989,7 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
-D OVERRIDE_ARCH=x86-64 \
-D BUILD_SHARED_LIBS=ON \
-D BUILD_PYTHON_BINDINGS=ON \
-D BOOTSTRAP_PY_DEPS=ON \
-D SPECTRE_FETCH_MISSING_DEPS=ON \
-D MEMORY_ALLOCATOR=SYSTEM \
-D CHARM_ROOT=$(spack location --install-dir charmpp) \
-D CMAKE_BUILD_TYPE=Debug \
Expand All @@ -1005,10 +1006,8 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
$GITHUB_WORKSPACE
- name: Build unit tests
working-directory: build
# Build on 4 threads because GitHub's macOS VMs have 4 cores:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
run: |
make -j4 unit-tests
make -j${NUM_CORES} unit-tests
- name: Build executables
working-directory: build
run: |
Expand Down Expand Up @@ -1036,7 +1035,7 @@ ${{ matrix.build_type }}-pch-${{ matrix.use_pch || 'ON' }}"
- name: Run unit tests
working-directory: build
run: |
ctest -j4 --repeat after-timeout:3 --output-on-failure
ctest -j${NUM_CORES} --repeat after-timeout:3 --output-on-failure
- name: Install
working-directory: build
run: |
Expand Down

0 comments on commit 620a8a0

Please sign in to comment.