Skip to content

Commit

Permalink
Init Repo
Browse files Browse the repository at this point in the history
Co-authored-by: Gyuho Lee <[email protected]>
Co-authored-by: Sam Batschelet <[email protected]>
Co-authored-by: Dan Sover <[email protected]>
Co-authored-by: Richard Pringle <[email protected]>
Co-authored-by: morrisettjohn <[email protected]>
Co-authored-by: Chloe <[email protected]>
Co-authored-by: Gauthier Leonard <[email protected]>
Co-authored-by: Seoyonghun <[email protected]>
Co-authored-by: Ron Kuris <[email protected]>
  • Loading branch information
10 people committed Aug 30, 2023
0 parents commit 2ef6757
Show file tree
Hide file tree
Showing 476 changed files with 97,549 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git
.cache
target
*.md
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax

/crates/avalanche-types/ @gyuho
/crates/avalanche-consensus/ @gyuho
/crates/avalanche-types/proto/ @hexfusion @gyuho
/crates/avalanche-types/subnet/ @hexfusion @gyuho
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
time: "05:00"
timezone: America/Los_Angeles
open-pull-requests-limit: 10
50 changes: 50 additions & 0 deletions .github/workflows/byzantine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ci

# ref. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
on:
push:
branches:
- main
tags:
- "*"
pull_request:

permissions:
contents: write

jobs:
e2e:
name: avalanchego byzantine tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install linker
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-multilib
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.19'

- name: Run e2e tests
run: scripts/tests.avalanchego-byzantine.sh
50 changes: 50 additions & 0 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ci

# ref. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
on:
push:
branches:
- main
tags:
- "*"
pull_request:

permissions:
contents: write

jobs:
e2e:
name: avalanchego conformance tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install linker
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-multilib
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.19'

- name: Run e2e tests
run: scripts/tests.avalanchego-conformance.sh
53 changes: 53 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: ci

# ref. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
on:
push:
branches:
- main
tags:
- "*"
pull_request:

permissions:
contents: write

jobs:
docs:
name: docs
runs-on: ubuntu-latest
# Fails the CI build if there are documentation warnings.
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install linker
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-multilib
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
override: true
- name: Check Rust version
run: rustc --version
# or use "abelfodil/protoc-action@v1"
# ref. https://github.com/hyperium/tonic/issues/1047#issuecomment-1222508191
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Set env var
shell: bash
run: export 'RUSTFLAGS=-D warnings'
- name: Run doc tests
shell: bash
run: cargo doc --no-deps --all-features -p avalanche-consensus -p avalanche-types
51 changes: 51 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: ci

# ref. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
on:
push:
branches:
- main
tags:
- "*"
pull_request:

permissions:
contents: write

jobs:
e2e:
name: avalanchego integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install linker
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-multilib
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.19'

# always downloads the latest
- name: Run e2e tests
run: scripts/tests.avalanchego-e2e.sh
49 changes: 49 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ci

# ref. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
on:
push:
branches:
- main
tags:
- "*"
pull_request:

permissions:
contents: write

jobs:
unit:
name: lint
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install linker
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-multilib
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
override: true
- name: Check Rust version
run: rustc --version
# or use "abelfodil/protoc-action@v1"
# ref. https://github.com/hyperium/tonic/issues/1047#issuecomment-1222508191
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Run static analysis tests
shell: bash
run: scripts/tests.lint.sh
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish

on:
workflow_dispatch:
release:
types: [published]

jobs:
publish-avalanche-rs-crate:
name: avalanche-rs-lib
runs-on: ubuntu-latest
if: "startsWith(github.event.release.tag_name, 'v')"
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: publish avalanche-types crate
run: |
cargo login ${{ secrets.CARGO_TOKEN }}
cargo publish -p avalanche-types
- name: publish avalanche-consensus crate
run: |
cargo login ${{ secrets.CARGO_TOKEN }}
cargo publish -p avalanche-consensus
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: release

on:
push:
tags:
- "v*.*.*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
50 changes: 50 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ci

# ref. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
on:
push:
branches:
- main
tags:
- "*"
pull_request:

permissions:
contents: write

jobs:
unit:
name: unit tests
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install linker
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-multilib
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
override: true
- name: Check Rust version
run: rustc --version
# or use "abelfodil/protoc-action@v1"
# ref. https://github.com/hyperium/tonic/issues/1047#issuecomment-1222508191
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- uses: taiki-e/install-action@nextest
- name: Run unit tests
shell: bash
run: scripts/tests.unit.sh
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# created by docker-desktop
compose-dev.yaml

# Generated by Cargo
# will have compiled files and executables
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# for "cross build" outputs
/release

.DS_Store
.vscode
Loading

0 comments on commit 2ef6757

Please sign in to comment.