|
7 | 7 | runs-on: ubuntu-latest
|
8 | 8 | steps:
|
9 | 9 | - uses: actions/checkout@v2
|
10 |
| - |
| 10 | + |
11 | 11 |
|
12 | 12 | id: cuda-toolkit
|
13 | 13 | with:
|
14 | 14 | cuda: '11.4.0'
|
15 | 15 | sub-packages: '["nvcc"]'
|
16 | 16 | method: 'network'
|
17 |
| - |
| 17 | + |
18 | 18 | - name: Install dependencies
|
19 | 19 | run: sudo apt-get install -y libuv1-dev
|
20 |
| - |
| 20 | + |
21 | 21 | - name: Build miner
|
22 | 22 | run: make linux-gpu
|
23 |
| - |
| 23 | + |
24 | 24 | - name: Rename miner
|
25 | 25 | run: mv bin/gpu-miner bin/gpu-miner_$(git rev-parse --short "$GITHUB_SHA")
|
26 |
| - |
| 26 | + |
27 | 27 | - uses: actions/upload-artifact@v2
|
28 | 28 | with:
|
29 | 29 | name: linux-binary
|
30 | 30 | path: bin/gpu-miner_*
|
31 |
| - |
| 31 | + |
32 | 32 | build-windows-artifact:
|
33 | 33 | name: build-windows-artifact
|
34 | 34 | runs-on: windows-latest
|
| 35 | + needs: build-linux-artifact |
35 | 36 | steps:
|
36 | 37 | - uses: actions/checkout@v2
|
37 | 38 | with:
|
38 | 39 | submodules: recursive
|
39 |
| - |
| 40 | + |
40 | 41 | - uses: ilammy/msvc-dev-cmd@v1
|
41 | 42 | with:
|
42 | 43 | arch: amd64
|
43 |
| - |
| 44 | + |
44 | 45 |
|
45 | 46 | id: cuda-toolkit
|
46 | 47 | with:
|
47 | 48 | cuda: '11.4.0'
|
48 | 49 | sub-packages: '["nvcc", "cudart"]'
|
49 | 50 | method: 'network'
|
50 |
| - |
| 51 | + |
51 | 52 | - uses: actions/cache@v2
|
52 | 53 | id: cache_libuv
|
53 | 54 | with:
|
54 | 55 | path: libuv/build
|
55 | 56 | key: ${{ runner.os }}-${{ hashFiles('libuv/CMakeLists.txt') }} # Hash based on cmake defs
|
56 |
| - |
| 57 | + |
57 | 58 | - name: Build Libuv
|
58 | 59 | if: steps.cache_libuv.outputs.cache-hit != 'true'
|
59 | 60 | run: |
|
60 | 61 | mkdir libuv/build
|
61 |
| - cd libuv/build |
| 62 | + cd libuv/build |
62 | 63 | cmake .. -DBUILD_TESTING=OFF
|
63 |
| - cmake --build . --config Release |
| 64 | + cmake --build . --config Release |
64 | 65 | cd $GITHUB_WORKSPACE
|
65 |
| - |
| 66 | +
|
66 | 67 | - name: Build Miner
|
67 | 68 | run: |
|
68 | 69 | nvcc --std c++11 -O3 --ptxas-options -v --x cu src/main.cu -Ilibuv/include -Llibuv/build/Release -lmsvcrt -luser32 -liphlpapi -luserenv -lws2_32 -luv_a -o bin/gpu-miner
|
69 |
| - |
| 70 | +
|
70 | 71 | - name: Rename Miner
|
71 | 72 | run: |
|
72 | 73 | $fileName = git rev-parse --short HEAD
|
73 | 74 | cp bin/gpu-miner.exe "bin/gpu-miner_$fileName.exe"
|
74 |
| - |
| 75 | +
|
75 | 76 | - uses: actions/upload-artifact@v2
|
76 | 77 | with:
|
77 | 78 | name: windows-binary
|
78 | 79 | path: bin/gpu-miner_*.exe
|
79 |
| - |
| 80 | + |
80 | 81 | - name: Get linux artifact (Release prep)
|
81 | 82 | if: startsWith(github.ref, 'refs/tags/')
|
82 | 83 | uses: actions/download-artifact@v2
|
83 | 84 | with:
|
84 | 85 | name: linux-binary
|
85 | 86 | path: bin/
|
86 |
| - |
| 87 | + |
87 | 88 | - name: Get the version (Release prep)
|
88 | 89 | if: startsWith(github.ref, 'refs/tags/')
|
89 | 90 | id: get_version
|
90 | 91 | run: |
|
91 | 92 | version=$(echo ${GITHUB_REF/refs\/tags\//} | cut -c 2-)
|
92 | 93 | echo ::set-output name=VERSION::$version
|
93 | 94 | shell: bash
|
94 |
| - |
| 95 | + |
95 | 96 | - name: Generate miners checksums (Release prep)
|
96 | 97 | if: startsWith(github.ref, 'refs/tags/')
|
97 | 98 | run: |
|
|
0 commit comments