@@ -11,42 +11,61 @@ jobs:
1111 name : Lint
1212 runs-on : ubuntu-20.04
1313 steps :
14- - name : Get source
15- uses : actions/checkout@v3
16-
14+ - uses : actions/checkout@v3
1715 - name : Run clang-format
18- uses : XRPLF/clio-gha/ lint@main
16+ uses : ./.github/actions/ lint
1917
2018 build_clio :
2119 name : Build Clio
2220 runs-on : [self-hosted, Linux]
23- steps :
21+ needs : lint
22+ strategy :
23+ fail-fast : false
24+ matrix :
25+ type :
26+ - suffix : deb
27+ image : rippleci/clio-dpkg-builder:2022-09-17
28+ script : dpkg
29+ - suffix : rpm
30+ image : rippleci/clio-rpm-builder:2022-09-17
31+ script : rpm
32+ container :
33+ image : ${{ matrix.type.image }}
2434
25- - name : Clone Clio repo
26- uses : actions/checkout@v3
35+ steps :
36+ - uses : actions/checkout@v3
2737 with :
28- path : clio_src
38+ path : clio
2939
30- - name : Clone Clio CI repo
40+ - name : Clone Clio packaging repo
3141 uses : actions/checkout@v3
3242 with :
33- path : clio_ci
34- repository : ' XRPLF/clio-ci '
43+ path : clio-packages
44+ repository : XRPLF/clio-packages
3545
3646 - name : Build
37- uses : XRPLF/clio-gha/build@main
47+ shell : bash
48+ run : |
49+ export CLIO_ROOT=$(realpath clio)
50+ if [ ${{ matrix.type.suffix }} == "rpm" ]; then
51+ source /opt/rh/devtoolset-11/enable
52+ fi
53+ cmake -S clio-packages -B clio-packages/build -DCLIO_ROOT=$CLIO_ROOT
54+ cmake --build clio-packages/build --parallel $(nproc)
55+ cp ./clio-packages/build/clio-prefix/src/clio-build/clio_tests .
56+ mv ./clio-packages/build/*.${{ matrix.type.suffix }} .
3857
3958 - name : Artifact packages
4059 uses : actions/upload-artifact@v3
4160 with :
42- name : clio_packages
43- path : ${{ github.workspace }}/*.deb
61+ name : clio_${{ matrix.type.suffix }}_packages
62+ path : ${{ github.workspace }}/*.${{ matrix.type.suffix }}
4463
4564 - name : Artifact clio_tests
4665 uses : actions/upload-artifact@v3
4766 with :
48- name : clio_tests
49- path : clio_tests
67+ name : clio_tests-${{ matrix.type.suffix }}
68+ path : ${{ github.workspace }}/ clio_tests
5069
5170 sign :
5271 name : Sign packages
@@ -56,22 +75,34 @@ jobs:
5675 env :
5776 GPG_KEY_B64 : ${{ secrets.GPG_KEY_B64 }}
5877 GPG_KEY_PASS_B64 : ${{ secrets.GPG_KEY_PASS_B64 }}
59-
78+ strategy :
79+ fail-fast : false
80+ matrix :
81+ type :
82+ - suffix : deb
83+ image : ubuntu:20.04
84+ script : dpkg
85+ # - suffix: rpm
86+ # image: centos:7
87+ # script: rpm
88+ container :
89+ image : ${{ matrix.type.image }}
6090 steps :
91+ - uses : actions/checkout@v3
92+ - name : Install dpkg-sig
93+ run : |
94+ apt-get update && apt-get install -y dpkg-sig gnupg
6195 - name : Get package artifact
6296 uses : actions/download-artifact@v3
6397 with :
64- name : clio_packages
98+ name : clio_${{ matrix.type.suffix }}_packages
6599
66100 - name : find packages
67- run : find . -name "*.deb "
101+ run : find . -name "*.${{ matrix.type.suffix }} "
68102
69- - name : Install dpkg-sig
70- run : |
71- sudo apt-get update && sudo apt-get install -y dpkg-sig
103+ - name : Sign packages
104+ uses : ./.github/actions/sign
72105
73- - name : Sign Debian packages
74- uses : XRPLF/clio-gha/sign@main
75106
76107 - name : Verify the signature
77108 run : |
@@ -84,22 +115,28 @@ jobs:
84115 id : shortsha
85116 run : echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
86117
87- - name : Artifact Debian package
118+ - name : Artifact signed packages
88119 uses : actions/upload-artifact@v2
89120 with :
90- name : clio-deb-packages-${{ steps.shortsha.outputs.sha8 }}
121+ name : signed- clio-deb-packages-${{ steps.shortsha.outputs.sha8 }}
91122 path : ${{ github.workspace }}/*.deb
92123
93124 test_clio :
94125 name : Test Clio
95126 runs-on : [self-hosted, Linux]
96127 needs : build_clio
128+ strategy :
129+ fail-fast : false
130+ matrix :
131+ suffix : [rpm, deb]
97132 steps :
133+ - uses : actions/checkout@v3
134+
98135 - name : Get clio_tests artifact
99136 uses : actions/download-artifact@v3
100137 with :
101- name : clio_tests
138+ name : clio_tests-${{ matrix.suffix }}
102139
103140 - name : Run tests
104141 timeout-minutes : 10
105- uses : XRPLF/clio-gha/ test@main
142+ uses : ./.github/actions/ test
0 commit comments