forked from cookiemonstermayhem/tarigpuminer
-
Notifications
You must be signed in to change notification settings - Fork 7
97 lines (86 loc) · 3.3 KB
/
build_binaries.yml
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
---
name: Build Matrix of Binaries
'on':
push:
branches:
- main
- build-*
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
TARI_TARGET_NETWORK: esme
TARI_NETWORK: esme
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
include:
# - platform: 'ubuntu-20.04'
# args: ''
- platform: 'windows-2019'
# args: ''
- platform: 'macos-latest'
# args: '--verbose --target universal-apple-darwin'
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Jimver/[email protected]
if: startsWith(runner.os,'Windows')
with:
method: network
sub-packages: '["nvcc", "cudart"]'
- name: Install dependencies (macOS)
if: startsWith(runner.os,'macOS')
run: |
# openssl, cmake and autoconf already installed
brew install zip coreutils automake protobuf libtool
- name: Install Windows dependencies
if: startsWith(runner.os,'Windows')
run: |
# vcpkg.exe install sqlite3:x64-windows zlib:x64-windows
# Bug in choco - need to install each package individually
choco upgrade llvm -y
choco upgrade protoc -y
- name: build opencl (windows)
if: startsWith(runner.os,'Windows')
run: |
cargo build --release --features "opencl3" --bin xtrgpuminer
- uses: actions/upload-artifact@v4
if: startsWith(runner.os,'Windows')
with:
name: xtr_miner_opencl_windows
path: src/miner/target/release/xtrgpuminer.exe
- name: build cuda (windows)
if: startsWith(runner.os,'Windows')
run: |
cargo build --release --features "nvidia" --bin xtrgpuminer
- uses: actions/upload-artifact@v4
if: startsWith(runner.os,'Windows')
with:
name: xtr_miner_cuda_windows
path: src/miner/target/release/xtrgpuminer.exe
- name: build opencl (macos)
if: startsWith(runner.os,'macOs')
run: |
cargo build --release --features "opencl3" --bin xtrgpuminer
- uses: actions/upload-artifact@v4
if: startsWith(runner.os,'macOs')
with:
name: xtr_miner_opencl_macos
path: src/miner/target/release/xtrgpuminer.exe
create-release:
runs-on: ubuntu-latest
needs: build
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Download binaries
uses: actions/download-artifact@v4
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "xtr_*/**/*"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
draft: true