mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
106 lines
2.5 KiB
YAML
106 lines
2.5 KiB
YAML
name: Build Clio
|
|
on:
|
|
push:
|
|
branches: [master, release, develop, develop-next]
|
|
pull_request:
|
|
branches: [master, release, develop, develop-next]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Get source
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run clang-format
|
|
uses: XRPLF/clio-gha/lint@main
|
|
|
|
build_clio:
|
|
name: Build Clio
|
|
runs-on: [self-hosted, Linux]
|
|
steps:
|
|
|
|
- name: Clone Clio repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: clio_src
|
|
|
|
- name: Clone Clio CI repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: clio_ci
|
|
repository: 'XRPLF/clio-ci'
|
|
|
|
- name: Build
|
|
uses: XRPLF/clio-gha/build@main
|
|
|
|
- name: Artifact packages
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: clio_packages
|
|
path: ${{ github.workspace }}/*.deb
|
|
|
|
- name: Artifact clio_tests
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: clio_tests
|
|
path: clio_tests
|
|
|
|
sign:
|
|
name: Sign packages
|
|
needs: build_clio
|
|
runs-on: ubuntu-20.04
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release' || github.ref == 'refs/heads/develop'
|
|
env:
|
|
GPG_KEY_B64: ${{ secrets.GPG_KEY_B64 }}
|
|
GPG_KEY_PASS_B64: ${{ secrets.GPG_KEY_PASS_B64 }}
|
|
|
|
steps:
|
|
- name: Get package artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: clio_packages
|
|
|
|
- name: find packages
|
|
run: find . -name "*.deb"
|
|
|
|
- name: Install dpkg-sig
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -y dpkg-sig
|
|
|
|
- name: Sign Debian packages
|
|
uses: XRPLF/clio-gha/sign@main
|
|
|
|
- name: Verify the signature
|
|
run: |
|
|
set -e
|
|
for PKG in $(ls *.deb); do
|
|
gpg --verify "${PKG}"
|
|
done
|
|
|
|
- name: Get short SHA
|
|
id: shortsha
|
|
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
|
|
|
- name: Artifact Debian package
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: clio-deb-packages-${{ steps.shortsha.outputs.sha8 }}
|
|
path: ${{ github.workspace }}/*.deb
|
|
|
|
test_clio:
|
|
name: Test Clio
|
|
runs-on: [self-hosted, Linux]
|
|
needs: build_clio
|
|
steps:
|
|
- name: Get clio_tests artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: clio_tests
|
|
|
|
- name: Run tests
|
|
timeout-minutes: 10
|
|
uses: XRPLF/clio-gha/test@main
|