mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-05 12:25:51 +00:00
ci: Use XRPLF/prepare_actions (#2473)
This commit is contained in:
61
.github/actions/prepare_runner/action.yml
vendored
61
.github/actions/prepare_runner/action.yml
vendored
@@ -1,61 +0,0 @@
|
||||
name: Prepare runner
|
||||
description: Install packages, set environment variables, create directories
|
||||
|
||||
inputs:
|
||||
disable_ccache:
|
||||
description: Whether ccache should be disabled
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install packages on mac
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Removing unused packages on macOS, which were previously installed"
|
||||
for pkg in bison gh jq llvm@14 pkg-config; do
|
||||
brew uninstall "$pkg" || true
|
||||
done
|
||||
|
||||
brew list
|
||||
|
||||
brew install --quiet \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
clang-build-analyzer \
|
||||
cmake \
|
||||
conan \
|
||||
ninja
|
||||
echo "/opt/homebrew/opt/conan@2/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Fix git permissions on Linux
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
shell: bash
|
||||
run: git config --global --add safe.directory "$PWD"
|
||||
|
||||
- name: Set env variables for macOS
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV
|
||||
echo "CONAN_HOME=${{ github.workspace }}/.conan2" >> $GITHUB_ENV
|
||||
|
||||
- name: Set env variables for Linux
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "CCACHE_DIR=/root/.ccache" >> $GITHUB_ENV
|
||||
echo "CONAN_HOME=/root/.conan2" >> $GITHUB_ENV
|
||||
|
||||
- name: Set CCACHE_DISABLE=1
|
||||
if: ${{ inputs.disable_ccache == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "CCACHE_DISABLE=1" >> $GITHUB_ENV
|
||||
|
||||
- name: Create directories
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "$CCACHE_DIR"
|
||||
mkdir -p "$CONAN_HOME"
|
||||
13
.github/dependabot.yml
vendored
13
.github/dependabot.yml
vendored
@@ -104,19 +104,6 @@ updates:
|
||||
prefix: "ci: [DEPENDABOT] "
|
||||
target-branch: develop
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: .github/actions/prepare_runner/
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "04:00"
|
||||
timezone: Etc/GMT
|
||||
reviewers:
|
||||
- XRPLF/clio-dev-team
|
||||
commit-message:
|
||||
prefix: "ci: [DEPENDABOT] "
|
||||
target-branch: develop
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: .github/actions/restore_cache/
|
||||
schedule:
|
||||
|
||||
2
.github/workflows/build_impl.yml
vendored
2
.github/workflows/build_impl.yml
vendored
@@ -88,7 +88,7 @@ jobs:
|
||||
ref: ${{ github.ref }}
|
||||
|
||||
- name: Prepare runner
|
||||
uses: ./.github/actions/prepare_runner
|
||||
uses: XRPLF/actions/.github/actions/prepare_runner@dabd6e67fd6780379c48eedb83df189626f1158d
|
||||
with:
|
||||
disable_ccache: ${{ inputs.disable_cache }}
|
||||
|
||||
|
||||
2
.github/workflows/check_libxrpl.yml
vendored
2
.github/workflows/check_libxrpl.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare runner
|
||||
uses: ./.github/actions/prepare_runner
|
||||
uses: XRPLF/actions/.github/actions/prepare_runner@dabd6e67fd6780379c48eedb83df189626f1158d
|
||||
with:
|
||||
disable_ccache: true
|
||||
|
||||
|
||||
2
.github/workflows/clang-tidy.yml
vendored
2
.github/workflows/clang-tidy.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare runner
|
||||
uses: ./.github/actions/prepare_runner
|
||||
uses: XRPLF/actions/.github/actions/prepare_runner@dabd6e67fd6780379c48eedb83df189626f1158d
|
||||
with:
|
||||
disable_ccache: true
|
||||
|
||||
|
||||
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
lfs: true
|
||||
|
||||
- name: Prepare runner
|
||||
uses: ./.github/actions/prepare_runner
|
||||
uses: XRPLF/actions/.github/actions/prepare_runner@dabd6e67fd6780379c48eedb83df189626f1158d
|
||||
with:
|
||||
disable_ccache: true
|
||||
|
||||
|
||||
2
.github/workflows/pre-commit.yml
vendored
2
.github/workflows/pre-commit.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare runner
|
||||
uses: ./.github/actions/prepare_runner
|
||||
uses: XRPLF/actions/.github/actions/prepare_runner@dabd6e67fd6780379c48eedb83df189626f1158d
|
||||
with:
|
||||
disable_ccache: true
|
||||
|
||||
|
||||
2
.github/workflows/release_impl.yml
vendored
2
.github/workflows/release_impl.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare runner
|
||||
uses: ./.github/actions/prepare_runner
|
||||
uses: XRPLF/actions/.github/actions/prepare_runner@dabd6e67fd6780379c48eedb83df189626f1158d
|
||||
with:
|
||||
disable_ccache: true
|
||||
|
||||
|
||||
4
.github/workflows/upload_conan_deps.yml
vendored
4
.github/workflows/upload_conan_deps.yml
vendored
@@ -21,7 +21,6 @@ on:
|
||||
- .github/workflows/upload_conan_deps.yml
|
||||
|
||||
- .github/actions/generate/action.yml
|
||||
- .github/actions/prepare_runner/action.yml
|
||||
- ".github/scripts/conan/**"
|
||||
|
||||
- conanfile.py
|
||||
@@ -32,7 +31,6 @@ on:
|
||||
- .github/workflows/upload_conan_deps.yml
|
||||
|
||||
- .github/actions/generate/action.yml
|
||||
- .github/actions/prepare_runner/action.yml
|
||||
- ".github/scripts/conan/**"
|
||||
|
||||
- conanfile.py
|
||||
@@ -73,7 +71,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare runner
|
||||
uses: ./.github/actions/prepare_runner
|
||||
uses: XRPLF/actions/.github/actions/prepare_runner@dabd6e67fd6780379c48eedb83df189626f1158d
|
||||
with:
|
||||
disable_ccache: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user