Skip to content

Commit 78e5eee

Browse files
committed
CI tests: do not utilize CI variable
It is a bit dirty to unset the CI env var since we may need it for other uses as well, replace with explicit NO_CUDA_DEV (just set in ccpp.yml).
1 parent 0a5dd63 commit 78e5eee

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎.github/workflows/ccpp.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
-DENABLE_FPNGE=ON"
8989
cmake $COMMON_FLAGS -Bbuild .
9090
cmake --build build --parallel
91-
ctest -R unittests --test-dir build --output-on-failure
91+
NO_CUDA_DEV=1 ctest -R unittests --test-dir build --output-on-failure
9292
cmake --install build --prefix GPUJPEG
9393
tar_name=${{ matrix.tar_name }}
9494
tar_name=${tar_name%.xz}

‎.github/workflows/simulated-gpu.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
-DCMAKE_CUDA_RUNTIME_LIBRARY=Shared -DENABLE_FPNGE=ON
3939
cmake --build build --parallel
4040
- name: Unit and regression tests on the simulated GPU
41-
run: env -u CI ctest --test-dir build --output-on-failure
41+
run: ctest --test-dir build --output-on-failure

‎test/unit/run_tests.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ static void subsampling_name_test() {
4040
static void encode_gpu_mem_as_cpu() {
4141
printf("testing %s: ", __func__);
4242

43-
if (getenv("CI")) {
44-
// no CUDA device in CI
43+
if (getenv("NO_CUDA_DEV")) {
4544
fprintf(stderr, "--\n");
4645
return;
4746
}

‎test/unit/test_gh_95.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ void
5252
test_gh_95()
5353
{
5454
fprintf(stderr, "testing stat struct validity on CPU/GPU interleave: ");
55-
if (getenv("CI")) {
56-
// no CUDA device in CI
55+
if (getenv("NO_CUDA_DEV")) {
5756
fprintf(stderr, "--\n");
5857
return;
5958
}

0 commit comments

Comments
 (0)