mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
chore: update deprecated Github Actions (#5241)
This commit is contained in:
96
.github/workflows/clang-format.yml
vendored
96
.github/workflows/clang-format.yml
vendored
@@ -8,52 +8,52 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CLANG_VERSION: 18
|
CLANG_VERSION: 18
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install clang-format
|
- name: Install clang-format
|
||||||
run: |
|
run: |
|
||||||
codename=$( lsb_release --codename --short )
|
codename=$( lsb_release --codename --short )
|
||||||
sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null <<EOF
|
sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null <<EOF
|
||||||
deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
||||||
deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
||||||
EOF
|
EOF
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install clang-format-${CLANG_VERSION}
|
sudo apt-get install clang-format-${CLANG_VERSION}
|
||||||
- name: Format first-party sources
|
- name: Format first-party sources
|
||||||
run: find include src -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format-${CLANG_VERSION} -i {} +
|
run: find include src -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format-${CLANG_VERSION} -i {} +
|
||||||
- name: Check for differences
|
- name: Check for differences
|
||||||
id: assert
|
id: assert
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
git diff --exit-code | tee "clang-format.patch"
|
git diff --exit-code | tee "clang-format.patch"
|
||||||
- name: Upload patch
|
- name: Upload patch
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
if: failure() && steps.assert.outcome == 'failure'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
name: clang-format.patch
|
name: clang-format.patch
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
path: clang-format.patch
|
path: clang-format.patch
|
||||||
- name: What happened?
|
- name: What happened?
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
if: failure() && steps.assert.outcome == 'failure'
|
||||||
env:
|
env:
|
||||||
PREAMBLE: |
|
PREAMBLE: |
|
||||||
If you are reading this, you are looking at a failed Github Actions
|
If you are reading this, you are looking at a failed Github Actions
|
||||||
job. That means you pushed one or more files that did not conform
|
job. That means you pushed one or more files that did not conform
|
||||||
to the formatting specified in .clang-format. That may be because
|
to the formatting specified in .clang-format. That may be because
|
||||||
you neglected to run 'git clang-format' or 'clang-format' before
|
you neglected to run 'git clang-format' or 'clang-format' before
|
||||||
committing, or that your version of clang-format has an
|
committing, or that your version of clang-format has an
|
||||||
incompatibility with the one on this
|
incompatibility with the one on this
|
||||||
machine, which is:
|
machine, which is:
|
||||||
SUGGESTION: |
|
SUGGESTION: |
|
||||||
|
|
||||||
To fix it, you can do one of two things:
|
To fix it, you can do one of two things:
|
||||||
1. Download and apply the patch generated as an artifact of this
|
1. Download and apply the patch generated as an artifact of this
|
||||||
job to your repo, commit, and push.
|
job to your repo, commit, and push.
|
||||||
2. Run 'git-clang-format --extensions cpp,h,hpp,ipp develop'
|
2. Run 'git-clang-format --extensions cpp,h,hpp,ipp develop'
|
||||||
in your repo, commit, and push.
|
in your repo, commit, and push.
|
||||||
run: |
|
run: |
|
||||||
echo "${PREAMBLE}"
|
echo "${PREAMBLE}"
|
||||||
clang-format-${CLANG_VERSION} --version
|
clang-format-${CLANG_VERSION} --version
|
||||||
echo "${SUGGESTION}"
|
echo "${SUGGESTION}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
72
.github/workflows/levelization.yml
vendored
72
.github/workflows/levelization.yml
vendored
@@ -8,42 +8,42 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CLANG_VERSION: 10
|
CLANG_VERSION: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Check levelization
|
- name: Check levelization
|
||||||
run: Builds/levelization/levelization.sh
|
run: Builds/levelization/levelization.sh
|
||||||
- name: Check for differences
|
- name: Check for differences
|
||||||
id: assert
|
id: assert
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
git diff --exit-code | tee "levelization.patch"
|
git diff --exit-code | tee "levelization.patch"
|
||||||
- name: Upload patch
|
- name: Upload patch
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
if: failure() && steps.assert.outcome == 'failure'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
name: levelization.patch
|
name: levelization.patch
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
path: levelization.patch
|
path: levelization.patch
|
||||||
- name: What happened?
|
- name: What happened?
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
if: failure() && steps.assert.outcome == 'failure'
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
If you are reading this, you are looking at a failed Github
|
If you are reading this, you are looking at a failed Github
|
||||||
Actions job. That means you changed the dependency relationships
|
Actions job. That means you changed the dependency relationships
|
||||||
between the modules in rippled. That may be an improvement or a
|
between the modules in rippled. That may be an improvement or a
|
||||||
regression. This check doesn't judge.
|
regression. This check doesn't judge.
|
||||||
|
|
||||||
A rule of thumb, though, is that if your changes caused
|
A rule of thumb, though, is that if your changes caused
|
||||||
something to be removed from loops.txt, that's probably an
|
something to be removed from loops.txt, that's probably an
|
||||||
improvement. If something was added, it's probably a regression.
|
improvement. If something was added, it's probably a regression.
|
||||||
|
|
||||||
To fix it, you can do one of two things:
|
To fix it, you can do one of two things:
|
||||||
1. Download and apply the patch generated as an artifact of this
|
1. Download and apply the patch generated as an artifact of this
|
||||||
job to your repo, commit, and push.
|
job to your repo, commit, and push.
|
||||||
2. Run './Builds/levelization/levelization.sh' in your repo,
|
2. Run './Builds/levelization/levelization.sh' in your repo,
|
||||||
commit, and push.
|
commit, and push.
|
||||||
|
|
||||||
See Builds/levelization/README.md for more info.
|
See Builds/levelization/README.md for more info.
|
||||||
run: |
|
run: |
|
||||||
echo "${MESSAGE}"
|
echo "${MESSAGE}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
15
.github/workflows/nix.yml
vendored
15
.github/workflows/nix.yml
vendored
@@ -10,7 +10,7 @@ on:
|
|||||||
- release
|
- release
|
||||||
- master
|
- master
|
||||||
# Branches that opt-in to running
|
# Branches that opt-in to running
|
||||||
- 'ci/**'
|
- "ci/**"
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -35,7 +35,6 @@ concurrency:
|
|||||||
# and builds and tests rippled.
|
# and builds and tests rippled.
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -97,13 +96,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
- name: upload archive
|
- name: upload archive
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||||
path: conan.tar
|
path: conan.tar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -129,7 +127,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pip install --upgrade "conan<2"
|
pip install --upgrade "conan<2"
|
||||||
- name: download cache
|
- name: download cache
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||||
- name: extract cache
|
- name: extract cache
|
||||||
@@ -160,7 +158,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
||||||
|
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -181,7 +178,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pip install --upgrade "conan<2"
|
pip install --upgrade "conan<2"
|
||||||
- name: download cache
|
- name: download cache
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||||
- name: extract cache
|
- name: extract cache
|
||||||
@@ -223,7 +220,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mv "${build_dir}/coverage.xml" ./
|
mv "${build_dir}/coverage.xml" ./
|
||||||
- name: archive coverage report
|
- name: archive coverage report
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coverage.xml
|
name: coverage.xml
|
||||||
path: coverage.xml
|
path: coverage.xml
|
||||||
@@ -254,7 +251,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pip install --upgrade "conan<2"
|
pip install --upgrade "conan<2"
|
||||||
- name: download cache
|
- name: download cache
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux-gcc-${{ env.configuration }}
|
name: linux-gcc-${{ env.configuration }}
|
||||||
- name: extract cache
|
- name: extract cache
|
||||||
|
|||||||
Reference in New Issue
Block a user