Skip to content

Commit

Permalink
Release 2023.06
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Jun 19, 2023
1 parent a7108f0 commit 77bf792
Show file tree
Hide file tree
Showing 1,390 changed files with 66,945 additions and 11,482 deletions.
57 changes: 39 additions & 18 deletions .github/workflows/AppFwkUnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:

- name: Set apt mirror
# see https://github.com/actions/runner-images/issues/7048
if: "contains( matrix.os, 'ubuntu')"
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')"
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
Expand All @@ -35,27 +35,48 @@ jobs:
dir: "${{ github.workspace }}/Qt/"
cache: true

- name: Build AppFwk with Unit Tests
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: "${{ github.workspace }}/Fwk/AppFwk/CMakeLists.txt"
buildDirectory: ${{ github.workspace }}/cmakebuild
buildWithCMakeArgs: "--config Release"
useVcpkgToolchainFile: false
- name: Get CMake and Ninja
uses: lukka/get-cmake@latest

- name: Run Unit Tests Windows
if: contains( matrix.os, 'windows')
shell: bash
- 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: |
cmakebuild/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/Release/cafPdmCore_UnitTests
cmakebuild/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/Release/cafPdmXml_UnitTests
cmakebuild/cafProjectDataModel/cafProjectDataModel_UnitTests/Release/cafProjectDataModel_UnitTests
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 Linux
if: "!contains( matrix.os, 'windows')"
- 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
28 changes: 14 additions & 14 deletions .github/workflows/ResInsightWithCache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
schedule:
# Every day at 1am to make sure we have a build cache for the current date
# build cache is
- cron: "0 1 * * * "
- cron: '0 1 * * *'
env:
BUILD_TYPE: Release
BUILDCACHE_VERSION: 0.27.6
Expand All @@ -33,6 +33,7 @@ jobs:
vcpkg-triplet: x64-windows,
build-python-module: true,
execute-unit-tests: true,
unity-build: true,
}
- {
name: "Ubuntu Latest gcc",
Expand All @@ -43,6 +44,7 @@ jobs:
vcpkg-triplet: x64-linux,
build-python-module: true,
execute-unit-tests: true,
unity-build: false,
}
- {
name: "Ubuntu Latest clang",
Expand All @@ -53,6 +55,7 @@ jobs:
vcpkg-triplet: x64-linux,
build-python-module: true,
execute-unit-tests: true,
unity-build: false,
}
steps:
- name: Checkout
Expand Down Expand Up @@ -134,15 +137,15 @@ jobs:

- name: Set apt mirror
# see https://github.com/actions/runner-images/issues/7048
if: "contains( matrix.config.os, 'ubuntu')"
if: ${{contains( matrix.config.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.config.os, 'ubuntu')"
if: ${{contains( matrix.config.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 libhdf5-dev
Expand All @@ -152,33 +155,27 @@ jobs:
uses: jurplel/install-qt-action@v3
with:
version: 5.12.12
modules: qtscript
dir: "${{ github.workspace }}/Qt/"
cache: true

- name: Set vcpkg's response file path used as part of cache's key.
uses: lukka/set-shell-env@master
with:
VCPKGRESPONSEFILE: ${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}
- name: Restore from cache and install vcpkg
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.
appendedCacheKey: ${{ hashFiles(env.VCPKGRESPONSEFILE) }}-cache-key-v2
appendedCacheKey: ${{ matrix.config.os }}-${{ matrix.config.cxx }}-cache-key-v2

- name: Cache dynamic version of OpenSSL (Linux)
if: "contains( matrix.config.os, 'ubuntu_disabled')"
if: ${{contains( matrix.config.os, 'ubuntu_disabled') }}
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ThirdParty/vcpkg/installed/x64-linux-dynamic
key: ${{ matrix.config.os }}-vcpkg-x64-linux-dynamic_v05

- name: Install dynamic version of OpenSSL (Linux)
if: "contains( matrix.config.os, 'ubuntu')"
if: ${{contains( matrix.config.os, 'ubuntu') }}
run: |
$VCPKG_ROOT/vcpkg install --overlay-triplets=${{ github.workspace }}/ThirdParty/vcpkg-custom-triplets --triplet x64-linux-dynamic openssl
Expand All @@ -197,9 +194,12 @@ jobs:
-D RESINSIGHT_BUNDLE_OPENSSL=true
-D RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true
-D RESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true
-D RESINSIGHT_ENABLE_UNITY_BUILD=${{ matrix.config.unity-build }}
-D RESINSIGHT_ENABLE_GRPC=${{ matrix.config.build-python-module }}
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
-D RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true
-D RESINSIGHT_ENABLE_HDF5=false
-D RESINSIGHT_BUILD_LIBS_FROM_SOURCE=false
-D CMAKE_TOOLCHAIN_FILE=ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake
-G Ninja
RESULT_VARIABLE result
Expand All @@ -222,13 +222,13 @@ jobs:
- name: Stats for buildcache
run: ${{ github.workspace }}/buildcache/bin/buildcache -s
- name: Run Unit Tests
if: "matrix.config.execute-unit-tests == true"
if: matrix.config.execute-unit-tests == 'true'
shell: bash
run: |
cmakebuild/ApplicationExeCode/ResInsight --unittest
- name: Run pytest
if: "matrix.config.build-python-module == true"
if: matrix.config.build-python-module == 'true'
env:
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationExeCode/ResInsight
run: |
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
clang-format-job:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set apt mirror
# GitHub Actions apt proxy is super unstable
Expand All @@ -15,27 +15,28 @@ jobs:
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 clang-format 10.0
- name: Install clang-format 15.0
run: |
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-10
clang-format-10 --version
sudo apt-get update
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-15
clang-format-15 --version
- uses: actions/checkout@v3
- name: Check format - ApplicationLibCode
run: |
cd ApplicationLibCode
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-10 -i
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -i
git diff
- name: Check format - ApplicationExeCode
run: |
cd ApplicationExeCode
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-10 -i
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -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-10 -i
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | grep -v gtest | xargs clang-format-15 -i
git diff
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Fixes by clang-format"
Expand Down
46 changes: 16 additions & 30 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
name: clang-tidy

on:
push:
paths:
- '**.clang-tidy'
workflow_dispatch:
schedule:
# Once every night
- cron: "0 1 * * * "
- cron: "0 1 * * *"

jobs:
ResInsight-x64-buildcache:
runs-on: ${{ matrix.config.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu 20.04",
os: ubuntu-20.04,
name: "Ubuntu 22.04",
os: ubuntu-22.04,
cc: "gcc",
cxx: "g++",
vcpkg-response-file: vcpkg_x64-linux.txt,
Expand All @@ -29,10 +33,11 @@ jobs:
submodules: true

- name: Install Linux dependencies
if: "contains( matrix.config.os, 'ubuntu')"
if: ${{contains( matrix.config.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 libhdf5-dev
sudo apt-get install clang-tidy-15 clang-format-15
- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand All @@ -42,55 +47,36 @@ jobs:
dir: "${{ github.workspace }}/Qt/"
cache: true

- name: Set vcpkg's response file path used as part of cache's key.
uses: lukka/set-shell-env@master
with:
VCPKGRESPONSEFILE: ${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}
- name: Run vcpkg
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.
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
run: |
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=${{ matrix.config.cmake-toolchain }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
sudo apt-get install clang-tidy
cmake -DCMAKE_TOOLCHAIN_FILE=${{ matrix.config.cmake-toolchain }} -DRESINSIGHT_USE_OPENMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
mv compile_commands.json compile_commands_original.json
python ../scripts/fix_json_database.py compile_commands_original.json >> compile_commands.json
- name: clang-tidy on ApplicationLibCode/Application
run: |
cd build
run-clang-tidy -fix files ApplicationLibCode/Application
- name: clang-tidy on ApplicationLibCode/ProjectDataModel
run: |
cd build
run-clang-tidy -fix files ApplicationLibCode/ProjectDataModel
- name: clang-tidy on ApplicationLibCode/ReservoirDataModel
run: |
cd build
run-clang-tidy -fix files ApplicationLibCode/ReservoirDataModel
- name: clang-tidy on ApplicationLibCode/Commands
- name: Run clang-tidy and apply fixes, clang-format after fixes
run: |
cd build
run-clang-tidy -fix files ApplicationLibCode/Commands
- name: clang-tidy on ApplicationLibCode/GeoMech
run-clang-tidy-15 -fix files ApplicationLibCode/Application ApplicationLibCode/ProjectDataModel ApplicationLibCode/ReservoirDataModel ApplicationLibCode/Commands ApplicationLibCode/GeoMech
- name: Run clang-format after clang-tidy
run: |
cd build
run-clang-tidy -fix files ApplicationLibCode/GeoMech
cd build/ApplicationLibCode
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -i
- name: Remove Qt before creating PR
run: |
rm -rf Qt
cd ThirdParty/vcpkg
git reset --hard HEAD
git clean -fxd
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Fixes by clang-tidy"
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/close-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Set label 'PendingRelease' on closed issues
on:
issues:
types:
- closed
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["PendingRelease"]
})
2 changes: 1 addition & 1 deletion .github/workflows/cmake-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
cd ..
git diff
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Fixes by cmake-format"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/python-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: (Python) Use black to do linting
run: |
pip install black
cd GrpcInterface
black .
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Python code linting changes detected by black"
Expand Down

0 comments on commit 77bf792

Please sign in to comment.