mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
f4dd1d363d
Add missing RESINSIGHT_ prefix to cmake options GHA: Fix warnings
83 lines
2.8 KiB
YAML
83 lines
2.8 KiB
YAML
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]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- 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@v3
|
|
with:
|
|
version: 5.12.12
|
|
modules: qtscript
|
|
dir: "${{ github.workspace }}/Qt/"
|
|
cache: true
|
|
|
|
- name: Get CMake and Ninja
|
|
uses: lukka/get-cmake@latest
|
|
|
|
- name: Use MSVC (Windows)
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Configure
|
|
shell: cmake -P {0}
|
|
run: |
|
|
execute_process(
|
|
COMMAND cmake
|
|
-S Fwk/AppFwk
|
|
-B cmakebuild
|
|
-G Ninja
|
|
RESULT_VARIABLE result
|
|
)
|
|
if (NOT result EQUAL 0)
|
|
message(FATAL_ERROR "Bad exit status")
|
|
endif()
|
|
|
|
- name: Build
|
|
shell: cmake -P {0}
|
|
run: |
|
|
set(ENV{NINJA_STATUS} "[%f/%t %o/sec] ")
|
|
execute_process(
|
|
COMMAND cmake --build cmakebuild
|
|
RESULT_VARIABLE result
|
|
)
|
|
if (NOT result EQUAL 0)
|
|
message(FATAL_ERROR "Bad exit status")
|
|
endif()
|
|
|
|
- name: Run Unit Tests
|
|
shell: bash
|
|
run: |
|
|
cmakebuild/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCore_UnitTests
|
|
cmakebuild/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXml_UnitTests
|
|
cmakebuild/cafProjectDataModel/cafProjectDataModel_UnitTests/cafProjectDataModel_UnitTests
|
|
cmakebuild/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScripting_UnitTests
|
|
|
|
- name: Run Unit Tests Windows (does not work on Linux)
|
|
if: contains( matrix.os, 'windows')
|
|
shell: bash
|
|
run: |
|
|
cmakebuild/cafUserInterface/cafUserInterface_UnitTests/cafUserInterface_UnitTests
|