Skip to content

Commit

Permalink
update: ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
olivmath committed Feb 7, 2024
1 parent 991567e commit 35c99d5
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Continuous Deployment

on:
push:
tags: ["*.*.*"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release

test:
needs: [build]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Test
run: cargo test

deploy:
needs: [build, test]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Continuous Integration

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build_merkletreers_library:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release

merkle_root:
depends-on: ["build_merkletreers_library"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run merkle_root tests
run: cargo test merkle_root

merkle_proof:
depends-on: ["build_merkletreers_library"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run merkle_proof tests
run: cargo test merkle_proof

merkle_proof_check:
depends-on: ["build_merkletreers_library"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run merkle_proof_check tests
run: cargo test merkle_proof_check

0 comments on commit 35c99d5

Please sign in to comment.