diff --git a/.github/workflows/checkCI.yml b/.github/workflows/checkCI.yml index 465188f68f1..0f0eee6790a 100644 --- a/.github/workflows/checkCI.yml +++ b/.github/workflows/checkCI.yml @@ -1,13 +1,22 @@ name: CI -on: [pull_request] +on: + push: + pull_request: + workflow_dispatch: + +defaults: + run: + shell: bash 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 +39,69 @@ 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 + - windows-mingw + - windows-cygwin + 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 + - toolchain: windows-mingw + os: windows-latest + compiler: mingw + - toolchain: windows-cygwin + os: windows-latest + compiler: cygwin + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 5 + - name: Build libraries with ${{ matrix.compiler }} + run: | + if [ "${{ matrix.compiler }}" == "msvc" ]; then + cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" + cmake --build build --config ${{ matrix.configuration }} + elif [ "${{ matrix.compiler }}" == "mingw" ]; then + cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G "MinGW Makefiles" + cmake --build build + elif [ "${{ matrix.compiler }}" == "cygwin" ]; then + cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G "Unix Makefiles" + cmake --build build + else + cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} + cmake --build build + fi + env: + SRCDIR: ${{ github.workspace }}/Modelica/Resources/BuildProjects/CMake + TESTDIR: ${{ github.workspace }}/.CI/Test + - 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 +131,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 +152,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