Compare commits

...

3 Commits

Author SHA1 Message Date
Michael Legleux
0b81a9ae88 upload 2026-02-10 23:50:02 -08:00
Michael Legleux
24ef026fda f 2026-02-10 23:26:38 -08:00
Michael Legleux
7a96d1bd3c build linux 2026-02-10 23:20:49 -08:00
4 changed files with 110 additions and 123 deletions

View File

@@ -50,123 +50,13 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
# Only generate a subset of configurations in PRs.
if not all:
# Debian:
# - Bookworm using GCC 13: Release on linux/amd64, set the reference
# fee to 500.
# - Bookworm using GCC 15: Debug on linux/amd64, enable code
# coverage (which will be done below).
# - Bookworm using Clang 16: Debug on linux/arm64, enable voidstar.
# - Bookworm using Clang 17: Release on linux/amd64, set the
# reference fee to 1000.
# - Bookworm using Clang 20: Debug on linux/amd64.
if os["distro_name"] == "debian":
skip = True
if os["distro_version"] == "bookworm":
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-13"
and build_type == "Release"
and architecture["platform"] == "linux/amd64"
):
cmake_args = f"-DUNIT_TEST_REFERENCE_FEE=500 {cmake_args}"
skip = False
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-15"
and build_type == "Debug"
and architecture["platform"] == "linux/amd64"
):
skip = False
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "clang-16"
and build_type == "Debug"
and architecture["platform"] == "linux/arm64"
):
cmake_args = f"-Dvoidstar=ON {cmake_args}"
skip = False
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "clang-17"
and build_type == "Release"
and architecture["platform"] == "linux/amd64"
):
cmake_args = f"-DUNIT_TEST_REFERENCE_FEE=1000 {cmake_args}"
skip = False
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "clang-20"
and build_type == "Debug"
and architecture["platform"] == "linux/amd64"
):
skip = False
if skip:
continue
# RHEL:
# - 9 using GCC 12: Debug on linux/amd64.
# - 10 using Clang: Release on linux/amd64.
if os["distro_name"] == "rhel":
skip = True
if os["distro_version"] == "9":
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-12"
and build_type == "Debug"
and architecture["platform"] == "linux/amd64"
):
skip = False
elif os["distro_version"] == "10":
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "clang-any"
and build_type == "Release"
and architecture["platform"] == "linux/amd64"
):
skip = False
if skip:
continue
# Ubuntu:
# - Jammy using GCC 12: Debug on linux/arm64.
# - Noble using GCC 14: Release on linux/amd64.
# - Noble using Clang 18: Debug on linux/amd64.
# - Noble using Clang 19: Release on linux/arm64.
if os["distro_name"] == "ubuntu":
skip = True
if os["distro_version"] == "jammy":
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-12"
and build_type == "Debug"
and architecture["platform"] == "linux/arm64"
):
skip = False
elif os["distro_version"] == "noble":
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-14"
and build_type == "Release"
and architecture["platform"] == "linux/amd64"
):
skip = False
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "clang-18"
and build_type == "Debug"
and architecture["platform"] == "linux/amd64"
):
skip = False
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "clang-19"
and build_type == "Release"
and architecture["platform"] == "linux/arm64"
):
skip = False
if skip:
continue
# MacOS:
# - Debug on macos/arm64.
if os["distro_name"] == "macos" and not (
build_type == "Debug" and architecture["platform"] == "macos/arm64"
):
continue
# Windows:
# - Release on windows/amd64.
if os["distro_name"] == "windows" and not (
build_type == "Release" and architecture["platform"] == "windows/amd64"
# TEMPORARY: Only build ubuntu-jammy-gcc-12-debug on amd64
if not (
os["distro_name"] == "ubuntu"
and os["distro_version"] == "jammy"
and f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-12"
and build_type == "Debug"
and architecture["platform"] == "linux/amd64"
):
continue

View File

@@ -6,6 +6,9 @@
name: PR
on:
push:
branches:
- legleux/art_upload
merge_group:
types:
- checks_requested
@@ -91,20 +94,21 @@ jobs:
DRAFT: ${{ github.event.pull_request.draft }}
READY: ${{ contains(github.event.pull_request.labels.*.name, 'Ready to merge') }}
MERGE: ${{ github.event_name == 'merge_group' }}
PUSH: ${{ github.event_name == 'push' }}
run: |
echo "go=${{ (env.DRAFT != 'true' && env.READY == 'true') || env.FILES == 'true' || env.MERGE == 'true' }}" >> "${GITHUB_OUTPUT}"
echo "go=${{ env.PUSH == 'true' || (env.DRAFT != 'true' && env.READY == 'true') || env.FILES == 'true' || env.MERGE == 'true' }}" >> "${GITHUB_OUTPUT}"
cat "${GITHUB_OUTPUT}"
outputs:
go: ${{ steps.go.outputs.go == 'true' }}
check-levelization:
needs: should-run
if: ${{ needs.should-run.outputs.go == 'true' }}
if: false
uses: ./.github/workflows/reusable-check-levelization.yml
check-rename:
needs: should-run
if: ${{ needs.should-run.outputs.go == 'true' }}
if: false
uses: ./.github/workflows/reusable-check-rename.yml
build-test:
@@ -114,7 +118,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [linux, macos, windows]
os: [linux]
with:
# Enable ccache only for events targeting the XRPLF repository, since
# other accounts will not have access to our remote cache storage.
@@ -123,6 +127,18 @@ jobs:
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-artifactory:
needs:
- should-run
- build-test
if: ${{ needs.should-run.outputs.go == 'true' }}
uses: ./.github/workflows/reusable-upload-artifactory.yml
with:
artifactory_repo: generic-local
secrets:
ARTIFACTORY_HOST: ${{ secrets.ARTIFACTORY_HOST }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
upload-recipe:
needs:
- should-run
@@ -154,9 +170,8 @@ jobs:
passed:
if: failure() || cancelled()
needs:
- check-levelization
- check-rename
- build-test
- upload-artifactory
- upload-recipe
- notify-clio
runs-on: ubuntu-latest

View File

@@ -11,6 +11,7 @@ on:
jobs:
# Call the workflow in the XRPLF/actions repo that runs the pre-commit hooks.
run-hooks:
if: false
uses: XRPLF/actions/.github/workflows/pre-commit.yml@320be44621ca2a080f05aeb15817c44b84518108
with:
runs_on: ubuntu-latest

View File

@@ -0,0 +1,81 @@
name: Upload artifacts to Artifactory
on:
workflow_call:
inputs:
artifact_pattern:
description: "Glob pattern to match GitHub artifacts to download."
required: false
type: string
default: "xrpld-*"
artifactory_repo:
description: "Artifactory repository name."
required: false
type: string
default: "xrpl-dev-local"
artifact_prefix:
description: "Top-level directory in Artifactory under which artifacts are stored."
required: false
type: string
default: "xrpld"
secrets:
ARTIFACTORY_HOST:
description: "Artifactory base URL (e.g. https://xrpl.jfrog.io/artifactory)."
required: true
ARTIFACTORY_TOKEN:
description: "Artifactory API token."
required: true
defaults:
run:
shell: bash
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Generate version
id: version
uses: ./.github/actions/generate-version
- name: Download artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: ${{ inputs.artifact_pattern }}
path: artifacts
- name: List downloaded artifacts
run: ls -lR artifacts
- name: Upload to Artifactory
env:
ARTIFACTORY_HOST: ${{ secrets.ARTIFACTORY_HOST }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
REPO: ${{ inputs.artifactory_repo }}
PREFIX: ${{ inputs.artifact_prefix }}
VERSION: ${{ steps.version.outputs.version }}
run: |
for config_dir in artifacts/*/; do
config_name="$(basename "${config_dir}")"
for file in "${config_dir}"*; do
[ -f "${file}" ] || continue
filename="$(basename "${file}")"
url="${ARTIFACTORY_HOST}/${REPO}/${PREFIX}/${VERSION}/${config_name}/${filename}"
echo "Uploading ${file} -> ${url}"
status=$(curl -s -o /dev/null -w "%{http_code}" \
-T "${file}" \
-H "Authorization: Bearer ${ARTIFACTORY_TOKEN}" \
"${url}")
if [[ "${status}" != 2* ]]; then
echo "::error::Upload failed for ${file} with HTTP status ${status}"
exit 1
fi
echo "Upload succeeded (HTTP ${status})"
done
done