mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
Compare commits
3 Commits
ximinez/le
...
Bronek/add
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e172510c4f | ||
|
|
3a2e26c5c0 | ||
|
|
6bd3cc054a |
163
.github/workflows/build-selected-commit.yml
vendored
Normal file
163
.github/workflows/build-selected-commit.yml
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
# This workflow builds the binary from the selected commit (not earlier than 2.5.0 release)
|
||||
name: Build selected commit
|
||||
|
||||
# This workflow can only be triggered manually, by a project maintainer
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit:
|
||||
description: "Commit to build from."
|
||||
required: false
|
||||
type: string
|
||||
build_container:
|
||||
description: "Build container image to use"
|
||||
required: true
|
||||
type: string
|
||||
default: ghcr.io/xrplf/ci/debian-bullseye:gcc-12
|
||||
strip_symbols:
|
||||
description: "Strip debug symbols"
|
||||
required: true
|
||||
type: boolean
|
||||
default: true
|
||||
archive_archive:
|
||||
description: "Archive rippled binary"
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
build_only:
|
||||
description: "Only build, do not run unit tests"
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
build_type:
|
||||
description: "Build type (Debug or Release)"
|
||||
required: true
|
||||
type: choice
|
||||
default: Release
|
||||
options:
|
||||
- Debug
|
||||
- Release
|
||||
cmake_args:
|
||||
description: "CMake args for build"
|
||||
required: true
|
||||
type: string
|
||||
default: "-Dxrpld=ON -Dtests=ON -Dassert=OFF -Dunity=OFF"
|
||||
dependencies_force_build:
|
||||
description: "Force building of all dependencies."
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
CONAN_REMOTE_NAME: xrplf
|
||||
CONAN_REMOTE_URL: https://conan.ripplex.io
|
||||
BUILD_DIR: .build
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ["self-hosted", "Linux", "X64", "heavy"]
|
||||
container: ${{ inputs.build_container }}
|
||||
steps:
|
||||
- name: Checkout this workflow
|
||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.github
|
||||
conan
|
||||
- name: Move workflow files on a side
|
||||
run: |
|
||||
mkdir -p ${{ runner.temp }}
|
||||
mv .github conan ${{ runner.temp }}
|
||||
rm -rf .git
|
||||
- name: Checkout the commit to build
|
||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
with:
|
||||
ref: ${{ inputs.commit }}
|
||||
- name: Restore workflow files
|
||||
run: |
|
||||
rm -rf .github conan
|
||||
mv ${{ runner.temp }}/.github .
|
||||
mv ${{ runner.temp }}/conan .
|
||||
- name: Prepare runner
|
||||
uses: XRPLF/actions/.github/actions/prepare-runner@638e0dc11ea230f91bd26622fb542116bb5254d5
|
||||
with:
|
||||
disable_ccache: true
|
||||
- name: Check configuration
|
||||
run: |
|
||||
echo 'Checking path.'
|
||||
echo ${PATH} | tr ':' '\n'
|
||||
|
||||
echo 'Checking environment variables.'
|
||||
env | sort
|
||||
|
||||
echo 'Checking CMake version.'
|
||||
cmake --version
|
||||
|
||||
echo 'Checking compiler version.'
|
||||
${CC} --version
|
||||
|
||||
echo 'Checking Conan version.'
|
||||
conan --version
|
||||
|
||||
echo 'Checking Ninja version.'
|
||||
ninja --version
|
||||
|
||||
echo 'Checking nproc version.'
|
||||
nproc --version
|
||||
- name: Set up Conan configuration
|
||||
run: |
|
||||
echo 'Installing configuration.'
|
||||
cat conan/global.conf >> $(conan config home)/global.conf
|
||||
|
||||
echo 'Conan configuration:'
|
||||
conan config show '*'
|
||||
- name: Set up Conan profile
|
||||
run: |
|
||||
echo 'Installing profile.'
|
||||
conan config install conan/profiles/default -tf $(conan config home)/profiles/
|
||||
|
||||
echo 'Conan profile:'
|
||||
conan profile show
|
||||
- name: Set up Conan remote
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Adding Conan remote '${{ env.CONAN_REMOTE_NAME }}' at ${{ env.CONAN_REMOTE_URL }}."
|
||||
conan remote add --index 0 --force ${{ env.CONAN_REMOTE_NAME }} ${{ env.CONAN_REMOTE_URL }}
|
||||
|
||||
echo 'Listing Conan remotes.'
|
||||
conan remote list
|
||||
- name: Build dependencies
|
||||
uses: ./.github/actions/build-deps
|
||||
with:
|
||||
build_dir: ${{ env.BUILD_DIR }}
|
||||
build_type: ${{ inputs.build_type }}
|
||||
conan_remote_name: ${{ env.CONAN_REMOTE_NAME }}
|
||||
conan_remote_url: ${{ env.CONAN_REMOTE_URL }}
|
||||
force_build: ${{ inputs.dependencies_force_build }}
|
||||
force_upload: false
|
||||
- name: Build and test binary
|
||||
uses: ./.github/actions/build-test
|
||||
with:
|
||||
build_dir: ${{ env.BUILD_DIR }}
|
||||
build_only: ${{ inputs.build_only }}
|
||||
build_type: ${{ inputs.build_type }}
|
||||
cmake_args: ${{ inputs.cmake_args }}
|
||||
cmake_target: "all"
|
||||
os: "linux"
|
||||
- name: Strip symbols
|
||||
if: ${{ inputs.strip_symbols == 'true' }}
|
||||
run: |
|
||||
strip -D --strip-unneeded ${{ env.BUILD_DIR }}/rippled
|
||||
${{ env.BUILD_DIR }}/rippled --version
|
||||
- name: Move the binary
|
||||
run: |
|
||||
mv ${{ env.BUILD_DIR }}/rippled .
|
||||
- name: Archive rippled binary
|
||||
if: ${{ inputs.archive_archive == 'true' }}
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: rippled
|
||||
path: ./rippled
|
||||
retention-days: 90
|
||||
compression-level: 8
|
||||
overwrite: true
|
||||
Reference in New Issue
Block a user