From 630a85df718e383b06bb5956bfae602ecfb4c113 Mon Sep 17 00:00:00 2001 From: Clo91eaf Date: Fri, 10 May 2024 12:54:10 +0800 Subject: [PATCH] [ci] fix ci --- .github/workflows/test.yml | 2 ++ build.rs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3f4867..8a3cccd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,6 +8,8 @@ jobs: am-test: name: am-test runs-on: ubuntu-latest + env: + CI: true steps: - name: checkout uses: actions/checkout@v2 diff --git a/build.rs b/build.rs index fbfb4cd..98fbdff 100644 --- a/build.rs +++ b/build.rs @@ -19,6 +19,12 @@ fn main() { return; } + // if we are running tests in CI, we don't need to generate the verilator code + if std::env::var("CI").is_ok() { + println!("cargo:test=1"); + return; + } + let out_dir = env::var("OUT_DIR").unwrap(); let out_dir = PathBuf::from(out_dir); let _ = fs::remove_dir_all(&out_dir);