From 80309637546cdbfeb650764d07f195d13f565941 Mon Sep 17 00:00:00 2001 From: John Cairns Date: Sat, 20 Jan 2024 17:39:54 -0600 Subject: [PATCH] 30: remove anvil from pages build - move abi to root of lib - disable incremental build for ci --- .github/workflows/ci-image.yml | 1 + .github/workflows/github-pages.yml | 14 ++++++++------ .vscode/tasks.json | 2 +- Dockerfile | 3 ++- lib/{src => }/abi/DIDRegistry.json | 0 lib/src/resolver/did_registry.rs | 2 +- 6 files changed, 13 insertions(+), 9 deletions(-) rename lib/{src => }/abi/DIDRegistry.json (100%) diff --git a/.github/workflows/ci-image.yml b/.github/workflows/ci-image.yml index 5ea4440..94eaae9 100644 --- a/.github/workflows/ci-image.yml +++ b/.github/workflows/ci-image.yml @@ -31,3 +31,4 @@ jobs: push: false build-args: | VERSION=latest + CARGO_INCREMENTAL=0 diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index e01c259..be9e98e 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -1,11 +1,14 @@ name: GitHub Pages on: - push: + workflow_run: + workflows: ["Build Dev Image CI"] branches: ["main"] + types: + - completed # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read @@ -37,12 +40,11 @@ jobs: profile: minimal override: true - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - name: Run tests + env: + CARGO_INCREMENTAL: 0 run: | - cargo test + cargo test --workspace --all-features --tests tests id: test - name: Invoke cargo doc diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 3ef2946..00c8265 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -57,7 +57,7 @@ { "label": "test", "type": "shell", - "command": "cargo test", + "command": "cargo test --workspace --all-features --no-fail-fast", "options": { "cwd": "${workspaceFolder}" }, diff --git a/Dockerfile b/Dockerfile index 90ac1b3..b041229 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM ghcr.io/xmtp/rust:latest - +ARG CARGO_INCREMENTAL ARG PROJECT=didethresolver WORKDIR /workspaces/${PROJECT} @@ -14,6 +14,7 @@ COPY --from=ghcr.io/xmtp/foundry:latest /usr/local/bin/anvil /usr/local/bin/anvi COPY --chown=xmtp:xmtp . . +ENV CARGO_INCREMENTAL=${CARGO_INCREMENTAL:-1} RUN cargo fmt --check --all RUN cargo clippy --all-features --no-deps -- -D warnings RUN cargo test --workspace --all-features diff --git a/lib/src/abi/DIDRegistry.json b/lib/abi/DIDRegistry.json similarity index 100% rename from lib/src/abi/DIDRegistry.json rename to lib/abi/DIDRegistry.json diff --git a/lib/src/resolver/did_registry.rs b/lib/src/resolver/did_registry.rs index aea339f..f32f253 100644 --- a/lib/src/resolver/did_registry.rs +++ b/lib/src/resolver/did_registry.rs @@ -6,7 +6,7 @@ pub use self::did_registry::*; abigen!( DIDRegistry, - "./src/abi/DIDRegistry.json", + "./abi/DIDRegistry.json", derives(serde::Serialize, serde::Deserialize) );