Skip to content

Commit

Permalink
Separate configuration and build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Mar 3, 2024
1 parent 7d7c4f1 commit 78e7b89
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/checkCI.yml
Expand Up @@ -18,14 +18,20 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Build libraries
- name: Configure
run: |
rm -rf Modelica/Resources/Library/*
mkdir -p Modelica/Resources/Library/$LIBDIR
pushd Modelica/Resources/BuildProjects/autotools
git clean -fdx .
./autogen.sh
./configure --libdir="$PWD/../../Library/$LIBDIR" --enable-static --disable-shared --enable-static-zlib --disable-hdf5 CPPFLAGS="-I${GITHUB_WORKSPACE}/.CI/Test"
popd
env:
LIBDIR: linux64
- name: Build
run: |
pushd Modelica/Resources/BuildProjects/autotools
make --output-sync
sudo make install
popd
Expand Down Expand Up @@ -70,21 +76,25 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Build libraries with ${{ matrix.compiler }}
- name: Configure
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DMODELICA_DEBUG_TIME_EVENTS=ON
cmake --build build --config ${{ matrix.configuration }}
elif [ "${{ matrix.compiler }}" == "mingw" ]; then
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DMODELICA_DEBUG_TIME_EVENTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G "MinGW Makefiles"
cmake --build build
else
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DMODELICA_DEBUG_TIME_EVENTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_C_FLAGS="-std=c89 -Wall -Wextra"
cmake --build build
fi
env:
SRCDIR: ${{ github.workspace }}/Modelica/Resources/BuildProjects/CMake
TESTDIR: ${{ github.workspace }}/.CI/Test
- name: Build with ${{ matrix.compiler }}
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake --build build --config ${{ matrix.configuration }}
else
cmake --build build -- -j8
fi
- name: Run tests
run: ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose

Expand Down

0 comments on commit 78e7b89

Please sign in to comment.