Skip to content

Commit

Permalink
Add 'ipc/' from commit '68d5c10e5f801dd3e89f96e39dff5144489861f0'
Browse files Browse the repository at this point in the history
git-subtree-dir: ipc
git-subtree-mainline: fabcefa
git-subtree-split: 68d5c10
  • Loading branch information
adlrocha committed Dec 6, 2023
2 parents fabcefa + 68d5c10 commit d3a0057
Show file tree
Hide file tree
Showing 160 changed files with 21,768 additions and 0 deletions.
1 change: 1 addition & 0 deletions ipc/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
80 changes: 80 additions & 0 deletions ipc/.github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: IPC Issue Template
description: Use this template to report bugs and other issues
labels: [bug]
body:
- type: dropdown
id: issue-type
attributes:
label: Issue type
description: What type of issue would you like to report?
multiple: false
options:
- Bug
- Build/Install
- Performance
- Support
- Feature Request
- Documentation Bug
- Documentation Request
- Others
validations:
required: true

- type: dropdown
id: latest
attributes:
label: Have you reproduced the bug with the latest dev version?
description: We suggest attempting to reproducing the bug with the dev branch
options:
- "Yes"
- "No"
validations:
required: true

- type: input
id: version
attributes:
label: Version
placeholder: e.g. v0.4.0
validations:
required: true
- type: dropdown
id: Code
attributes:
label: Custom code
options:
- "Yes"
- "No"
validations:
required: true
- type: input
id: OS
attributes:
label: OS platform and distribution
placeholder: e.g., Linux Ubuntu 16.04
- type: textarea
id: what-happened
attributes:
label: Describe the issue
description: Also tell us, what did you expect to happen?
placeholder: |
This is where you get to tell us what went wrong, when doing so, please try to provide a clear and concise description of the bug with all related information:
* What you were doing when you experienced the bug? What are you trying to build?
* Any *error* messages and logs you saw, *where* you saw them, and what you believe may have caused them (if you have any ideas).
* What is the expected behaviour? Links to the code?
validations:
required: true
- type: textarea
id: repro-steps
attributes:
label: Repro steps
description: Provide the minimum necessary steps to reproduce the problem.
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
18 changes: 18 additions & 0 deletions ipc/.github/workflows/add-bug-tracker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add bugs to tracker

on:
issues:
types:
- opened
- labeled

jobs:
add-to-project:
name: Add issue to tracker
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/consensus-shipyard/projects/3
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: bug
21 changes: 21 additions & 0 deletions ipc/.github/workflows/branch-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check branch

on:
pull_request_target: # Do not combine with explicit checkout for security reasons
types: [opened] # Not triggering on "edited" to allow a forced path to main

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- uses: Vankka/pr-target-branch-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: main
exclude: dev # Don't prevent going from development -> main
change-to: dev
comment: |
Your PR was set to target `main`. PRs should be target `dev`.
The base branch of this PR has been automatically changed to `dev`.
If you really intend to target `main`, edit the PR.
89 changes: 89 additions & 0 deletions ipc/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
# Check code formatting; anything that doesn't require compilation.
pre-compile-checks:
name: Pre-compile checks
runs-on: ubuntu-latest
steps:
- name: Check out the project
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- name: Check code formatting
run: make check-fmt
- name: Check license headers
run: make license
# - name: Check diagrams
# run: make check-diagrams

# Test matrix, running tasks from the Makefile.
tests:
needs: [pre-compile-checks]
name: ${{ matrix.make.name }} (${{ matrix.os }}, ${{ matrix.rust }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
rust: [nightly]
make:
- name: Lint
task: lint
- name: Test
task: test
exclude:
- rust: stable
make:
name: Lint

env:
RUST_BACKTRACE: full
RUSTFLAGS: -Dwarnings
CARGO_INCREMENTAL: '0'
SCCACHE_CACHE_SIZE: 10G
CC: "sccache clang"
CXX: "sccache clang++"

steps:
- name: Check out the project
uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
targets: wasm32-unknown-unknown
toolchain: ${{ matrix.rust }}
components: rustfmt,clippy

# Protobuf compiler required by libp2p-core
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup sccache
uses: hanabi1224/[email protected] # https://github.com/hanabi1224/sccache-action used by Forest.
timeout-minutes: 5
continue-on-error: true
with:
release-name: v0.3.1
# Caching everything separately, in case they don't ask for the same things to be compiled.
cache-key: ${{ matrix.make.name }}-${{ matrix.os }}-${{matrix.rust}}-${{ hashFiles('Cargo.lock', 'rust-toolchain', 'rust-toolchain.toml') }}
# Not sure why we should ever update a cache that has the hash of the lock file in it.
# In Forest it only contains the rust-toolchain, so it makes sense to update because dependencies could have changed.
cache-update: false

- name: ${{ matrix.make.name }}
run: make ${{ matrix.make.task }}
29 changes: 29 additions & 0 deletions ipc/.github/workflows/release-binaries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release binaries

permissions:
contents: write

on:
workflow_dispatch:
release:
types: [ created ]

jobs:
upload-assets:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: universal-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: ipc-agent
target: ${{ matrix.target }}
archive: $bin-$tag-$target
token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions ipc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.idea/
*.iml
/target
docs/diagrams/plantuml.jar
bin
/lotus
fx.dot
testing/itest/logs
Loading

0 comments on commit d3a0057

Please sign in to comment.