-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from l-monninger/main
- Loading branch information
Showing
10,472 changed files
with
2,526 additions
and
1,527,445 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Cargo Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Cache cargo registry | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo index | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cargo/git | ||
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo build | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./m1/target | ||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Run Cargo Check | ||
working-directory: ./m1 | ||
run: RUSTFLAGS="--cfg tokio_unstable" cargo check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Code Coverage | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Cargo Check"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
components: rustfmt | ||
override: true | ||
|
||
- name: Install kcov | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y pkg-config libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev | ||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz | ||
tar xzf master.tar.gz | ||
mkdir kcov-master/build | ||
cd kcov-master/build | ||
cmake .. | ||
make | ||
sudo make install | ||
- name: Build for Coverage | ||
run: | | ||
cd ./m1 | ||
RUSTFLAGS="--cfg tokio_unstable" cargo build --all --all-targets | ||
- name: Test & Generate Coverage Report | ||
run: | | ||
for file in m1/target/debug/deps/*; do | ||
mkdir -p "target/cov/$(basename $file)"; | ||
kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; | ||
done | ||
- name: Upload Coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # Add your Codecov token here | ||
directory: ./target/cov/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Rust Tests | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Cargo Check"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
|
||
- name: Build and Test Subnet | ||
run: | | ||
cd ./m1 | ||
RUSTFLAGS="--cfg tokio_unstable" cargo build --all --all-targets | ||
RUSTFLAGS="--cfg tokio_unstable" cargo test --all | ||
- name: Update Badge | ||
run: | | ||
if [ $? -eq 0 ]; then | ||
sed -i 's/badge\/tests-[a-zA-Z]*/badge\/tests-Passing-brightgreen/g' README.md | ||
else | ||
sed -i 's/badge\/tests-[a-zA-Z]*/badge\/tests-Failing-red/g' README.md | ||
fi | ||
if: ${{ always() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[submodule "aptos-core"] | ||
path = aptos-core | ||
url = https://github.com/movemntdev/aptos-core | ||
branch = m1 | ||
[submodule "x25519-dalek"] | ||
path = x25519-dalek | ||
url = https://github.com/movemntdev/x25519-dalek | ||
[submodule "ed25519-dalek"] | ||
path = ed25519-dalek | ||
url = https://github.com/movemntdev/ed25519-dalek | ||
[submodule "aptos-pre-core"] | ||
path = aptos-pre-core | ||
url = https://github.com/movemntdev/aptos-core | ||
branch = m1-pre-core |
Oops, something went wrong.