Skip to content

Commit

Permalink
feat!: new gotham(#64)
Browse files Browse the repository at this point in the history
feat!: new gotham
  • Loading branch information
leontiadZen committed Jul 31, 2023
1 parent 896029c commit 07d1ca1
Show file tree
Hide file tree
Showing 62 changed files with 8,926 additions and 3,057 deletions.
84 changes: 84 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
version: 2.1

jobs:
build_ios:
macos:
xcode: 14.0.1
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- run:
name: Install Rust for MacOS
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run:
name: Add aarch64-apple-ios Target
command: rustup target add aarch64-apple-ios
- run:
name: Build for aarch64 iOS Debug
command: |
cd gotham-client
cargo rustc --crate-type staticlib --target aarch64-apple-ios --lib
- run:
name: Build for iOS Release
command: |
cd gotham-client
cargo rustc --crate-type staticlib --target aarch64-apple-ios --release --lib
- store_artifacts:
path: target/aarch64-apple-ios/debug/libclient_lib.a
destination: gotham-ios-debug/libclient_lib.a
- store_artifacts:
path: target/aarch64-apple-ios/release/libclient_lib.a
destination: gotham-ios-release/libclient_lib.a

build_android_docker_image:
machine:
image: ubuntu-2204:2022.07.1
steps:
- checkout
- run:
name: Build Docker Image
command: docker build -t gotham_android gotham-client/docker_images/android/
- run:
name: Login to docker registry
command: docker login --username "${DOCKER_REG_USERNAME}" --password "${DOCKER_REG_PASSWORD}" "${DOCKER_REG_HOST}"
- run:
name: Set Tags
command: docker tag gotham_android:latest "${DOCKER_REG_HOST}"/"$DOCKER_REG_USERNAME"/gotham_android:latest
- run:
name: Push Image
command: docker image push --all-tags "${DOCKER_REG_HOST}"/"$DOCKER_REG_USERNAME"/gotham_android

build_android:
docker:
- image: matanzengo/gotham_android:latest
resource_class: xlarge
steps:
- checkout
- run:
name: Build Debug Version
command: |
cd gotham-client
cargo ndk -p "${MIN_SDK_VERSION}" -t arm64-v8a -t armeabi-v7a -t x86_64 -o ./jniLibs_debug build
- run:
name: Build Release Version
command: |
cd gotham-client
cargo ndk -p "${MIN_SDK_VERSION}" -t arm64-v8a -t armeabi-v7a -t x86_64 -o ./jniLibs build --release
- store_artifacts:
path: gotham-client/jniLibs
destination: gotham-android-release
- store_artifacts:
path: gotham-client/jniLibs_debug
destination: gotham-android-debug

workflows:
build_docker_image:
jobs:
- build_android_docker_image
build_ios:
jobs:
- build_ios
build_android:
jobs:
- build_android
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/-bug--bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: ":bug: Bug Report"
about: Create a bug report to help us improve the repo
title: "[BUG]:"
labels: bug, enhancement
assignees: ''

---

## Description

Please provide a clear and concise description of the bug.

### Reproduce

Please list the steps to reproduce the issue.

## Expected Behavior

Please provide a clear and concise description of what you expected to happen.

## Environment

Please complete the following information:

OS + Version:

Cargo Version:

HW type:

## Additional context

Please provide any additional context that may be helpful in confirming and resolving this issue.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/-sparkles--feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: ":sparkles: Feature Request"
about: Request the inclusion of a new feature or functionality
title: "[FEAT]: "
labels: enhancement
assignees: ''

---

## Description

Please provide a clear and concise description of the feature you would like included.

## Motivation

Please provide a clear and concise description of the motivation for adding this feature.
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## What type of PR is this? (check all applicable)

- [ ] 🍕 Feature
- [ ] 🐛 Bug Fix
- [ ] 📝 Documentation Update
- [ ] 🧑‍💻 Code Refactor
- [ ] 🔥 Performance Improvements
- [ ] ✅ Test
- [ ] 🔁 CI/CD
- [ ] 📦 Chore (Release)
- [ ] ⏩ Revert

## Description

<!--
Please do not leave this blank
This PR [adds/removes/fixes/replaces] the [feature/bug/etc].
-->

## Related Tickets
Fixes # (issue)


## Added tests?

- [ ] 👍 yes
- [ ] 🙅 no, because they aren't needed
- [ ] 🙋 no, because I need help

15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Basic set up for two package managers

version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

# Maintain dependencies for cargo
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
64 changes: 64 additions & 0 deletions .github/workflows/gotham-server-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Continuous Integration

on:
push:
branches:
- master
paths:
- "gotham-server/**"
- "gotham-utilities/**"
- "integration-tests/**"
- "gotham-client/Cargo.toml"
- "Cargo.toml"

pull_request:
branches:
- master
paths:
- "gotham-server/**"
- "gotham-utilities/**"
- "integration-tests/**"
- "gotham-client/Cargo.toml"
- "Cargo.toml"


jobs:
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
build-and-test:
name: Test Suite
runs-on: ubuntu-latest
needs: lints
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# - run: cargo build --release

- name: Unit tests
run: cargo test --all -- --nocapture



19 changes: 19 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: simple
package-name: gotham-city
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
.idea
.history
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

24 changes: 24 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[workspace]
members = [
"gotham-server",
"gotham-client",
"integration-tests",
]

[workspace.dependencies]
gotham-server = { path = "gotham-server" }
gotham-client = { path = "gotham-client" }
serde = { version = "1", features = ["serde_derive"] }
serde_json = "1"
log = "0.4"
reqwest = "0.9.5"
failure = "0.1"
floating-duration = "0.1.2"
rocket = { version = "0.5.0-rc.1", default-features = false, features=["json"]}
config = "0.9.2"
uuid = { version = "0.7", features = ["v4"] }
jsonwebtoken = "8"
hex = "0.4"

two-party-ecdsa = { git = "https://github.com/ZenGo-X/two-party-ecdsa.git" }
kms = { git = "https://github.com/ZenGo-X/kms-secp256k1.git", branch = "2.0" }

0 comments on commit 07d1ca1

Please sign in to comment.