Use the C++ version of libOpenCOR in OpenCOR and the JavaScript version of libOpenCOR in OpenCOR's Web app #115
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| ci: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Windows | |
| os: windows-latest | |
| script: win | |
| - name: Linux | |
| os: ubuntu-latest | |
| script: linux | |
| - name: macOS (Intel) | |
| os: macos-13 | |
| script: mac | |
| - name: macOS (ARM) | |
| os: macos-latest | |
| script: mac | |
| steps: | |
| - name: Check out OpenCOR | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Look for ClangFormat on Windows | |
| if: matrix.name == 'Windows' | |
| run: | | |
| if not exist "%ProgramFiles%\LLVM\bin\clang-format.exe" ( | |
| echo "ClangFormat not found" | |
| ) | |
| - name: Look for ClangFormat on Linux and macOS | |
| if: matrix.name != 'Windows' | |
| run: | | |
| if ! command -v clang-format &> /dev/null; then | |
| echo "ClangFormat not found" | |
| fi | |
| - name: Install all of OpenCOR's dependencies | |
| run: pnpm install | |
| - name: Look for ClangFormat on Windows | |
| if: matrix.name == 'Windows' | |
| run: | | |
| if not exist "%ProgramFiles%\LLVM\bin\clang-format.exe" ( | |
| echo "ClangFormat not found" | |
| ) | |
| - name: Look for ClangFormat on Linux and macOS | |
| if: matrix.name != 'Windows' | |
| run: | | |
| if ! command -v clang-format &> /dev/null; then | |
| echo "ClangFormat not found" | |
| fi | |
| - name: Check that OpenCOR's code and OpenCOR's Web app's code are properly formatted | |
| run: pnpm format:check | |
| - name: Lint OpenCOR's code and OpenCOR's Web app's code | |
| run: pnpm lint | |
| - name: Type check OpenCOR's code | |
| run: pnpm typecheck | |
| - name: Type check OpenCOR's Web app's code | |
| run: pnpm typecheck:web | |
| - name: Build OpenCOR | |
| run: pnpm build | |
| - name: Build OpenCOR's Web app | |
| run: pnpm build:web | |
| - name: Clean OpenCOR's environment | |
| run: pnpm clean |