From a96ee8a019c4ec0f4499a1d3eb8f909d2926ceb3 Mon Sep 17 00:00:00 2001 From: Thomas Beutlich Date: Fri, 26 Jan 2024 20:02:08 +0100 Subject: [PATCH] refs #4093 Also check in CI --- .github/workflows/checkCI.yml | 66 +++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/.github/workflows/checkCI.yml b/.github/workflows/checkCI.yml index 465188f68f1..0be9f3e75df 100644 --- a/.github/workflows/checkCI.yml +++ b/.github/workflows/checkCI.yml @@ -1,13 +1,18 @@ name: CI -on: [pull_request] +on: + push: + pull_request: + workflow_dispatch: jobs: - external_c_checks: + external_c_checks_autoconf: + name: external-c-checks-autoconf timeout-minutes: 5 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 with: fetch-depth: 5 - name: Build libraries @@ -30,11 +35,54 @@ jobs: env: LIBDIR: linux64 CC: gcc + + external_c_checks_cmake: + name: external-c-checks-cmake-${{ matrix.toolchain }} + runs-on: ${{ matrix.os }} + timeout-minutes: 5 + strategy: + matrix: + toolchain: + - linux-gcc + - macos-clang + - windows-msvc + configuration: + - Debug + include: + - toolchain: linux-gcc + os: ubuntu-latest + compiler: gcc + - toolchain: macos-clang + os: macos-latest + compiler: clang + - toolchain: windows-msvc + os: windows-latest + compiler: msvc + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 5 + - name: Build libraries with ${{ matrix.compiler }} + run: | + cmake -S "${{ github.workspace }}/Modelica/Resources/BuildProjects/CMake" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="${{ github.workspace }}/.CI/Test" -DBUILD_TESTING=ON + cmake --build build --config ${{ matrix.configuration }} + if: ${{ matrix.compiler }} == "msvc" + - name: Build libraries with ${{ matrix.compiler }} + run: | + cmake -S "${{ github.workspace }}/Modelica/Resources/BuildProjects/CMake" -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DMODELICA_UTILITIES_INCLUDE_DIR="${{ github.workspace }}/.CI/Test" -DBUILD_TESTING=ON + cmake --build build + if: ${{ matrix.compiler }} != "msvc" + - name: Run tests + run: ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose + html_documentation_checks: + name: html-documentation-checks timeout-minutes: 5 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 with: fetch-depth: 5 - name: Setup python environment @@ -64,11 +112,14 @@ jobs: echo "::add-matcher::./.github/checkTags.json" python ./.CI/check_html.py checkTags ./ echo "::remove-matcher owner=checkTags::" + syntax_checks: + name: syntax-checks timeout-minutes: 5 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 with: fetch-depth: 5 - name: Get moparser @@ -82,11 +133,14 @@ jobs: echo "::add-matcher::./.github/moparser.json" ModelicaSyntaxChecker/Linux64/moparser -v 3.4 -r Complex.mo Modelica ModelicaReference ModelicaServices ModelicaTest ModelicaTestConversion4.mo ModelicaTestOverdetermined.mo ObsoleteModelica4.mo echo "::remove-matcher owner=moparser::" + deprecation_checks: + name: deprecation-checks timeout-minutes: 5 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 with: fetch-depth: 5 - name: Setup python environment