Files
Peya/.gitea/workflows/build.yml
t1amak f92e2e0151
Some checks failed
build / Cross-Mac aarch64 (push) Successful in 21m23s
build / ARM v8 (push) Successful in 16m30s
build / ARM v7 (push) Failing after 10m15s
build / i686 Linux (push) Failing after 13m4s
build / i686 Win (push) Failing after 8h43m24s
build / RISCV 64bit (push) Failing after 13m5s
build / Cross-Mac x86_64 (push) Successful in 20m3s
build / x86_64 Linux (push) Successful in 14m2s
build / x86_64 Freebsd (push) Failing after 1m24s
build / Win64 (push) Successful in 17m19s
Use artifact action version compatible with Gitea
2026-03-19 00:31:53 +01:00

136 lines
4.5 KiB
YAML

name: build
on:
push:
paths-ignore:
- "docs/**"
- "**/README.md"
pull_request:
paths-ignore:
- "docs/**"
- "**/README.md"
jobs:
build-cross:
name: ${{ matrix.toolchain.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- name: RISCV 64bit
host: riscv64-linux-gnu
packages: python3 gperf g++-riscv64-linux-gnu
package_artifact: false
- name: ARM v7
host: arm-linux-gnueabihf
packages: python3 gperf g++-arm-linux-gnueabihf
package_artifact: false
- name: ARM v8
host: aarch64-linux-gnu
packages: python3 gperf g++-aarch64-linux-gnu
package_artifact: true
- name: i686 Win
host: i686-w64-mingw32
packages: python3 g++-mingw-w64-i686
package_artifact: false
- name: i686 Linux
host: i686-pc-linux-gnu
packages: gperf cmake g++-multilib python3-zmq
package_artifact: false
- name: Win64
host: x86_64-w64-mingw32
packages: cmake python3 g++-mingw-w64-x86-64
package_artifact: true
- name: x86_64 Linux
host: x86_64-linux-gnu
packages: gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev
package_artifact: true
- name: Cross-Mac x86_64
host: x86_64-apple-darwin
packages: cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools-git
package_artifact: true
- name: Cross-Mac aarch64
host: aarch64-apple-darwin
packages: cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools-git
package_artifact: true
- name: x86_64 Freebsd
host: x86_64-unknown-freebsd
packages: clang-8 gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev
package_artifact: false
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
automake \
autotools-dev \
build-essential \
ca-certificates \
ccache \
clang \
cmake \
curl \
git \
libssl-dev \
libtool \
pkg-config \
zip \
${{ matrix.toolchain.packages }}
- name: Prepare MinGW alternatives
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'i686-w64-mingw32' }}
run: |
sudo update-alternatives --set ${{ matrix.toolchain.host }}-g++ "$(which ${{ matrix.toolchain.host }}-g++-posix)"
sudo update-alternatives --set ${{ matrix.toolchain.host }}-gcc "$(which ${{ matrix.toolchain.host }}-gcc-posix)"
- name: Prepare FreeBSD clang aliases
if: ${{ matrix.toolchain.host == 'x86_64-unknown-freebsd' }}
run: |
sudo ln -sf "$(which clang)" /usr/local/bin/clang-8
sudo ln -sf "$(which clang++)" /usr/local/bin/clang++-8
- name: Build
run: |
make depends target=${{ matrix.toolchain.host }} -j"$(nproc)"
- name: Package release archive
if: ${{ matrix.toolchain.package_artifact }}
run: |
REF_NAME="${GITHUB_REF_NAME:-$(git rev-parse --short=9 HEAD)}"
ARCHIVE="/tmp/peya-${REF_NAME}-${{ matrix.toolchain.host }}.zip"
cd "build/${{ matrix.toolchain.host }}/release/bin"
FILES=()
for pattern in peyad* peya-wallet-cli* peya-wallet-rpc* peya-gen-multisig*; do
for file in $pattern; do
if [ -e "$file" ]; then
FILES+=("$file")
fi
done
done
if [ "${#FILES[@]}" -eq 0 ]; then
echo "No release binaries found in $(pwd)"
exit 1
fi
zip -ur "${ARCHIVE}" "${FILES[@]}"
ls -lh "${ARCHIVE}"
- name: Upload build artifact
if: ${{ matrix.toolchain.package_artifact }}
uses: https://github.com/actions/upload-artifact@v3
with:
name: peya-${{ matrix.toolchain.host }}
path: /tmp/peya-*-${{ matrix.toolchain.host }}.zip
if-no-files-found: error