mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-24 10:52:29 +03:00
Adds ci.yml (#77)
* Adds ci.yml * Update ci script * Update Cargo.toml * Update to ubuntu-latest * Update dependencies * Update git deps with rev * Update ci script * Update ci script * Update ci script * Update code coverage * Update code coverage * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI * Update CI script * Update CI script
This commit is contained in:
parent
b84f60b39f
commit
b4cfa64167
158
.github/workflows/ci.yml
vendored
Normal file
158
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
env:
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
style:
|
||||||
|
name: Check Style
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Load snarkOS
|
||||||
|
run: |
|
||||||
|
mkdir ~/.ssh
|
||||||
|
echo "${{ secrets.SNARKOS_DEPLOY_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
ssh-add -k ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
|
- name: cargo fmt --check
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
env:
|
||||||
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --all -- --check
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: -Dwarnings
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rust:
|
||||||
|
- stable
|
||||||
|
- nightly
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Load snarkOS
|
||||||
|
run: |
|
||||||
|
mkdir ~/.ssh
|
||||||
|
echo "${{ secrets.SNARKOS_DEPLOY_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
ssh-add -k ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
- name: Install Rust (${{ matrix.rust }})
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Check examples
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
env:
|
||||||
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||||
|
with:
|
||||||
|
command: check
|
||||||
|
args: --examples --all
|
||||||
|
|
||||||
|
- name: Check examples with all features on stable
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
# env:
|
||||||
|
# CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||||
|
with:
|
||||||
|
command: check
|
||||||
|
args: --examples --all-features --all
|
||||||
|
if: matrix.rust == 'stable'
|
||||||
|
|
||||||
|
- name: Check benchmarks on nightly
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
# env:
|
||||||
|
# CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||||
|
with:
|
||||||
|
command: check
|
||||||
|
args: --all-features --examples --all --benches
|
||||||
|
if: matrix.rust == 'nightly'
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
# env:
|
||||||
|
# CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --release --all --no-fail-fast
|
||||||
|
|
||||||
|
codecov:
|
||||||
|
name: Code Coverage
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Load snarkOS
|
||||||
|
run: |
|
||||||
|
mkdir ~/.ssh
|
||||||
|
echo "${{ secrets.SNARKOS_DEPLOY_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
ssh-add -k ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --all
|
||||||
|
env:
|
||||||
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||||
|
CARGO_INCREMENTAL: "0"
|
||||||
|
|
||||||
|
- name: Install dependencies for code coverage
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev
|
||||||
|
|
||||||
|
- name: Generate coverage report
|
||||||
|
run: |
|
||||||
|
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
|
||||||
|
tar xzf master.tar.gz
|
||||||
|
cd kcov-master
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. && make
|
||||||
|
make install DESTDIR=../../kcov-build
|
||||||
|
cd ../..
|
||||||
|
rm -rf kcov-master
|
||||||
|
for file in target/debug/deps/*-*; do if [[ "$file" != *\.* ]]; then mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; fi done
|
||||||
|
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
12
Cargo.lock
generated
12
Cargo.lock
generated
@ -78,9 +78,9 @@ checksum = "58946044516aa9dc922182e0d6e9d124a31aafe6b421614654eb27cf90cec09c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bincode"
|
name = "bincode"
|
||||||
version = "1.2.1"
|
version = "1.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf"
|
checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"serde",
|
"serde",
|
||||||
@ -946,6 +946,7 @@ checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "snarkos-algorithms"
|
name = "snarkos-algorithms"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
|
source = "git+ssh://git@github.com/AleoHQ/snarkOS.git?rev=c7a56d9#c7a56d97a76dd6e7841aa6bb86e086f7128e5620"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"blake2",
|
"blake2",
|
||||||
"derivative",
|
"derivative",
|
||||||
@ -964,6 +965,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "snarkos-curves"
|
name = "snarkos-curves"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
|
source = "git+ssh://git@github.com/AleoHQ/snarkOS.git?rev=c7a56d9#c7a56d97a76dd6e7841aa6bb86e086f7128e5620"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derivative",
|
"derivative",
|
||||||
"rand",
|
"rand",
|
||||||
@ -977,6 +979,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "snarkos-derives"
|
name = "snarkos-derives"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
source = "git+ssh://git@github.com/AleoHQ/snarkOS.git?rev=c7a56d9#c7a56d97a76dd6e7841aa6bb86e086f7128e5620"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 1.0.18",
|
"proc-macro2 1.0.18",
|
||||||
"quote 1.0.7",
|
"quote 1.0.7",
|
||||||
@ -986,6 +989,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "snarkos-errors"
|
name = "snarkos-errors"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
|
source = "git+ssh://git@github.com/AleoHQ/snarkOS.git?rev=c7a56d9#c7a56d97a76dd6e7841aa6bb86e086f7128e5620"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58",
|
"base58",
|
||||||
"bech32",
|
"bech32",
|
||||||
@ -998,6 +1002,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "snarkos-gadgets"
|
name = "snarkos-gadgets"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
|
source = "git+ssh://git@github.com/AleoHQ/snarkOS.git?rev=c7a56d9#c7a56d97a76dd6e7841aa6bb86e086f7128e5620"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derivative",
|
"derivative",
|
||||||
"digest 0.8.1",
|
"digest 0.8.1",
|
||||||
@ -1011,6 +1016,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "snarkos-models"
|
name = "snarkos-models"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
|
source = "git+ssh://git@github.com/AleoHQ/snarkOS.git?rev=c7a56d9#c7a56d97a76dd6e7841aa6bb86e086f7128e5620"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"derivative",
|
"derivative",
|
||||||
@ -1025,10 +1031,12 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "snarkos-profiler"
|
name = "snarkos-profiler"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
|
source = "git+ssh://git@github.com/AleoHQ/snarkOS.git?rev=c7a56d9#c7a56d97a76dd6e7841aa6bb86e086f7128e5620"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "snarkos-utilities"
|
name = "snarkos-utilities"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
|
source = "git+ssh://git@github.com/AleoHQ/snarkOS.git?rev=c7a56d9#c7a56d97a76dd6e7841aa6bb86e086f7128e5620"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"rand",
|
"rand",
|
||||||
|
12
Cargo.toml
12
Cargo.toml
@ -19,12 +19,12 @@ members = [ "ast", "compiler", "leo-inputs", "types" ]
|
|||||||
leo-compiler = { path = "compiler", version = "0.1.0" }
|
leo-compiler = { path = "compiler", version = "0.1.0" }
|
||||||
leo-inputs = { path = "leo-inputs", version = "0.1.0"}
|
leo-inputs = { path = "leo-inputs", version = "0.1.0"}
|
||||||
|
|
||||||
snarkos-algorithms = { path = "../snarkOS/algorithms", version = "0.8.0", default-features = false }
|
snarkos-algorithms = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-curves = { path = "../snarkOS/curves", version = "0.8.0", default-features = false }
|
snarkos-curves = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-errors = { path = "../snarkOS/errors", version = "0.8.0", default-features = false }
|
snarkos-errors = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-gadgets = { path = "../snarkOS/gadgets", version = "0.8.0", default-features = false }
|
snarkos-gadgets = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-models = { path = "../snarkOS/models", version = "0.8.0", default-features = false }
|
snarkos-models = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-utilities = { path = "../snarkOS/utilities", version = "0.8.0" }
|
snarkos-utilities = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9" }
|
||||||
|
|
||||||
clap = { version = "2.33.0" }
|
clap = { version = "2.33.0" }
|
||||||
colored = { version = "1.9" }
|
colored = { version = "1.9" }
|
||||||
|
@ -9,10 +9,10 @@ leo-ast = { path = "../ast", version = "0.1.0" }
|
|||||||
leo-types = { path = "../types", version = "0.1.0" }
|
leo-types = { path = "../types", version = "0.1.0" }
|
||||||
leo-inputs = { path = "../leo-inputs", version = "0.1.0" }
|
leo-inputs = { path = "../leo-inputs", version = "0.1.0" }
|
||||||
|
|
||||||
snarkos-curves = { path = "../../snarkOS/curves", version = "0.8.0", default-features = false }
|
snarkos-curves = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-errors = { path = "../../snarkOS/errors", version = "0.8.0", default-features = false }
|
snarkos-errors = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-gadgets = { path = "../../snarkOS/gadgets", version = "0.8.0", default-features = false }
|
snarkos-gadgets = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-models = { path = "../../snarkOS/models", version = "0.8.0", default-features = false }
|
snarkos-models = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
|
|
||||||
hex = { version = "0.4.2" }
|
hex = { version = "0.4.2" }
|
||||||
log = { version = "0.4" }
|
log = { version = "0.4" }
|
||||||
@ -22,4 +22,4 @@ sha2 = { version = "0.8" }
|
|||||||
thiserror = { version = "1.0" }
|
thiserror = { version = "1.0" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
snarkos-utilities = { path = "../../snarkOS/utilities", version = "0.8.0" }
|
snarkos-utilities = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9" }
|
||||||
|
@ -5,11 +5,11 @@ authors = ["The Aleo Team <hello@aleo.org>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
snarkos-algorithms = { path = "../../snarkOS/algorithms", version = "0.8.0", default-features = false }
|
snarkos-algorithms = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-curves = { path = "../../snarkOS/curves", version = "0.8.0", default-features = false }
|
snarkos-curves = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-errors = { path = "../../snarkOS/errors", version = "0.8.0", default-features = false }
|
snarkos-errors = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-gadgets = { path = "../../snarkOS/gadgets", version = "0.8.0", default-features = false }
|
snarkos-gadgets = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-models = { path = "../../snarkOS/models", version = "0.8.0", default-features = false }
|
snarkos-models = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
|
|
||||||
from-pest = { version = "0.3.1" }
|
from-pest = { version = "0.3.1" }
|
||||||
pest = { version = "2.0" }
|
pest = { version = "2.0" }
|
||||||
|
@ -8,8 +8,8 @@ edition = "2018"
|
|||||||
leo-ast = { path = "../ast", version = "0.1.0" }
|
leo-ast = { path = "../ast", version = "0.1.0" }
|
||||||
leo-inputs = { path = "../leo-inputs", version = "0.1.0" }
|
leo-inputs = { path = "../leo-inputs", version = "0.1.0" }
|
||||||
|
|
||||||
snarkos-errors = { path = "../../snarkOS/errors", version = "0.8.0", default-features = false }
|
snarkos-errors = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
snarkos-models = { path = "../../snarkOS/models", version = "0.8.0", default-features = false }
|
snarkos-models = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", rev = "c7a56d9", default-features = false }
|
||||||
|
|
||||||
pest = { version = "2.0" }
|
pest = { version = "2.0" }
|
||||||
thiserror = { version = "1.0" }
|
thiserror = { version = "1.0" }
|
||||||
|
Loading…
Reference in New Issue
Block a user