CMake #22
This file contains 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: CMake | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup Python | |
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 | |
with: | |
python-version: '3.11' | |
- name: Install rtools (mingw-w64) (see SciPy workflow for more details) | |
run: | | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
choco install rtools -y --no-progress --force --version=4.0.0.20220206 | |
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH | |
fi | |
shell: bash | |
- name: Install build dependencies from PyPI | |
run: | | |
python -m pip install meson cmake ninja | |
- name: Configure Meson | |
# Configure meson to dump all executables in the test directory so Windows would work | |
run: cd ${{github.workspace}} && meson setup builddir | |
- name: Build | |
# Build your program with the given configuration | |
run: meson compile -C ${{github.workspace}}/builddir --verbose | |
- name: Test | |
working-directory: ${{github.workspace}}/builddir | |
# Execute tests defined by meson test configuration. | |
run: meson test -v |