name: CI on: workflow_dispatch: pull_request: push: branches: - master jobs: default-shell: strategy: fail-fast: false matrix: runs-on: [ubuntu-latest, macos-latest, windows-latest] defaults: run: shell: bash -l {0} name: "${{ matrix.runs-on }} • x64 ${{ matrix.args }}" runs-on: ${{ matrix.runs-on }} steps: - name: Basic GitHub action setup uses: actions/checkout@v2 - name: Set conda environment "test" uses: conda-incubator/setup-miniconda@v2 with: mamba-version: "*" channels: conda-forge,defaults channel-priority: true environment-file: environment.yaml activate-environment: test auto-activate-base: false - name: Configure using CMake (with examples) if: runner.os == 'Linux' run: cmake . -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=RELEASE - name: Configure using CMake (without examples) if: runner.os != 'Linux' run: cmake . -DBUILD_TESTS=ON -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=RELEASE - name: Build C++ tests & examples run: cmake --build . - name: Run C++ tests & examples run: cmake --build . --target "RUN_TESTS_AND_EXAMPLES" - name: Build and install Python module run: | python setup.py build python setup.py install - name: Run Python examples if: runner.os != 'Windows' run: | conda install -c conda-forge python-gmatelastic python ./docs/examples/statics/FixedDisplacements_LinearElastic/example.py --no-plot python ./docs/examples/statics/FixedDisplacements_LinearElastic/manual_partition.py --no-plot