mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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
63bc352a2b
commit
c4993b6869
9
.github/workflows/AppFwkUnitTest.yml
vendored
9
.github/workflows/AppFwkUnitTest.yml
vendored
@ -12,6 +12,15 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
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
|
- name: Install Linux dependencies
|
||||||
if: "contains( matrix.os, 'ubuntu')"
|
if: "contains( matrix.os, 'ubuntu')"
|
||||||
run: |
|
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
|
run: echo "${{github.workspace}}/buildcache/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||||
shell: pwsh
|
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
|
- name: Install Linux dependencies
|
||||||
if: "contains( matrix.config.os, 'ubuntu')"
|
if: "contains( matrix.config.os, 'ubuntu')"
|
||||||
run: |
|
run: |
|
||||||
|
19
.github/workflows/clang-format.yml
vendored
19
.github/workflows/clang-format.yml
vendored
@ -6,25 +6,34 @@ jobs:
|
|||||||
clang-format-job:
|
clang-format-job:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
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
|
- name: Install clang-format 10.0
|
||||||
run: |
|
run: |
|
||||||
sudo apt install --option="APT::Acquire::Retries=3" clang-format
|
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-10
|
||||||
clang-format --version
|
clang-format-10 --version
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Check format - ApplicationLibCode
|
- name: Check format - ApplicationLibCode
|
||||||
run: |
|
run: |
|
||||||
cd ApplicationLibCode
|
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
|
git diff
|
||||||
- name: Check format - ApplicationExeCode
|
- name: Check format - ApplicationExeCode
|
||||||
run: |
|
run: |
|
||||||
cd ApplicationExeCode
|
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
|
git diff
|
||||||
- name: Check format - AppFwk
|
- name: Check format - AppFwk
|
||||||
run: |
|
run: |
|
||||||
cd Fwk/AppFwk
|
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
|
git diff
|
||||||
- uses: peter-evans/create-pull-request@v4
|
- uses: peter-evans/create-pull-request@v4
|
||||||
with:
|
with:
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace RiaDefines
|
namespace RiaDefines
|
||||||
{
|
{
|
||||||
QString leakoffPressureDropResultName();
|
QString leakoffPressureDropResultName();
|
||||||
|
@ -117,10 +117,11 @@ public:
|
|||||||
|
|
||||||
int priority() const
|
int priority() const
|
||||||
{
|
{
|
||||||
return type == RigCompletionData::CompletionType::FRACTURE ? 1
|
return type == RigCompletionData::CompletionType::FRACTURE
|
||||||
: type == RigCompletionData::CompletionType::FISHBONES ? 2
|
? 1
|
||||||
: type == RigCompletionData::CompletionType::PERFORATION ? 3
|
: type == RigCompletionData::CompletionType::FISHBONES
|
||||||
: 4;
|
? 2
|
||||||
|
: type == RigCompletionData::CompletionType::PERFORATION ? 3 : 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort by priority, then name, then number
|
// Sort by priority, then name, then number
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <limits>
|
#include <limits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <limits>
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <limits>
|
|
||||||
|
|
||||||
class QwtPlot;
|
class QwtPlot;
|
||||||
class QColor;
|
class QColor;
|
||||||
|
Loading…
Reference in New Issue
Block a user