Skip to content

Commit

Permalink
v0.0.6 (#6)
Browse files Browse the repository at this point in the history
Co-authored-by: Sol Sanctum <[email protected]>
  • Loading branch information
KingGorrin and sol-znn authored Mar 5, 2024
1 parent f899b8b commit fee4a84
Show file tree
Hide file tree
Showing 53 changed files with 6,606 additions and 1,647 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/znn_cli_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Build and release znn-cli
on:
push:
branches:
- cicd
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -30,7 +29,7 @@ jobs:
- name: Install dependencies
run: dart pub get
- name: Build znn-cli
run: dart compile exe cli_handler.dart -o ${{ matrix.output-name }}
run: dart compile exe znn-cli.dart -o ${{ matrix.output-name }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -62,39 +61,47 @@ jobs:
- name: Download libpow_links
uses: robinraju/[email protected]
with:
repository: "alienc0der/znn-pow-links-cpp"
repository: "zenon-network/znn-pow-links-cpp"
latest: true
- name: Download libargon2
uses: robinraju/[email protected]
with:
repository: "alienc0der/argon2_ffi"
repository: "zenon-network/argon2_ffi"
latest: true
- name: Download libledger_ffi
uses: robinraju/[email protected]
with:
repository: "zenon-network/ledger_ffi_rs"
latest: true
- name: Package Linux binaries
run: |
mv znn-cli-linux releases/znn-cli
chmod +x releases/znn-cli
unzip -j libpow_links-linux-amd64.zip -d releases/
unzip -j libargon2_ffi-linux-amd64.zip -d releases/
zip -jr releases/znn-cli-linux-amd64.zip releases/znn-cli releases/libpow_links.so releases/libargon2_ffi_plugin.so
rm releases/znn-cli releases/libpow_links.so releases/libargon2_ffi_plugin.so
unzip -j libledger_ffi-linux-amd64.zip -d releases/
zip -jr releases/znn-cli-linux-amd64.zip releases/znn-cli releases/libpow_links.so releases/libargon2_ffi_plugin.so releases/libledger_ffi.so
rm releases/znn-cli releases/libpow_links.so releases/libargon2_ffi_plugin.so releases/libledger_ffi.so
- name: Package Windows binaries
run: |
mv znn-cli-windows.exe releases/znn-cli.exe
chmod +x releases/znn-cli.exe
unzip -j libpow_links-windows-amd64.zip -d releases/
unzip -j libargon2_ffi-windows-amd64.zip -d releases/
unzip -j libledger_ffi-windows-amd64.zip -d releases/
rm releases/generator.exe
zip -jr releases/znn-cli-windows-amd64.zip releases/znn-cli.exe releases/libpow_links.dll releases/argon2_ffi_plugin.dll
rm releases/znn-cli.exe releases/libpow_links.dll releases/argon2_ffi_plugin.dll
zip -jr releases/znn-cli-windows-amd64.zip releases/znn-cli.exe releases/libpow_links.dll releases/argon2_ffi_plugin.dll releases/libledger_ffi.dll
rm releases/znn-cli.exe releases/libpow_links.dll releases/argon2_ffi_plugin.dll releases/libledger_ffi.dll
- name: Package macOS binaries
run: |
mv znn-cli-macos releases/znn-cli
chmod +x releases/znn-cli
unzip -j libpow_links-darwin-universal.zip -d releases/
unzip -j libargon2_ffi-darwin-universal.zip -d releases/
unzip -j libledger_ffi-darwin-arch64.zip -d releases/
rm releases/generator
zip -jr releases/znn-cli-darwin-universal.zip releases/znn-cli releases/libpow_links.dylib releases/libargon2_ffi.dylib
rm releases/znn-cli releases/libpow_links.dylib releases/libargon2_ffi.dylib
zip -jr releases/znn-cli-darwin-universal.zip releases/znn-cli releases/libpow_links.dylib releases/libargon2_ffi.dylib releases/libledger_ffi.dylib
rm releases/znn-cli releases/libpow_links.dylib releases/libargon2_ffi.dylib releases/libledger_ffi.dylib
- name: Generate checksums
run: |
cd releases/
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 The Zenon developers
Copyright (c) 2023 The Zenon developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
default: all

all:
echo Use 'make windows' or 'make linux' to build the znn-cli binary

windows:
-mkdir build
dart pub get
dart compile exe znn-cli.dart -o build\znn-cli.exe
copy .\Resources\* .\build\

linux:
mkdir -p build
dart compile exe cli_handler.dart -o build/znn-cli
dart pub get
dart compile exe znn-cli.dart -o build/znn-cli
cp ./Resources/* ./build

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Zenon CLI tool

The Zenon CLI tool is designed to interact with Alphanet - Network of Momentum Phase 0.
The Zenon CLI tool is designed to interact with Alphanet - Network of Momentum Phase 1.

## Building
`make`
Windows: `make windows`
Linux: `make linux`

## Installation
Download and extract the [latest version](https://github.com/hypercore-one/znn_cli_dart/releases/).

## Notes
All the required dynamic libraries were copied in the `build/` folder. When Moving the `znn-cli` binary, don't forget to move the libraries as well.
Binary file added Resources/libledger_ffi.dll
Binary file not shown.
Binary file added Resources/libledger_ffi.dylib
Binary file not shown.
Binary file added Resources/libledger_ffi.so
Binary file not shown.
Loading

0 comments on commit fee4a84

Please sign in to comment.