forked from arqma/arqma
-
Notifications
You must be signed in to change notification settings - Fork 3
96 lines (92 loc) · 3.46 KB
/
Copy pathbuild.yml
File metadata and controls
96 lines (92 loc) · 3.46 KB
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
name: ci/gh-actions/build
on:
workflow_dispatch:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
env:
APT_INSTALL: 'sudo apt-get update && sudo apt-get -y install build-essential cmake pkg-config libboost-all-dev libssl-dev libsodium-dev libunwind-dev liblzma-dev libreadline-dev libldns-dev libexpat1-dev libudev-dev libusb-1.0-0-dev libhidapi-dev xsltproc gperf autoconf automake libtool-bin miniupnpc doxygen graphviz libunbound-dev libzmq3-dev libnorm-dev libpgm-dev libprotobuf-dev protobuf-compiler ccache'
USE_DEVICE_TREZOR_MANDATORY: ON
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_DIR: /tmp/.ccache
CCACHE_SETTINGS: |
ccache --max-size=150M
ccache --set-config=compression=true
jobs:
windows:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: ccache
uses: actions/cache@v4
with:
path: /tmp/.ccache
key: ccache-${{ runner.os }}-x86_64-w64-mingw32-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-x86_64-w64-mingw32
- name: depends ccache
uses: actions/cache@v4
with:
path: contrib/depends/built
key: ccache-depends-${{ runner.os }}-x86_64-w64-mingw32-${{ hashFiles('contrib/depends/packages/*') }}
restore-keys: |
ccache-depends-${{ runner.os }}-x86_64-w64-mingw32-${{ hashFiles('contrib/depends/packages/*') }}
ccache-depends-${{ runner.os }}-x86_64-w64-mingw32
- name: install dependencies
run: ${{ env.APT_INSTALL }} g++-mingw-w64-x86-64 zip
- name: prepare toolchain
run: |
sudo update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix)
sudo update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
- name: build
run: |
${{ env.CCACHE_SETTINGS }}
make -j$(nproc) depends target=x86_64-w64-mingw32 buildtag=win-x64
- name: package
run: |
cd ${{ github.workspace }}/build/release/bin
zip -9 ../win-x64.zip morelo*
cd ..
mv win-x64.zip $(sha256sum win-x64.zip | cut -d " " -f 1).zip
- uses: actions/upload-artifact@v4
with:
name: win-x64
path: '${{ github.workspace }}/build/release/*.zip'
compression-level: 0
linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-24.04, ubuntu-22.04 ]
env:
BUILD_NAME: ${{ matrix.os == 'ubuntu-24.04' && 'ubuntu24' || 'ubuntu22' }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: /tmp/.ccache
key: ccache-${{ runner.os }}-${{ matrix.os }}-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-${{ matrix.os }}
- name: install dependencies
run: ${{ env.APT_INSTALL }}
- name: build
run: |
${{ env.CCACHE_SETTINGS }}
make -j$(nproc) release-${{ env.BUILD_NAME }}
- name: package
run: |
cd ${{ github.workspace }}/build/release/bin
tar cJf ../linux-x64-${{ env.BUILD_NAME }}.tar.xz --owner=0 --group=0 morelo*
cd ..
mv linux-x64-${{ env.BUILD_NAME }}.tar.xz $(sha256sum linux-x64-${{ env.BUILD_NAME }}.tar.xz | cut -d " " -f 1).tar.xz
- uses: actions/upload-artifact@v4
with:
name: linux-x64-${{ env.BUILD_NAME }}
path: '${{ github.workspace }}/build/release/*.tar.xz'
compression-level: 0