Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 04ba308

Browse files
authored
produce jobs at minimum rate (#20)
* produce jobs at minimum rate * set default thread count to 2 * update build * add related resources to README.md * make rate configurable * update README.md * version 0.5 * update some default values
1 parent 85b9f78 commit 04ba308

File tree

11 files changed

+271
-141
lines changed

11 files changed

+271
-141
lines changed

.github/workflows/build-application.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Build and publish application binaries
33
on: [push]
44

55
jobs:
6-
76

87
# ########################################################################## #
98
build:
@@ -12,9 +11,9 @@ jobs:
1211
strategy:
1312
fail-fast: false
1413
matrix:
15-
ghc: ['8.8.4', '8.10.7', '9.0.1']
16-
cabal: ['3.6']
17-
os: ['ubuntu-18.04', 'ubuntu-20.04', 'macOS-latest']
14+
ghc: ['8.10.7', '9.0.2', '9.2']
15+
cabal: ['3.8']
16+
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macOS-latest']
1817

1918
steps:
2019
- name: Set Variables
@@ -30,17 +29,17 @@ jobs:
3029
3130
# Setup
3231
- name: Checkout repository
33-
uses: actions/checkout@v2
32+
uses: actions/checkout@v3
3433
- name: Install GHC and Cabal
35-
uses: haskell/actions/setup@v1.2.7
34+
uses: haskell/actions/setup@v2.0.2
3635
with:
3736
ghc-version: ${{ matrix.ghc }}
3837
cabal-version: ${{ matrix.cabal }}
3938
- name: Confirm GHC and Cabal installation
4039
run: |
4140
ghc --version
4241
cabal --version
43-
- uses: pat-s/always-upload-cache@v2.1.5
42+
- uses: actions/cache@v3
4443
name: Cache dist-newstyle
4544
with:
4645
path: |
@@ -71,8 +70,7 @@ jobs:
7170
run: |
7271
echo "ARTIFACTS_ARCHIVE: $ARTIFACTS_ARCHIVE"
7372
mkdir -p $ARTIFACTS_DIR
74-
# cp $(cabal list-bin chainweb-mining-client) $ARTIFACTS_DIR -- cf. https://github.com/haskell/cabal/pull/7791
75-
cp dist-newstyle/build/*/ghc-*/chainweb-mining-client-*/build/chainweb-mining-client/chainweb-mining-client $ARTIFACTS_DIR
73+
cp $(cabal list-bin chainweb-mining-client) $ARTIFACTS_DIR
7674
cp README.md $ARTIFACTS_DIR
7775
cp CHANGELOG.md $ARTIFACTS_DIR
7876
cp LICENSE $ARTIFACTS_DIR
@@ -81,7 +79,7 @@ jobs:
8179
cp cabal.project.freeze $ARTIFACTS_DIR
8280
tar -C ./artifacts/ -czf "$ARTIFACTS_ARCHIVE" chainweb-mining-client
8381
- name: Safe artifacts
84-
uses: actions/upload-artifact@v2
82+
uses: actions/upload-artifact@v3
8583
with:
8684
name: ${{ env.ARTIFACTS_NAME }}
8785
path: ${{ env.ARTIFACTS_ARCHIVE }}
@@ -95,8 +93,8 @@ jobs:
9593
strategy:
9694
fail-fast: false
9795
matrix:
98-
ghc: ["8.10.7"]
99-
os: ["ubuntu-20.04"]
96+
ghc: ["9.2"]
97+
os: ["ubuntu-22.04"]
10098
env:
10199
GHC_VERSION: ${{ matrix.ghc }}
102100
OS: ${{ matrix.os }}
@@ -114,7 +112,7 @@ jobs:
114112
EOF
115113
116114
- name: Get build artifacts
117-
uses: actions/download-artifact@v2
115+
uses: actions/download-artifact@v3
118116
with:
119117
name: ${{ env.ARTIFACTS_NAME }}
120118
path: .
@@ -136,14 +134,14 @@ jobs:
136134
COPY chainweb-mining-client/chainweb-mining-client.cabal .
137135
COPY chainweb-mining-client/cabal.project .
138136
COPY chainweb-mining-client/cabal.project.freeze .
139-
ENTRYPOINT /chainweb-mining-client/chainweb-mining-client
137+
ENTRYPOINT [ "/chainweb-mining-client/chainweb-mining-client" ]
140138
EOF
141139
142140
- name: Set up QEMU
143-
uses: docker/setup-qemu-action@v1
141+
uses: docker/setup-qemu-action@v2
144142

145143
- name: Set up Docker Buildx
146-
uses: docker/setup-buildx-action@v1
144+
uses: docker/setup-buildx-action@v2
147145

148146
- name: Docker meta
149147
id: meta
@@ -157,7 +155,7 @@ jobs:
157155
type=ref,event=pr
158156
159157
- name: Login to GitHub Container Registry
160-
uses: docker/login-action@v1
158+
uses: docker/login-action@v2
161159
with:
162160
registry: ghcr.io
163161
username: ${{ github.repository_owner }}

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Revision history for chainweb-mining-client
22

3+
## 0.5 -- 2022-11-23
4+
5+
* Add `--stratum-rate` option, which specifies the mining rate (in
6+
milliseconds) at which each worker thread emits new mining jobs to the
7+
client.
8+
9+
* Change default value for thread count to 2.
10+
* Change default to connect to chainweb-node over an unsecure connection.
11+
* Change default to require valid certificates when TLS is enabled.
12+
* Change default chainweb-node host address to use port 1848.
13+
14+
## 0.4 -- 2021-11-29
15+
16+
* Add `--account` command line option for specifying the mining account. The
17+
default value is public miner key prefix with `:k` (k-account).
18+
319
## 0.3 -- 2021-11-10
420

521
* Add stratum server (#9)

0 commit comments

Comments
 (0)