Skip to content

Bump actions/setup-python from 4 to 5 #1174

Bump actions/setup-python from 4 to 5

Bump actions/setup-python from 4 to 5 #1174

Workflow file for this run

name: CI:macOS-gcc
on:
push:
branches: [ devel3 ]
paths-ignore:
- 'wiki/**'
pull_request:
branches: [ devel3 ]
paths-ignore:
- 'wiki/**'
env:
BUILD_TYPE: RelWithDebInfo
PYTHON_VERSION: '3.10'
jobs:
build-and-test:
runs-on: macos-12
steps:
- name: Cancel Previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}
- name: Dependencies
run: |
brew install gsl hdf5 fftw libomp ninja
python3 -m venv ${{github.workspace}}/synergia-env
source ${{github.workspace}}/synergia-env/bin/activate
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install cython matplotlib mpi4py numpy pyparsing pytest
# Build h5py from source using the Homebrew installed hdf5
HDF5_DIR=$(brew --prefix hdf5) python3 -m pip install --no-binary=h5py h5py
- name: CMake
run: |
source ${{github.workspace}}/synergia-env/bin/activate
cmake -B ${{github.workspace}}/build \
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_KOKKOS_BACKEND=OpenMP \
-DPython_EXECUTABLE=${{github.workspace}}/synergia-env/bin/python${{env.PYTHON_VERSION}} \
-DBUILD_PYTHON_BINDINGS=on -DBUILD_EXAMPLES=off -GNinja
- name: Build
# Build your program with the given configuration
run: |
source ${{github.workspace}}/synergia-env/bin/activate
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: ctest
# Execute tests defined by the CMake configuration.
run: |
cd ${{github.workspace}}/build
source ${{github.workspace}}/synergia-env/bin/activate
ctest -C ${{env.BUILD_TYPE}} --output-on-failure