From 040608bb6e950ef99b0a1ca21f0ba6dfd251908e Mon Sep 17 00:00:00 2001 From: "sinu.eth" <65924192+sinui0@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:51:34 +0900 Subject: [PATCH] fix: notary cd (#538) --- .github/scripts/build-server.sh | 5 ++--- .github/workflows/cd-server.yml | 8 +------- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 8 ++++---- Cargo.toml | 4 ++++ 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/scripts/build-server.sh b/.github/scripts/build-server.sh index 43fe1a72e..16ebcf0eb 100755 --- a/.github/scripts/build-server.sh +++ b/.github/scripts/build-server.sh @@ -6,8 +6,7 @@ environment=$1 aws s3 sync .git s3://tlsn-deploy/$environment/.git --delete -cd notary/server -cargo build --release -aws s3 cp ../target/release/notary-server s3://tlsn-deploy/$environment/ +cargo build -p notary-server --release +aws s3 cp ./target/release/notary-server s3://tlsn-deploy/$environment/ exit 0 diff --git a/.github/workflows/cd-server.yml b/.github/workflows/cd-server.yml index db602631d..17ac3657f 100644 --- a/.github/workflows/cd-server.yml +++ b/.github/workflows/cd-server.yml @@ -50,7 +50,7 @@ jobs: with: ref: ${{ github.ref }} # Have to specify '(notary)', as we are using matrix for build_and_test job in ci.yml, else it will fail, more details [here](https://github.com/lewagon/wait-on-check-action#check-name) - check-name: 'Build and test (notary)' + check-name: 'Build and test' repo-token: ${{ secrets.GITHUB_TOKEN }} # How frequent (in seconds) this job will call GitHub API to check the status of the job specified at 'check-name' wait-interval: 60 @@ -71,12 +71,6 @@ jobs: uses: dtolnay/rust-toolchain@stable with: toolchain: stable - components: clippy - - - name: Use caching - uses: Swatinem/rust-cache@v2.5.0 - with: - workspaces: ${{ matrix.package }} -> target - name: Cargo build run: | diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 98acc26e4..2aecb4289 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -49,4 +49,4 @@ jobs: push: true tags: ${{ steps.meta-notary-server.outputs.tags }} labels: ${{ steps.meta-notary-server.outputs.labels }} - file: ./notary/server/notary-server.Dockerfile + file: ./crates/notary/server/notary-server.Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5c00fc66..e6cd11a4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,12 +47,12 @@ jobs: toolchain: stable components: clippy - - name: Clippy - run: cargo clippy --all-features --all-targets -- -D warnings - - name: Use caching uses: Swatinem/rust-cache@v2.7.3 + - name: Clippy + run: cargo clippy --all-features --all-targets -- -D warnings + - name: Build run: cargo build --all-targets @@ -95,4 +95,4 @@ jobs: run: echo "127.0.0.1 tlsnotaryserver.io" | sudo tee -a /etc/hosts - name: Run integration tests - run: cargo test --release --workspace --exclude tlsn-tls-client --exclude tlsn-tls-core -- --include-ignored + run: cargo test --profile tests-integration --workspace --exclude tlsn-tls-client --exclude tlsn-tls-core -- --include-ignored diff --git a/Cargo.toml b/Cargo.toml index 3372f21af..8d6952636 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,10 @@ members = [ ] resolver = "2" +[profile.tests-integration] +inherits = "release" +opt-level = 1 + [workspace.dependencies] notary-client = { path = "crates/notary/client" } notary-server = { path = "crates/notary/server" }