Skip to content

Commit

Permalink
Merge pull request #6812 from OPM/dev
Browse files Browse the repository at this point in the history
Release 2020.10.0
  • Loading branch information
magnesj authored Oct 20, 2020
2 parents 52e9f54 + 6de240a commit 9f05d73
Show file tree
Hide file tree
Showing 3,938 changed files with 419,240 additions and 482,243 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 11 additions & 6 deletions .github/workflows/main.yml → .github/disabled-workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: ResInsight Build
name: ResInsight Build and Package

on: [push, pull_request]
on:
push:
branches:
- master
- dev
pull_request:
jobs:
ResInsight-x64:
runs-on: ${{ matrix.os }}
Expand All @@ -15,7 +20,7 @@ jobs:
vcpkg-response-file: vcpkg_x64-linux.txt
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Qt
Expand All @@ -37,7 +42,7 @@ jobs:
pip install pytest
- name: Install Linux dependencies
if: "contains( matrix.os, 'ubuntu')"
run: sudo apt-get install libxkbcommon-x11-0 libgl1-mesa-dev mesa-common-dev libglfw3-dev libglu1-mesa-dev
run: sudo apt-get install libxkbcommon-x11-0 libgl1-mesa-dev mesa-common-dev libglfw3-dev libglu1-mesa-dev libhdf5-dev
- name: Cache vcpkg artifacts
uses: actions/cache@v1
with:
Expand All @@ -54,7 +59,7 @@ jobs:
uses: lukka/run-cmake@v1
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeAppendedArgs: '-DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DRESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true'
cmakeAppendedArgs: '-DGSL_ENABLE=true -DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DRESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true -DRESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true'
buildDirectory: ${{ github.workspace }}/cmakebuild
buildWithCMakeArgs: '--config Release --target package'
useVcpkgToolchainFile: true
Expand Down Expand Up @@ -87,4 +92,4 @@ jobs:
path: ${{ runner.workspace }}/ResInsight/cmakebuild/packages




7 changes: 4 additions & 3 deletions .github/workflows/AppFwkUnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ../Qt
path: ${{ github.workspace }}/Qt/
key: ${{ runner.os }}-QtCache
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: 5.9.9
modules: qtscript
dir: '${{ github.workspace }}/Qt/'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Install Linux dependencies
if: "contains( matrix.os, 'ubuntu')"
Expand Down
226 changes: 226 additions & 0 deletions .github/workflows/ResInsightWithCache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
name: ResInsight Build With Cache

on:
push:
schedule:
# Every day at 1am to make sure we have a build cache for the current date
# build cache is
- cron: '0 1 * * * '
env:
NINJA_VERSION: 1.9.0
BUILD_TYPE: Release
BUILDCACHE_VERSION: 0.18.0
BUILDCACHE_DIR: ${{ github.workspace }}/buildcache_dir

jobs:
ResInsight-x64-buildcache:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest MSVC",
os: windows-latest,
cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
vcpkg-response-file: vcpkg_x64-windows.txt,
vcpkg-triplet: x64-windows,
cmake-toolchain: 'vcpkg/scripts/buildsystems/vcpkg.cmake'
}
- {
name: "Ubuntu Latest GCC",
os: ubuntu-latest,
cc: "gcc", cxx: "g++",
vcpkg-response-file: vcpkg_x64-linux.txt,
vcpkg-triplet: x64-linux,
cmake-toolchain: 'vcpkg/scripts/buildsystems/vcpkg.cmake'
}
- {
name: "Ubuntu 20.04",
os: ubuntu-20.04,
cc: "gcc", cxx: "g++",
vcpkg-response-file: vcpkg_x64-linux.txt,
vcpkg-triplet: x64-linux,
cmake-toolchain: 'vcpkg/scripts/buildsystems/vcpkg.cmake'
}
- {
name: "Ubuntu 20.04 clang",
os: ubuntu-20.04,
cc: "clang", cxx: "clang++",
vcpkg-response-file: vcpkg_x64-linux.txt,
vcpkg-triplet: x64-linux,
cmake-toolchain: 'vcpkg/scripts/buildsystems/vcpkg.cmake'
}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Download Ninja
uses: seanmiddleditch/gha-setup-ninja@master
with:
version: ${{ env.NINJA_VERSION }}
- name: Download buildcache
id: buildcache-download
shell: cmake -P {0}
run: |
if ("${{ runner.os }}" STREQUAL "Windows")
set(buildcache_suffix "win-msvc.zip")
elseif ("${{ runner.os }}" STREQUAL "Linux")
set(buildcache_suffix "linux.zip")
endif()
set(buildcache_version $ENV{BUILDCACHE_VERSION})
set(buildcache_url "https://github.com/mbitsnbites/buildcache/releases/download/v${buildcache_version}/buildcache-${buildcache_suffix}")
file(DOWNLOAD "${buildcache_url}" ./buildcache.zip)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./buildcache.zip)
if (NOT "${{ runner.os }}" STREQUAL "Windows")
execute_process(
COMMAND chmod +x bin/buildcache
)
endif()
- name: Prepare cache timestamp
id: cache_timestamp_string
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Cache Buildcache
id: cache-buildcache
uses: actions/cache@v2
with:
path: ${{ env.BUILDCACHE_DIR }}
key: ${{ matrix.config.name }}-cache-v02-${{ steps.cache_timestamp_string.outputs.timestamp }}
- name: Create Folder for buildcache
run: New-Item ${{ env.BUILDCACHE_DIR }} -ItemType "directory" -Force
shell: pwsh
- name: Add buildcache to system path
run: echo "::add-path::${{ github.workspace }}/bin"

- name: Cache Qt
id: cache-qt
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/Qt/
key: ${{ matrix.config.os }}-QtCache-v02
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: 5.9.9
modules: qtscript
dir: '${{ github.workspace }}/Qt/'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install grpcio-tools
pip install pytest
- name: Install Linux dependencies
if: "contains( matrix.config.os, 'ubuntu')"
run: sudo apt-get install libxkbcommon-x11-0 libgl1-mesa-dev mesa-common-dev libglfw3-dev libglu1-mesa-dev libhdf5-dev
- name: Cache vcpkg artifacts
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/vcpkg/
# Ensure the cache is invalidated any time vcpkg version changes, or a different set of packages is being used.
key: ${{ hashFiles( format('{0}/{1}', github.workspace, matrix.config.vcpkg-response-file )) }}-${{ hashFiles('.git/modules/vcpkg/HEAD') }}-${{ runner.os }}-v02
- name: Run vcpkg
uses: lukka/run-vcpkg@v1
id: runvcpkg
with:
vcpkgArguments: '@${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}'
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
- name: Configure
shell: cmake -P {0}
run: |
set(ENV{CC} ${{ matrix.config.cc }})
set(ENV{CXX} ${{ matrix.config.cxx }})
if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x")
execute_process(
COMMAND "${{ matrix.config.environment_script }}" && set
OUTPUT_FILE environment_script_output.txt
)
file(STRINGS environment_script_output.txt output_lines)
foreach(line IN LISTS output_lines)
if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$")
set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}")
endif()
endforeach()
endif()
set(path_separator ":")
if ("${{ runner.os }}" STREQUAL "Windows")
set(path_separator ";")
endif()
set(ENV{PATH} "$ENV{GITHUB_WORKSPACE}${path_separator}$ENV{PATH}")
execute_process(
COMMAND cmake
-S .
-B cmakebuild
-D CMAKE_BUILD_TYPE=$ENV{BUILD_TYPE}
-D CMAKE_INSTALL_PREFIX=cmakebuild/install
-D GSL_ENABLE=true
-D RESINSIGHT_ENABLE_UNITY_BUILD=true
-D RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true
-D RESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true
-D RESINSIGHT_ENABLE_GRPC=true
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=python
-D VCPKG_TARGET_TRIPLET=${{ matrix.config.vcpkg-triplet }}
-D CMAKE_TOOLCHAIN_FILE=${{ matrix.config.cmake-toolchain }}
-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] ")
if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x")
file(STRINGS environment_script_output.txt output_lines)
foreach(line IN LISTS output_lines)
if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$")
set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}")
endif()
endforeach()
endif()
set(path_separator ":")
if ("${{ runner.os }}" STREQUAL "Windows")
set(path_separator ";")
endif()
execute_process(
COMMAND cmake --build cmakebuild --target install
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "Bad exit status")
endif()
- name: Stats for buildcache
run: ${{ github.workspace }}/bin/buildcache -s

- name: (Windows) Run Unit Tests
if: contains( matrix.config.os, 'windows')
shell: bash
run: |
cmakebuild/ApplicationCode/ResInsight --unittest
- name: (Linux) Run Unit Tests
if: "!contains( matrix.config.os, 'windows')"
shell: bash
run: |
cmakebuild/ApplicationCode/ResInsight --unittest
- name: Run pytest
if: contains( matrix.config.os, 'windows')
env:
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationCode/ResInsight.exe
run: |
cd ApplicationCode/GrpcInterface/Python/rips
pytest --console
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ResInsight-${{ matrix.config.name }}
path: ${{ runner.workspace }}/ResInsight/cmakebuild/install
82 changes: 82 additions & 0 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: centOS 7 (without geomech)

on:
workflow_dispatch:
schedule:
# Once every night
- cron: '0 1 * * * '
jobs:
build_on_centos7:
runs-on: ubuntu-latest
container:
image: centos:7
steps:
- name: Intall Dependencies
run: |
yum install -y centos-release-scl
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install -y https://repo.ius.io/ius-release-el7.rpm
yum install -y git222
yum install -y qt5-qtbase
yum install -y qt5-qtbase-devel
yum install -y qt5-qtscript-devel
yum install -y qt5-qtsvg-devel
yum install -y cmake3
yum install -y make
yum install -y mesa-libGL-devel
yum install -y freeglut-devel
yum install -y devtoolset-7
yum install -y rh-python36
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Build ResInsight
run: |
source /opt/rh/devtoolset-7/enable
source /opt/rh/rh-python36/enable
cmake3 --version
git --version
g++ --version
python --version
python -m pip install --upgrade pip
python -m pip install grpcio-tools
vcpkg/bootstrap-vcpkg.sh
vcpkg/vcpkg install grpc
mkdir cmakebuild
cd cmakebuild
cmake3 \
-DRESINSIGHT_QT5_BUNDLE_LIBRARIES=ON \
-DRESINSIGHT_ENABLE_GRPC=true \
-DRESINSIGHT_ENABLE_UNITY_BUILD=true \
-DVCPKG_TARGET_TRIPLET=x64-linux \
-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake \
-DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python \
..
make -j8
make package
rm -rf packages/_CPack_Packages
# Show file structure
pwd
ls
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ResInsight
path: ./cmakebuild/packages
Loading

0 comments on commit 9f05d73

Please sign in to comment.