mirror of
https://github.com/ckb-next/ckb-next.git
synced 2026-10-10 12:27:21 -04:00
74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
---
|
|
name: Build
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
Linux:
|
|
name: ${{ matrix.image }} (${{ matrix.compiler }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
image:
|
|
- 'archlinux:latest'
|
|
- 'rockylinux:8'
|
|
- 'rockylinux:9'
|
|
- 'debian:11'
|
|
- 'debian:12'
|
|
- 'fedora:42'
|
|
- 'fedora:41'
|
|
- 'fedora:rawhide'
|
|
- 'ubuntu:22.04'
|
|
- 'ubuntu:24.04'
|
|
- 'ubuntu:rolling'
|
|
- 'alpine:latest'
|
|
build_type:
|
|
- Debug
|
|
compiler:
|
|
- GNU
|
|
fail-fast: false
|
|
container:
|
|
env:
|
|
BUILD_TYPE: ${{ matrix.build_type || 'Debug' }}
|
|
CC: ${{ matrix.compiler == 'LLVM' && 'clang' || 'gcc' }}
|
|
CXX: ${{ matrix.compiler == 'LLVM' && 'clang++' || 'g++' }}
|
|
image: ${{ matrix.image }}
|
|
steps:
|
|
- name: Install `git`
|
|
run: |
|
|
if command -v apt-get &> /dev/null; then
|
|
apt-get --quiet --quiet update && apt-get --quiet --quiet install git
|
|
elif command -v pacman &> /dev/null; then
|
|
pacman --sync --refresh --sysupgrade --noconfirm git
|
|
elif command -v yum &> /dev/null; then
|
|
yum --assumeyes install git
|
|
elif command -v apk &> /dev/null; then
|
|
apk add git bash
|
|
fi
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/dependencies/install
|
|
|
|
- name: Build `ckb-next`
|
|
uses: ./.github/actions/cmake/build
|
|
|
|
- name: Install `ckb-next`
|
|
uses: ./.github/actions/cmake/install
|
|
|
|
- name: Run `ckb-next-daemon --help`
|
|
run: |
|
|
ckb-next-daemon --help
|
|
|
|
- name: Package `ckb-next`
|
|
uses: ./.github/actions/cmake/package
|
|
|
|
- name: Upload `ckb-next` package to workflow artifacts
|
|
uses: ./.github/actions/upload-package
|