| name: Continuous Integration |
| |
| on: [push, pull_request] |
| |
| env: |
| BUILD_TYPE: Release |
| |
| jobs: |
| build: |
| name: ${{ matrix.config.name }} |
| runs-on: ${{ matrix.config.os }} |
| strategy: |
| fail-fast: false |
| matrix: |
| config: |
| - { |
| name: "MacOS Latest, Clang", |
| os: macos-latest, |
| test_target: test, |
| cc: "clang", cxx: "clang++" |
| } |
| - { |
| name: "Ubuntu Latest, GCC", |
| os: ubuntu-latest, |
| test_target: test, |
| cc: "gcc", cxx: "g++" |
| } |
| - { |
| name: "Windows Latest, MSVC", |
| os: windows-latest, |
| test_target: RUN_TESTS, |
| cc: "cl", cxx: "cl", |
| environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" |
| } |
| |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v4 |
| - name: Set up Python 3.x |
| uses: actions/setup-python@v5 |
| # 3.x uses the latest minor version of python3. This may break briefly when there is a new version |
| # but dependent libraries (e.g. numpy) have not yet released a compatible update. |
| # May need to enable version pinning (e.g. 3.10) temporarily at times. |
| with: |
| python-version: '3.x' |
| - name: Install Python dependencies |
| run: python -m pip install --upgrade pip setuptools wheel tox |
| - name: Build and run Python tests |
| run: python -m tox |