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);