diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..eb7a399 --- /dev/null +++ b/.github/workflows/cd.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..21f2d1d --- /dev/null +++ b/.github/workflows/ci.yml @@ -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