Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github actions #1

Merged
merged 7 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
workflow_dispatch:
pull_request:
branches:
- master

jobs:
test:
name: Build
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- name: Install protoc
id: deps-protoc
shell: bash
run: |
curl -Lo /tmp/protoc.zip \
"https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-x86_64.zip"
unzip -o /tmp/protoc.zip -d ${HOME}/.local
echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV
export PATH="${PATH}:${HOME}/.local/bin"

- name: Build
run: cargo build --verbose
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
workflow_dispatch:
release:
types:
- published

jobs:
test:
name: Build
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

# - name: Install protoc
# id: deps-protoc
# shell: bash
# run: |
# curl -Lo /tmp/protoc.zip \
# "https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-x86_64.zip"
# unzip -o /tmp/protoc.zip -d ${HOME}/.local
# echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV
# export PATH="${PATH}:${HOME}/.local/bin"
#
# - name: Add Rust targets
# run: rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu x86_64-apple-darwin aarch64-apple-darwin
#
# - name: Build for Linux x86
# run: cargo build -r --target=x86_64-unknown-linux-gnu --verbose && mv target/aarch64-apple-darwin/platform-cli ./platform-cli_x86_64-gnu
#
# - name: Build for Linux arm64
# run: cargo build -r --target=aarch64-unknown-linux-gnu --verbose && mv target/aarch64-unknown-linux-gnu/platform-cli ./platform-cli-arm64-gnu
#
# - name: Build for Apple x86
# run: cargo build -r --target=x86_64-apple-darwin --verbose && mv target/x86_64-apple-darwin/platform-cli ./platform-cli_x86_64-darwin
#
# - name: Build for Apple Silicon
# run: cargo build -r --target=aarch64-apple-darwin --verbose && mv target/aarch64-apple-darwin/platform-cli ./platform-cli_arm64-darwin

- name: Build for Apple Silicon
run: touch asset.txt

- uses: softprops/action-gh-release@v2
with:
files: |
asset.txt
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ version = "0.1.0"
edition = "2021"

[dependencies]
drive = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error"}
dpp = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" , features = ["state-transition-signing"]}
rs-dapi-client = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" }
dapi-grpc = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" }
simple-signer = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" }
clap = { version = "4.5.19", features = ["derive"] }
tokio = { version = "1.40.0", features = ["rt", "rt-multi-thread", "macros"] }
http = "1.1.0"
dpp = { path = "../../WebstormProjects/platform/packages/rs-dpp" , features = ["state-transition-signing"]}
drive = { path = "../../WebstormProjects/platform/packages/rs-drive" }
rs-dapi-client = { path = "../../WebstormProjects/platform/packages/rs-dapi-client" }
dapi-grpc = { path = "../../WebstormProjects/platform/packages/dapi-grpc" }
hex = "0.4.3"
simple-signer = { path = "../../WebstormProjects/platform/packages/simple-signer" }
tonic-build = "0.12.3"
tonic = "0.12.3"
base64 = "0.21.2"
Expand Down