Skip to content

Commit d3a0057

Browse files
committed
Add 'ipc/' from commit '68d5c10e5f801dd3e89f96e39dff5144489861f0'
git-subtree-dir: ipc git-subtree-mainline: fabcefa git-subtree-split: 68d5c10
2 parents fabcefa + 68d5c10 commit d3a0057

160 files changed

Lines changed: 21768 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ipc/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: IPC Issue Template
2+
description: Use this template to report bugs and other issues
3+
labels: [bug]
4+
body:
5+
- type: dropdown
6+
id: issue-type
7+
attributes:
8+
label: Issue type
9+
description: What type of issue would you like to report?
10+
multiple: false
11+
options:
12+
- Bug
13+
- Build/Install
14+
- Performance
15+
- Support
16+
- Feature Request
17+
- Documentation Bug
18+
- Documentation Request
19+
- Others
20+
validations:
21+
required: true
22+
23+
- type: dropdown
24+
id: latest
25+
attributes:
26+
label: Have you reproduced the bug with the latest dev version?
27+
description: We suggest attempting to reproducing the bug with the dev branch
28+
options:
29+
- "Yes"
30+
- "No"
31+
validations:
32+
required: true
33+
34+
- type: input
35+
id: version
36+
attributes:
37+
label: Version
38+
placeholder: e.g. v0.4.0
39+
validations:
40+
required: true
41+
- type: dropdown
42+
id: Code
43+
attributes:
44+
label: Custom code
45+
options:
46+
- "Yes"
47+
- "No"
48+
validations:
49+
required: true
50+
- type: input
51+
id: OS
52+
attributes:
53+
label: OS platform and distribution
54+
placeholder: e.g., Linux Ubuntu 16.04
55+
- type: textarea
56+
id: what-happened
57+
attributes:
58+
label: Describe the issue
59+
description: Also tell us, what did you expect to happen?
60+
placeholder: |
61+
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:
62+
* What you were doing when you experienced the bug? What are you trying to build?
63+
* Any *error* messages and logs you saw, *where* you saw them, and what you believe may have caused them (if you have any ideas).
64+
* What is the expected behaviour? Links to the code?
65+
validations:
66+
required: true
67+
- type: textarea
68+
id: repro-steps
69+
attributes:
70+
label: Repro steps
71+
description: Provide the minimum necessary steps to reproduce the problem.
72+
placeholder: Tell us what you see!
73+
validations:
74+
required: true
75+
- type: textarea
76+
id: logs
77+
attributes:
78+
label: Relevant log output
79+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
80+
render: shell
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Add bugs to tracker
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- labeled
8+
9+
jobs:
10+
add-to-project:
11+
name: Add issue to tracker
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/add-to-project@v0.5.0
15+
with:
16+
project-url: https://github.com/orgs/consensus-shipyard/projects/3
17+
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
18+
labeled: bug
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Check branch
2+
3+
on:
4+
pull_request_target: # Do not combine with explicit checkout for security reasons
5+
types: [opened] # Not triggering on "edited" to allow a forced path to main
6+
7+
jobs:
8+
check-branch:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: Vankka/pr-target-branch-action@v2
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
with:
15+
target: main
16+
exclude: dev # Don't prevent going from development -> main
17+
change-to: dev
18+
comment: |
19+
Your PR was set to target `main`. PRs should be target `dev`.
20+
The base branch of this PR has been automatically changed to `dev`.
21+
If you really intend to target `main`, edit the PR.

ipc/.github/workflows/ci.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
# Check code formatting; anything that doesn't require compilation.
13+
pre-compile-checks:
14+
name: Pre-compile checks
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the project
18+
uses: actions/checkout@v3
19+
- name: Install Rust
20+
uses: dtolnay/rust-toolchain@master
21+
with:
22+
toolchain: nightly
23+
components: rustfmt
24+
- name: Check code formatting
25+
run: make check-fmt
26+
- name: Check license headers
27+
run: make license
28+
# - name: Check diagrams
29+
# run: make check-diagrams
30+
31+
# Test matrix, running tasks from the Makefile.
32+
tests:
33+
needs: [pre-compile-checks]
34+
name: ${{ matrix.make.name }} (${{ matrix.os }}, ${{ matrix.rust }})
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
os: [ubuntu-latest]
40+
rust: [nightly]
41+
make:
42+
- name: Lint
43+
task: lint
44+
- name: Test
45+
task: test
46+
exclude:
47+
- rust: stable
48+
make:
49+
name: Lint
50+
51+
env:
52+
RUST_BACKTRACE: full
53+
RUSTFLAGS: -Dwarnings
54+
CARGO_INCREMENTAL: '0'
55+
SCCACHE_CACHE_SIZE: 10G
56+
CC: "sccache clang"
57+
CXX: "sccache clang++"
58+
59+
steps:
60+
- name: Check out the project
61+
uses: actions/checkout@v3
62+
63+
- name: Install Rust
64+
uses: dtolnay/rust-toolchain@master
65+
with:
66+
targets: wasm32-unknown-unknown
67+
toolchain: ${{ matrix.rust }}
68+
components: rustfmt,clippy
69+
70+
# Protobuf compiler required by libp2p-core
71+
- name: Install Protoc
72+
uses: arduino/setup-protoc@v1
73+
with:
74+
repo-token: ${{ secrets.GITHUB_TOKEN }}
75+
76+
- name: Setup sccache
77+
uses: hanabi1224/sccache-action@v1.2.0 # https://github.com/hanabi1224/sccache-action used by Forest.
78+
timeout-minutes: 5
79+
continue-on-error: true
80+
with:
81+
release-name: v0.3.1
82+
# Caching everything separately, in case they don't ask for the same things to be compiled.
83+
cache-key: ${{ matrix.make.name }}-${{ matrix.os }}-${{matrix.rust}}-${{ hashFiles('Cargo.lock', 'rust-toolchain', 'rust-toolchain.toml') }}
84+
# Not sure why we should ever update a cache that has the hash of the lock file in it.
85+
# In Forest it only contains the rust-toolchain, so it makes sense to update because dependencies could have changed.
86+
cache-update: false
87+
88+
- name: ${{ matrix.make.name }}
89+
run: make ${{ matrix.make.task }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release binaries
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
workflow_dispatch:
8+
release:
9+
types: [ created ]
10+
11+
jobs:
12+
upload-assets:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- target: x86_64-unknown-linux-gnu
18+
os: ubuntu-latest
19+
- target: universal-apple-darwin
20+
os: macos-latest
21+
runs-on: ${{ matrix.os }}
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: taiki-e/upload-rust-binary-action@v1
25+
with:
26+
bin: ipc-agent
27+
target: ${{ matrix.target }}
28+
archive: $bin-$tag-$target
29+
token: ${{ secrets.GITHUB_TOKEN }}

ipc/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.idea/
2+
*.iml
3+
/target
4+
docs/diagrams/plantuml.jar
5+
bin
6+
/lotus
7+
fx.dot
8+
testing/itest/logs

0 commit comments

Comments
 (0)