Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
Added chiabot_harvester.dart
Browse files Browse the repository at this point in the history
and chiabot_harvester.exe release
  • Loading branch information
gilnobrega committed May 8, 2021
1 parent a16aeb4 commit a8f89cf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ jobs:
./dart-sdk/bin/dart pub get
mv .github/workflows/config.test .github/workflows/config.yaml
./dart-sdk/bin/dart compile exe chiabot.dart
./dart-sdk/bin/dart compile exe chiabot_harvester.dart
chmod +x chiabot.exe
chmod +x chiabot_harvester.exe
mv chiabot.exe chiabot
mv chiabot_harvester.exe chiabot_harvester
mv config.json.default config.json
tar -czvf ./chiabot-linux-arm64.tar.gz ./chiabot ./config.json
tar -czvf ./chiabot-linux-arm64.tar.gz ./chiabot ./config.json ./chiabot_harvester
- name: Release
uses: softprops/action-gh-release@v1
Expand All @@ -53,10 +56,7 @@ jobs:
release_name: Release ${{ github.sha }}
draft: true
files: |
./chiabot-linux-amd64.tar.gz
./chiabot-linux-arm64.tar.gz
./chiabot-macOS-amd64.tar.gz
./chiabot-windows-amd64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # You don't need to add this in secrets it's by default.
amd64:
Expand Down Expand Up @@ -94,29 +94,37 @@ jobs:
run: |
mv .github/workflows/config.test .github/workflows/config.yaml
dart compile exe chiabot.dart
dart compile exe chiabot_harvester.dart
chmod +x chiabot.exe
chmod +x chiabot_harvester.exe
./chiabot.exe harvester onetime
mv chiabot.exe chiabot
tar -czvf ./chiabot-linux-amd64.tar.gz ./chiabot ./config.json
mv chiabot_harvester.exe chiabot_harvester
tar -czvf ./chiabot-linux-amd64.tar.gz ./chiabot ./config.json ./chiabot_harvester
- name: Building macOS release
if: matrix.os == 'macos-latest' && matrix.architecture == 'x64'
run: |
mv .github/workflows/config.test .github/workflows/config.yaml
dart compile exe chiabot.dart
dart compile exe chiabot_harvester.dart
chmod +x chiabot.exe
chmod +x chiabot_harvester.exe
./chiabot.exe harvester onetime
mv chiabot.exe chiabot
tar -czvf ./chiabot-macOS-amd64.tar.gz ./chiabot ./config.json
mv chiabot_harvester.exe chiabot_harvester
tar -czvf ./chiabot-macOS-amd64.tar.gz ./chiabot ./config.json ./chiabot_harvester
- name: Building Windows release
if: matrix.os == 'windows-latest' && matrix.architecture == 'x64'
run: |
mv .github/workflows/config.test .github/workflows/config.yaml
dart compile exe chiabot.dart
dart compile exe chiabot_harvester.dart
./chiabot.exe harvester onetime
move chiabot.exe chiabot-windows-amd64.exe
move chiabot_harvester.exe chiabot_harvester-windows-amd64.exe
- name: Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -125,9 +133,9 @@ jobs:
draft: true
files: |
./chiabot-linux-amd64.tar.gz
./chiabot-linux-arm64.tar.gz
./chiabot-macOS-amd64.tar.gz
./chiabot-windows-amd64.exe
./chiabot_harvester-windows-amd64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # You don't need to add this in secrets it's by default.

Expand Down
7 changes: 7 additions & 0 deletions chiabot_harvester.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'chiabot.dart' as Client;


//launches chiabot as harvester
main() {
Client.main(["harvester"]);
}
1 change: 0 additions & 1 deletion lib/farmer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class Farmer extends Harvester {
String _networkSize = "0";
String get networkSize => _networkSize;

@override
ClientType _type = ClientType.Farmer;
@override
ClientType get type => _type;
Expand Down

0 comments on commit a8f89cf

Please sign in to comment.