diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e69900..8cc7053 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,91 +1,91 @@ name: CI on: workflow_dispatch: pull_request: push: branches: - main jobs: standard: strategy: fail-fast: false matrix: runs-on: [ubuntu-latest, macos-latest, windows-latest] include: - runs-on: ubuntu-latest config: -DCMAKE_BUILD_TYPE=Release -DBUILD_ALL=1 - runs-on: macos-latest config: -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=1 - runs-on: windows-latest config: -DCMAKE_BUILD_TYPE=Release -DBUILD_ALL=1 -G Ninja 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 + uses: actions/checkout@v3 - name: Set conda environment uses: mamba-org/provision-with-micromamba@main with: environment-file: environment.yaml environment-name: myenv cache-env: true - name: Set dummy version run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.0" >> $GITHUB_ENV - name: Configure using CMake run: cmake -Bbuild ${{ matrix.config }} - name: Build doxygen-docs if: runner.os == 'Linux' working-directory: build run: | make html cat doxygen_warnings.log - name: Require minimal documentation if: runner.os == 'Linux' working-directory: build run: if grep -q "not documented" doxygen_warnings.log ; then exit 1; fi - name: Build sphinx-docs if: runner.os == 'Linux' working-directory: docs run: make html - name: Build C++ if: runner.os != 'Windows' working-directory: build run: cmake --build . - name: Run C++ if: runner.os != 'Windows' working-directory: build run: ctest --output-on-failure - name: Build and install Python module run: python -m pip install . -v - name: Run Python tests run: python -m unittest discover tests - name: Run examples (statics) working-directory: docs/examples/statics run: | python fixed-displacement_elastic.py python fixed-displacement_elastic_manual-partition.py python partial-periodic_elastic.py python periodic_elastoplastic.py python periodic_elastoplastic_finite-strain.py diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 09992ad..3e1c426 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,51 +1,51 @@ name: gh-pages on: push: branches: - main release: types: [released] jobs: publish: runs-on: ubuntu-latest defaults: run: shell: bash -l {0} steps: - name: Basic GitHub action setup - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set conda environment uses: mamba-org/provision-with-micromamba@main with: environment-file: environment.yaml environment-name: myenv - name: Configure using CMake run: cmake -Bbuild -DBUILD_DOCS=1 - name: Build the docs working-directory: build run: make html - name: Deploy to GitHub Pages if: success() uses: crazy-max/ghaction-github-pages@v2 with: target_branch: gh-pages build_dir: build/html jekyll: false keep_history: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 9035d06..a3e22ca 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,14 +1,14 @@ name: pre-commit on: pull_request: push: branches: [main] jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-python@v2 - uses: pre-commit/action@v2.0.3