Make sure cached data is computed #17310
This file contains 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: Application Framework Build with Unit Tests | |
on: [push, pull_request] | |
jobs: | |
ResInsight-x64: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
qtver: [6.5.3] | |
include: | |
- qtver: 6.5.3 | |
build_flags: -DCEE_USE_QT6=ON -DCEE_USE_QT5=OFF | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set apt mirror | |
# see https://github.com/actions/runner-images/issues/7048 | |
if: ${{contains( matrix.os, 'ubuntu') }} | |
run: | | |
# make sure there is a `\t` between URL and `priority:*` attributes | |
printf 'http://azure.archive.ubuntu.com/ubuntu priority:1\n' | sudo tee /etc/apt/mirrors.txt | |
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt | |
sudo sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/mirrors.txt/' /etc/apt/sources.list | |
- name: Install Linux dependencies | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update --option="APT::Acquire::Retries=3" | |
sudo apt-get install --option="APT::Acquire::Retries=3" libxkbcommon-x11-0 libgl1-mesa-dev mesa-common-dev libglfw3-dev libglu1-mesa-dev | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: ${{ matrix.qtver }} | |
dir: "${{ github.workspace }}/Qt/" | |
cache: true | |
cache-key-prefix: ${{ matrix.qtver }}-${{ matrix.os }} | |
- name: Get CMake and Ninja | |
uses: lukka/get-cmake@latest | |
- name: Use MSVC (Windows) | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Configure and build | |
run: | | |
cmake -S Fwk/AppFwk ${{matrix.build_flags}} -B cmakebuild -G Ninja | |
cmake --build cmakebuild | |
- name: Install | |
run: | | |
cd cmakebuild | |
cmake --install . --prefix ${{github.workspace}}/cmakebuild/install | |
- name: Run Unit Tests Qt6 | |
if: matrix.qtver == '6.5.3' | |
shell: bash | |
run: | | |
cmakebuild/install/bin/cafPdmCore_UnitTests | |
cmakebuild/install/bin/cafPdmXml_UnitTests | |
cmakebuild/install/bin/cafProjectDataModel_UnitTests | |
cmakebuild/install/bin/cafPdmScripting_UnitTests | |
- name: Run Unit Tests Windows Qt6 (does not work on Linux) | |
if: (contains( matrix.os, 'windows') && (matrix.qtver == '6.5.3')) | |
shell: bash | |
run: cmakebuild/install/bin/cafUserInterface_UnitTests |