mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
GitHub Actions: Add apt mirror to make package download more robust
- Download of Ubuntu packages from Azure is unstable. Add mirror sites to improve reliability. - Improve use of clang-format and include source code changes
This commit is contained in:
parent
527be5f644
commit
8028444018
9
.github/workflows/AppFwkUnitTest.yml
vendored
9
.github/workflows/AppFwkUnitTest.yml
vendored
@ -12,6 +12,15 @@ jobs:
|
||||
- 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: |
|
||||
|
9
.github/workflows/ResInsightWithCache.yml
vendored
9
.github/workflows/ResInsightWithCache.yml
vendored
@ -132,6 +132,15 @@ jobs:
|
||||
run: echo "${{github.workspace}}/buildcache/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||
shell: pwsh
|
||||
|
||||
- name: Set apt mirror
|
||||
# see https://github.com/actions/runner-images/issues/7048
|
||||
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')"
|
||||
run: |
|
||||
|
19
.github/workflows/clang-format.yml
vendored
19
.github/workflows/clang-format.yml
vendored
@ -6,25 +6,34 @@ jobs:
|
||||
clang-format-job:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Set apt mirror
|
||||
# GitHub Actions apt proxy is super unstable
|
||||
# see https://github.com/actions/runner-images/issues/7048
|
||||
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 clang-format 10.0
|
||||
run: |
|
||||
sudo apt install --option="APT::Acquire::Retries=3" clang-format
|
||||
clang-format --version
|
||||
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-10
|
||||
clang-format-10 --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
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-10 -i
|
||||
git diff
|
||||
- name: Check format - ApplicationExeCode
|
||||
run: |
|
||||
cd ApplicationExeCode
|
||||
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-10 -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
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | grep -v gtest | xargs clang-format-10 -i
|
||||
git diff
|
||||
- uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
||||
|
||||
namespace RiaDefines
|
||||
{
|
||||
QString leakoffPressureDropResultName();
|
||||
|
@ -30,9 +30,9 @@ class RicMswSegmentCellIntersection
|
||||
{
|
||||
public:
|
||||
RicMswSegmentCellIntersection( const QString& gridName, // Pass in empty string for main grid
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3st& gridLocalCellIJK,
|
||||
const cvf::Vec3d& lengthsInCell );
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3st& gridLocalCellIJK,
|
||||
const cvf::Vec3d& lengthsInCell );
|
||||
const QString& gridName() const;
|
||||
size_t globalCellIndex() const;
|
||||
cvf::Vec3st gridLocalCellIJK() const;
|
||||
|
@ -117,10 +117,11 @@ public:
|
||||
|
||||
int priority() const
|
||||
{
|
||||
return type == RigCompletionData::CompletionType::FRACTURE ? 1
|
||||
: type == RigCompletionData::CompletionType::FISHBONES ? 2
|
||||
: type == RigCompletionData::CompletionType::PERFORATION ? 3
|
||||
: 4;
|
||||
return type == RigCompletionData::CompletionType::FRACTURE
|
||||
? 1
|
||||
: type == RigCompletionData::CompletionType::FISHBONES
|
||||
? 2
|
||||
: type == RigCompletionData::CompletionType::PERFORATION ? 3 : 4;
|
||||
}
|
||||
|
||||
// Sort by priority, then name, then number
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
@ -71,7 +71,7 @@ protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
protected:
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void initAfterRead() override;
|
||||
void initAfterRead() override;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_isActive;
|
||||
|
@ -62,9 +62,9 @@ inline Opm::FlowDiagnostics::ConnectionValues
|
||||
{
|
||||
using ConnVals = Opm::FlowDiagnostics::ConnectionValues;
|
||||
|
||||
auto flux = ConnVals( ConnVals::NumConnections{G.numConnections()}, ConnVals::NumPhases{actPh.size()} );
|
||||
auto flux = ConnVals( ConnVals::NumConnections{ G.numConnections() }, ConnVals::NumPhases{ actPh.size() } );
|
||||
|
||||
auto phas = ConnVals::PhaseID{0};
|
||||
auto phas = ConnVals::PhaseID{ 0 };
|
||||
|
||||
for ( const auto& p : actPh )
|
||||
{
|
||||
@ -74,7 +74,7 @@ inline Opm::FlowDiagnostics::ConnectionValues
|
||||
{
|
||||
assert( pflux.size() == flux.numConnections() );
|
||||
|
||||
auto conn = ConnVals::ConnID{0};
|
||||
auto conn = ConnVals::ConnID{ 0 };
|
||||
for ( const auto& v : pflux )
|
||||
{
|
||||
flux( conn, phas ) = v;
|
||||
|
@ -22,9 +22,9 @@
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <limits>
|
||||
|
||||
class QwtPlot;
|
||||
class QColor;
|
||||
|
Loading…
Reference in New Issue
Block a user