Files
monero_c/.gitea/workflows/build.yml
T
Codex a8d16f918c
build / peya x86_64 Linux (push) Successful in 13m19s
build / peya Win64 (push) Successful in 14m47s
consistency / checksum sync (push) Successful in 6s
consistency / Dart bindings sync (push) Failing after 2m18s
Fix monero_c Gitea workflow regressions
2026-04-09 12:29:46 +02:00

106 lines
3.4 KiB
YAML

name: build
run-name: build ${{ inputs.flavor || 'peya' }}
on:
workflow_dispatch:
inputs:
flavor:
description: monero_c flavor to build
required: true
default: peya
type: choice
options:
- peya
- salvium
- monero
push:
branches:
- develop
- main
paths:
- ".gitea/workflows/build.yml"
- "build_single.sh"
- "apply_patches.sh"
- "contrib/depends/**"
- "patches/**"
- "monero_libwallet2_api_c/**"
- "salvium_libwallet2_api_c/**"
- "peya_libwallet2_api_c/**"
- "impls/monero.dart/**"
- "impls/monero.ts/**"
- ".gitmodules"
jobs:
build-libs:
name: ${{ inputs.flavor || 'peya' }} ${{ matrix.target.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- name: x86_64 Linux
host: x86_64-linux-gnu
packages: automake autotools-dev build-essential ca-certificates ccache clang cmake curl git gperf libssl-dev libtool pkg-config python3
- name: Win64
host: x86_64-w64-mingw32
packages: automake autotools-dev build-essential ca-certificates ccache clang cmake curl git libssl-dev libtool pkg-config python3 gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
env:
FLAVOR: ${{ inputs.flavor || 'peya' }}
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
with:
fetch-depth: 1
submodules: false
- name: Configure Gitea auth for private submodules
env:
MONERO_C_GITEA_PAT: ${{ secrets.MONERO_C_GITEA_PAT }}
PEYA_GITEA_PAT: ${{ secrets.PEYA_GITEA_PAT }}
GITEA_PAT: ${{ secrets.GITEA_PAT }}
run: |
set -euo pipefail
AUTH_TOKEN="${MONERO_C_GITEA_PAT:-${PEYA_GITEA_PAT:-${GITEA_PAT:-}}}"
if [ "${FLAVOR}" != "monero" ] && [ -z "${AUTH_TOKEN}" ]; then
echo "Missing Gitea PAT secret for private ${FLAVOR} submodule"
exit 1
fi
if [ -n "${AUTH_TOKEN}" ]; then
git config --global url."http://tiamak:${AUTH_TOKEN}@54.38.205.168:3000/".insteadOf "http://54.38.205.168:3000/"
fi
git submodule sync
git -c protocol.version=2 submodule update --init --force "${FLAVOR}"
git -C "${FLAVOR}" submodule sync --recursive
git -C "${FLAVOR}" -c protocol.version=2 submodule update --init --force --recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.target.packages }}
- name: Prepare MinGW alternatives
if: ${{ matrix.target.host == 'x86_64-w64-mingw32' }}
run: |
sudo update-alternatives --set x86_64-w64-mingw32-g++ "$(which x86_64-w64-mingw32-g++-posix)"
sudo update-alternatives --set x86_64-w64-mingw32-gcc "$(which x86_64-w64-mingw32-gcc-posix)"
- name: Apply patches
run: |
./apply_patches.sh "${FLAVOR}"
- name: Build libraries
run: |
./build_single.sh "${FLAVOR}" "${{ matrix.target.host }}" -j"$(nproc)"
- name: Upload build artifacts
uses: https://github.com/actions/upload-artifact@v3
with:
name: monero-c-${{ env.FLAVOR }}-${{ matrix.target.host }}
path: release/${{ env.FLAVOR }}/${{ matrix.target.host }}_*.xz
if-no-files-found: error