Skip to content

Commit

Permalink
Merge pull request #9654 from OPM/dev
Browse files Browse the repository at this point in the history
Release 2023.01
  • Loading branch information
magnesj authored Jan 11, 2023
2 parents 1f1cf69 + a2e73d7 commit 10411b9
Show file tree
Hide file tree
Showing 497 changed files with 44,615 additions and 7,620 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/AppFwkUnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,25 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache Qt
id: cache-qt
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/Qt/
key: ${{ runner.os }}-QtCache-5-12-12
uses: actions/checkout@v3

- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: 5.12.12
modules: qtscript
dir: "${{ github.workspace }}/Qt/"
cached: ${{ steps.cache-qt.outputs.cache-hit }}
cache: true

- 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

- name: Build AppFwk with Unit Tests
uses: lukka/run-cmake@v1
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: "${{ github.workspace }}/Fwk/AppFwk/CMakeLists.txt"
cmakeAppendedArgs:
buildDirectory: ${{ github.workspace }}/cmakebuild
buildWithCMakeArgs: "--config Release"
useVcpkgToolchainFile: false
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/ResInsightWithCache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
config:
- {
name: "Windows Latest MSVC",
os: windows-latest,
os: windows-2022,
cc: "cl",
cxx: "cl",
vcpkg-response-file: vcpkg_x64-windows.txt,
Expand All @@ -32,7 +32,7 @@ jobs:
}
- {
name: "Ubuntu Latest gcc",
os: ubuntu-latest,
os: ubuntu-20.04,
cc: "gcc",
cxx: "g++",
vcpkg-response-file: vcpkg_x64-linux.txt,
Expand All @@ -42,7 +42,7 @@ jobs:
}
- {
name: "Ubuntu Latest clang",
os: ubuntu-latest,
os: ubuntu-20.04,
cc: "clang",
cxx: "clang++",
vcpkg-response-file: vcpkg_x64-linux.txt,
Expand All @@ -52,7 +52,7 @@ jobs:
}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true

Expand All @@ -64,11 +64,12 @@ jobs:
run: python -c "import sys; print(sys.version)"

- name: Get Python executable path
shell: bash
id: python-path
run: echo "::set-output name=PYTHON_EXECUTABLE::$(python -c 'import sys; import pathlib; print (pathlib.PurePath(sys.executable).as_posix())')"
run: echo "PYTHON_EXECUTABLE=$(python -c 'import sys; import pathlib; print (pathlib.PurePath(sys.executable).as_posix())')" >> $GITHUB_OUTPUT

- name: Print Python path
run: echo ${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
run: echo "${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}"

- name: Install dependencies
# Make sure protobuf version is compatible with grpc - https://github.com/OPM/ResInsight/issues/9304
Expand Down Expand Up @@ -105,39 +106,35 @@ jobs:
)
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: Get current time
uses: josStorer/[email protected]
id: current-time
with:
format: YYYY-MM-DD

- name: Print time stamp
run: echo "timestamp ${{ steps.current-time.outputs.formattedTime }}"

- name: Cache Buildcache
id: cache-buildcache
uses: actions/cache@v3
with:
path: ${{ env.BUILDCACHE_DIR }}
key: ${{ matrix.config.os }}-${{ matrix.config.cc }}-cache-v02-${{ steps.cache_timestamp_string.outputs.timestamp }}
key: ${{ matrix.config.os }}-${{ matrix.config.cc }}-cache-v02-${{ steps.current-time.outputs.formattedTime }}
- name: Create Folder for buildcache
run: New-Item ${{ env.BUILDCACHE_DIR }} -ItemType "directory" -Force
shell: pwsh
- name: Add buildcache to system path
run: echo "${{github.workspace}}/buildcache/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
shell: pwsh

- name: Cache Qt
id: cache-qt
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/Qt/
key: ${{ matrix.config.os }}-QtCache-5-12-12
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
setup-python: false
version: 5.12.12
modules: qtscript qtcharts
modules: qtscript
dir: "${{ github.workspace }}/Qt/"
cached: ${{ steps.cache-qt.outputs.cache-hit }}
cache: true

- name: Install Linux dependencies
if: "contains( matrix.config.os, 'ubuntu')"
Expand Down
56 changes: 27 additions & 29 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,30 @@ jobs:
clang-format-job:
runs-on: ubuntu-20.04
steps:
- name: Install clang-format 10.0
run: |
sudo apt install clang-format
clang-format --version
- uses: actions/checkout@v2
- name: Check format - ApplicationLibCode
run: |
cd ApplicationLibCode
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
git diff
- name: Check format - ApplicationExeCode
run: |
cd ApplicationExeCode
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
git diff
- name: Check format - AppFwk
run: |
cd Fwk/AppFwk
find -name *.h -o -name *.cpp -o -name *.inl | grep -v gtest | xargs clang-format -i
git diff
- uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Fixes by clang-format'
title: 'Fixes by clang-format'
branch: clang-format-patches
branch-suffix: random


- name: Install clang-format 10.0
run: |
sudo apt install clang-format
clang-format --version
- uses: actions/checkout@v3
- name: Check format - ApplicationLibCode
run: |
cd ApplicationLibCode
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
git diff
- name: Check format - ApplicationExeCode
run: |
cd ApplicationExeCode
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
git diff
- name: Check format - AppFwk
run: |
cd Fwk/AppFwk
find -name *.h -o -name *.cpp -o -name *.inl | grep -v gtest | xargs clang-format -i
git diff
- uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Fixes by clang-format"
title: "Fixes by clang-format"
branch: clang-format-patches
branch-suffix: random
50 changes: 24 additions & 26 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
schedule:
# Once every night
- cron: '0 1 * * * '
- cron: "0 1 * * * "

jobs:
ResInsight-x64-buildcache:
Expand All @@ -13,32 +13,29 @@ jobs:
fail-fast: false
matrix:
config:
- {
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: 'ThirdParty/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: "ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake",
}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Cache Qt
id: cache-qt
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/Qt/
key: ${{ matrix.config.os }}-QtCache-5-12-12

- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: 5.12.12
modules: qtscript qtcharts
dir: '${{ github.workspace }}/Qt/'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
modules: qtscript
dir: "${{ github.workspace }}/Qt/"
cache: true

- 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
Expand All @@ -50,9 +47,10 @@ jobs:
uses: lukka/run-vcpkg@v7
id: runvcpkg
with:
vcpkgArguments: '@${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}'
vcpkgDirectory: '${{ github.workspace }}/ThirdParty/vcpkg'
# Ensure the cache key changes any time the content of the response file changes.
vcpkgArguments: "@${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}"
vcpkgDirectory:
"${{ github.workspace }}/ThirdParty/vcpkg"
# Ensure the cache key changes any time the content of the response file changes.
appendedCacheKey: ${{ hashFiles(env.VCPKGRESPONSEFILE) }}-clang-tidy-v01
- name: Create compile commands and run clang-tidy
# https://clang.llvm.org/extra/doxygen/run-clang-tidy_8py_source.html
Expand Down Expand Up @@ -89,10 +87,10 @@ jobs:
cd ThirdParty/vcpkg
git reset --hard HEAD
git clean -fxd
- uses: peter-evans/create-pull-request@v3
- uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Fixes by clang-tidy'
title: 'Fixes by clang-tidy'
commit-message: "Fixes by clang-tidy"
title: "Fixes by clang-tidy"
branch: clang-tidy-patches
branch-suffix: random
52 changes: 26 additions & 26 deletions .github/workflows/cmake-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ on: [push]

jobs:
cmake-format-job:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Install cmakelang for cmake-format
run: |
python3 -m pip install --user cmakelang
- uses: actions/checkout@v2
- name: Check format - ApplicationLibCode
run: |
~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i CMakeLists.txt
- name: Install cmakelang for cmake-format
run: |
python3 -m pip install --user cmakelang
- uses: actions/checkout@v3
- name: Check format - ApplicationLibCode
run: |
~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i CMakeLists.txt
cd ApplicationLibCode
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
find -name CMake*.cmake | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
cd ..
cd ApplicationLibCode
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
find -name CMake*.cmake | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
cd ..
cd ApplicationExeCode
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
cd ..
cd ApplicationExeCode
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
cd ..
cd Fwk/AppFwk
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
cd ..
cd Fwk/AppFwk
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
cd ..
git diff
- uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Fixes by cmake-format'
title: 'Fixes by cmake-format'
branch: cmake-format-patches
branch-suffix: random
git diff
- uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Fixes by cmake-format"
title: "Fixes by cmake-format"
branch: cmake-format-patches
branch-suffix: random
6 changes: 3 additions & 3 deletions .github/workflows/delete_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Remove old artifacts
on:
schedule:
# Every day at 1am
- cron: '0 1 * * *'
- cron: "0 1 * * *"

jobs:
remove-old-artifacts:
Expand All @@ -12,9 +12,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Remove old artifacts
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/python-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: (Python) Use black to do linting
run: |
pip install black
cd GrpcInterface
black .
- uses: peter-evans/create-pull-request@v3
- uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Python code linting changes detected by black'
title: 'Fixes by black (Python)'
commit-message: "Python code linting changes detected by black"
title: "Fixes by black (Python)"
branch: python-black-patches
branch-suffix: random
base: ${{ github.head_ref }}
Loading

0 comments on commit 10411b9

Please sign in to comment.