-
Notifications
You must be signed in to change notification settings - Fork 134
855 lines (756 loc) · 32.9 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
name: Raptoreum Build
on:
push:
branches:
- master
- develop
- "ft/*"
- "bug/*"
- "release/*"
pull_request:
branches:
- develop
workflow_dispatch:
env:
COIN_NAME: raptoreum
BUILD_DIR: raptoreum-build
COMPRESS_DIR: raptoreum-compress
TEST_DIR: raptoreum-test
jobs:
get-version:
name: Get Version
runs-on: ubuntu-latest
steps:
- name: Triggered By
run: |
echo "checking out $GITHUB_REF triggered by $GITHUB_EVENT_NAME"
- name: Checkout
uses: actions/checkout@v3
- name: Read versions
id: versions
uses: christian-draeger/[email protected]
with:
path: build.properties
properties: "release-version candidate-version snapshot-version"
- name: Choose version
id: selected-version
shell: bash
run: |
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]] || [[ "$GITHUB_REF" == *develop ]] || [[ "$GITHUB_REF" == *ft/* ]] || [[ "$GITHUB_REF" == *bug/* ]]; then
version=${{ steps.versions.outputs.snapshot-version }}
elif [[ "$GITHUB_EVENT_NAME" != "pull_request" ]] && [[ "$GITHUB_REF" == *"release/"* ]]; then
version=${{ steps.versions.outputs.candidate-version }}
elif [[ "$GITHUB_EVENT_NAME" != "pull_request" ]] && [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
version=${{ steps.versions.outputs.release-version }}
fi
echo "version is: [$version]"
echo "version=$version" >> $GITHUB_OUTPUT
echo "BUILD_VERSION=$version" > version.txt
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: version
path: version.txt
outputs:
version: ${{ steps.selected-version.outputs.version }}
build-ubuntu20:
name: Ubuntu 20 Build
needs: get-version
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
sudo apt-get update -y
sudo apt-get install curl build-essential libtool autotools-dev automake pkg-config python3 bsdmainutils cmake -y
- name: Build Depends
run: |
echo "building with $(nproc) threads"
gcc --version
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j$(nproc) HOST=x86_64-pc-linux-gnu
- name: Configure
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu
- name: Build Binaries
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
- name: Build Debug Binaries
run: |
make clean
make distclean
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu --disable-tests --enable-debug
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
mkdir -p ${COMPRESS_DIR}
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu20-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_debug
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu20-debug-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_not_strip
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu20-not_strip-${{ needs.get-version.outputs.version }}.tar.gz *
cd ..
mv *.tar.gz ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-ubuntu20-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu20-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-ubuntu20-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu20-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-ubuntu20-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu20-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
cd ..
cat ${COMPRESS_DIR}/checksums.txt
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu20-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu20-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
test-ubuntu20:
name: Ubuntu 20 Tests
needs: [get-version, build-ubuntu20]
runs-on: ubuntu-20.04
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu20-test-${{ needs.get-version.outputs.version }}
- name: Run Unit Tests
id: Tests
run: |
chmod +x test_raptoreum
./test_raptoreum --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-ubuntu20-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "Ubuntu 20"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"
build-ubuntu22:
name: Ubuntu 22 Build
needs: get-version
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
sudo apt-get update -y
sudo apt-get install curl build-essential libtool autotools-dev automake pkg-config python3 bsdmainutils cmake -y
- name: Build Depends
run: |
echo "building with $(nproc) threads"
gcc --version
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j$(nproc) HOST=x86_64-pc-linux-gnu
- name: Configure
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu
# TODO: @Jami - this line was from malbit, I think we may not need it but could you help confirm?
# CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure
- name: Build Binaries
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
- name: Build Debug Binaries
run: |
make clean
make distclean
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu --disable-tests --enable-debug
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
mkdir -p ${COMPRESS_DIR}
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu22-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_debug
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu22-debug-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_not_strip
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-ubuntu22-not_strip-${{ needs.get-version.outputs.version }}.tar.gz *
cd ..
mv *.tar.gz ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-ubuntu22-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu22-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-ubuntu22-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu22-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-ubuntu22-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-ubuntu22-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
cd ..
cat ${COMPRESS_DIR}/checksums.txt
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu22-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu22-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
test-ubuntu22:
name: Ubuntu 22 Tests
needs: [get-version, build-ubuntu22]
runs-on: ubuntu-22.04
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-ubuntu22-test-${{ needs.get-version.outputs.version }}
- name: Run Unit Tests
id: Tests
run: |
chmod +x test_raptoreum
./test_raptoreum --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-ubuntu22-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "Ubuntu 22"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"
build-macos:
name: macOS 11 Build
needs: get-version
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
brew install automake libtool pkg-config miniupnpc librsvg libnatpmp zeromq python
pip3 install ds_store mac_alias
- name: Build Depends
run: |
echo "building with 8 threads"
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j8 HOST=x86_64-apple-darwin20.6.0
- name: Configure
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/x86_64-apple-darwin20.6.0
- name: Build Binaries
run: |
make -j8
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
- name: Generate Checksum and Compress
run: |
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
openssl sha256 * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-macos-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_not_strip
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
openssl sha256 * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-macos-not_strip-${{ needs.get-version.outputs.version }}.tar.gz *
cd ..
mkdir -p ${COMPRESS_DIR}
mv *.tar.gz ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-macos-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `openssl sha256 ${COIN_NAME}-macos-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-macos-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `openssl sha256 ${COIN_NAME}-macos-not_strip-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
cat checksums.txt
cd ..
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-macos-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-macos-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
- name: Generate Macos dmg files
run: |
make deploy
mkdir -p macos-dmg
mv Raptoreum-Core.dmg macos-dmg/
cd macos-dmg
echo "sha256: `shasum Raptoreum-Core.dmg`" >> checksums.txt
echo "openssl-sha256: `openssl sha256 Raptoreum-Core.dmg`" >> checksums.txt
cd ..
- name: Upload dmg file
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-dmg-${{ needs.get-version.outputs.version }}
path: macos-dmg
test-macos:
name: macOS Tests
needs: [get-version, build-macos]
runs-on: macos-11
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-macos-test-${{ needs.get-version.outputs.version }}
- name: Run Unit Tests
id: Tests
run: |
chmod +x test_raptoreum
./test_raptoreum --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-macos-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "macOS 11"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"
# build-arm-32:
# name: ARM 32-bit Build
# needs: get-version
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Install Required Packages
# run: |
# sudo apt-get update -y
# sudo apt-get upgrade -y
# sudo apt-get install curl build-essential libtool g++-arm-linux-gnueabihf autotools-dev automake pkg-config python3 bsdmainutils cmake
# - name: Build Depends
# run: |
# echo "building with $(nproc) threads"
# make -C depends -j$(nproc) HOST=arm-linux-gnueabihf
# - name: Configure
# run: |
# ./autogen.sh
# ./configure --prefix=`pwd`/depends/arm-linux-gnueabihf
# - name: Build Binaries
# run: |
# make -j$(nproc)
# mkdir -p ${BUILD_DIR} ${TEST_DIR}
# mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
# mv src/test/test_raptoreum ${TEST_DIR}
# - name: Build Debug Binaries
# run: |
# make clean
# make distclean
# ./autogen.sh
# ./configure --prefix=`pwd`/depends/arm-linux-gnueabihf --disable-tests --enable-debug
# make -j$(nproc)
# mkdir -p ${BUILD_DIR}_debug
# mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
# - name: Generate Checksum and Compress
# run: |
# mkdir -p ${COMPRESS_DIR}
# cd ${BUILD_DIR}
# echo "sha256:" >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# shasum * >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# echo "openssl-sha256:" >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# sha256sum * >> checksums.txt
# cat checksums.txt
# tar -cvzf ../${COIN_NAME}-arm32-${{ needs.get-version.outputs.version }}.tar.gz *
# cd ../${BUILD_DIR}_debug
# echo "sha256:" >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# shasum * >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# echo "openssl-sha256:" >> checksums.txt
# echo "------------------------------------" >> checksums.txt
# sha256sum * >> checksums.txt
# cat checksums.txt
# tar -cvzf ../${COIN_NAME}-arm32-debug-${{ needs.get-version.outputs.version }}.tar.gz *
# cd ..
# mv *.tar.gz ${COMPRESS_DIR}/
# cd ${COMPRESS_DIR}
# echo "sha256: `shasum ${COIN_NAME}-arm32-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
# echo "openssl-sha256: `sha256sum ${COIN_NAME}-arm32-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
# echo "sha256: `shasum ${COIN_NAME}-arm32-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
# echo "openssl-sha256: `sha256sum ${COIN_NAME}-arm32-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
# cd ..
# cat ${COMPRESS_DIR}/checksums.txt
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.COIN_NAME }}-arm32-${{ needs.get-version.outputs.version }}
# path: ${{ env.COMPRESS_DIR }}
# - name: Upload Test Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.COIN_NAME }}-arm32-test-${{ needs.get-version.outputs.version }}
# path: ${{ env.TEST_DIR }}
# test-arm-32:
# name: ARM 32-bit Tests
# needs: [ get-version, build-arm-32 ]
# runs-on: ubuntu-20.04
# steps:
# - name: Download Artifacts
# uses: actions/download-artifact@v3
# with:
# name: ${{ env.COIN_NAME }}-arm32-test-${{ needs.get-version.outputs.version }}
# - name: Run Unit Tests
# id: Tests
# uses: nandofw/[email protected]
# with:
# base_image: raspios_lite:latest
# cpu: cortex-a7
# cpu_info: cpuinfo/raspberrypi_3b
# copy_artifact_dest: ${{ github.workspace }}
# copy_artifact_path: unit_test_results.xml
# copy_artifacts_on_fail: yes
# commands: |
# chmod +x test_raptoreum
# ./test_raptoreum --log_format=JUNIT > unit_test_results.xml
# - name: Upload Test Artifacts
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: ${{ env.COIN_NAME }}-arm32-test-${{ needs.get-version.outputs.version }}
# path: unit_test_results.xml
# - name: Publish Unit Test Report
# uses: mikepenz/action-junit-report@v3
# if: always()
# with:
# check_name: "ARM 32-bit"
# detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
# include_passed: false
# report_paths: 'unit_test_results.xml'
build-arm-64:
name: ARM 64-bit Build
needs: get-version
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
sudo apt-get update -y
sudo apt-get install curl build-essential libtool g++-aarch64-linux-gnu autotools-dev automake pkg-config python3 bsdmainutils cmake -y
- name: Build Depends
run: |
echo "building with $(nproc) threads"
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j$(nproc) HOST=aarch64-linux-gnu
- name: Configure
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/aarch64-linux-gnu
- name: Build Binaries
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${TEST_DIR}
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/test/test_raptoreum ${TEST_DIR}/
- name: Build Debug Binaries
run: |
make clean
make distclean
./autogen.sh
./configure --prefix=`pwd`/depends/aarch64-linux-gnu --disable-tests --enable-debug
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
mkdir -p ${COMPRESS_DIR}
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-arm64-${{ needs.get-version.outputs.version }}.tar.gz *
cd ../${BUILD_DIR}_debug
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
tar -cvzf ../${COIN_NAME}-arm64-debug-${{ needs.get-version.outputs.version }}.tar.gz *
cd ..
mv *.tar.gz ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-arm64-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-arm64-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-arm64-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-arm64-debug-${{ needs.get-version.outputs.version }}.tar.gz`" >> checksums.txt
cd ..
cat ${COMPRESS_DIR}/checksums.txt
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-arm64-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-arm64-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
test-arm-64:
name: ARM 64-bit Tests
needs: [get-version, build-arm-64]
runs-on: ubuntu-20.04
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-arm64-test-${{ needs.get-version.outputs.version }}
- name: Run Unit Tests
id: Tests
uses: nandofw/[email protected]
with:
base_image: raspios_lite_arm64:latest
cpu: cortex-a7
copy_artifact_dest: ${{ github.workspace }}
copy_artifact_path: unit_test_results.xml
copy_artifacts_on_fail: yes
commands: |
chmod +x test_raptoreum
./test_raptoreum --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-arm64-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "ARM 64-bit"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"
build-win64:
name: Win64 Build
needs: get-version
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Required Packages
run: |
sudo apt-get update -y
sudo apt-get install curl build-essential libtool autotools-dev automake pkg-config python3 bsdmainutils cmake -y
sudo apt-get install -y g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 nsis
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Build Depends
run: |
echo "building with $(nproc) threads"
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
make -C depends -j$(nproc) HOST=x86_64-w64-mingw32
- name: Configure
run: |
./autogen.sh
export FALLBACK_DOWNLOAD_PATH=https://pool.nowput.org/depends/
./configure --prefix=`pwd`/depends/x86_64-w64-mingw32
# CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure
- name: Build Binaries
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli.exe,raptoreum-tx.exe,raptoreumd.exe,qt/raptoreum-qt.exe} ${BUILD_DIR}/
mv src/{raptoreum-cli.exe,raptoreum-tx.exe,raptoreumd.exe,qt/raptoreum-qt.exe} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum.exe ${TEST_DIR}
strip ${BUILD_DIR}/*
- name: Generate Checksum and Compress
run: |
cd ${BUILD_DIR}
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
zip -r ../${COIN_NAME}-win-${{ needs.get-version.outputs.version }}.zip .
cd ../${BUILD_DIR}_not_strip
echo "sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
shasum * >> checksums.txt
echo "------------------------------------" >> checksums.txt
echo "openssl-sha256:" >> checksums.txt
echo "------------------------------------" >> checksums.txt
sha256sum * >> checksums.txt
cat checksums.txt
zip -r ../${COIN_NAME}-win-not_strip-${{ needs.get-version.outputs.version }}.zip .
cd ..
mkdir -p ${COMPRESS_DIR}
mv *.zip ${COMPRESS_DIR}/
cd ${COMPRESS_DIR}
echo "sha256: `shasum ${COIN_NAME}-win-${{ needs.get-version.outputs.version }}.zip`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-win-${{ needs.get-version.outputs.version }}.zip`" >> checksums.txt
echo "sha256: `shasum ${COIN_NAME}-win-not_strip-${{ needs.get-version.outputs.version }}.zip`" >> checksums.txt
echo "openssl-sha256: `sha256sum ${COIN_NAME}-win-not_strip-${{ needs.get-version.outputs.version }}.zip`" >> checksums.txt
cat checksums.txt
cd ..
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-win-${{ needs.get-version.outputs.version }}
path: ${{ env.COMPRESS_DIR }}
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-win-test-${{ needs.get-version.outputs.version }}
path: ${{ env.TEST_DIR }}
- name: Generate window installation file
run: |
make deploy
mkdir win64-installation
mv *.exe win64-installation/
cd win64-installation
echo "sha256: `shasum *.exe`" >> checksums.txt
echo "openssl-sha25: `sha256sum *.exe`" >> checksums.txt
cd ..
- name: Upload Win64 installation file
uses: actions/upload-artifact@v3
with:
name: ${{ env.COIN_NAME }}-win-installation-${{ needs.get-version.outputs.version }}
path: win64-installation
test-win64:
name: Win64 Tests
needs: [get-version, build-win64]
runs-on: windows-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.COIN_NAME }}-win-test-${{ needs.get-version.outputs.version }}
- name: Check Artifacts
run: |
pwd
dir
- name: Run Unit Tests B
id: Tests
run: |
pwd
dir
.\test_raptoreum.exe --log_format=JUNIT > unit_test_results.xml
- name: Upload Test Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ env.COIN_NAME }}-win-test-${{ needs.get-version.outputs.version }}
path: unit_test_results.xml
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
check_name: "Win64"
detailed_summary: ${{ steps.Tests.conclusion == 'failure'}}
include_passed: false
report_paths: "unit_test_results.xml"