diff --git a/.github/actions/pytest_run/action.yml b/.github/actions/pytest_run/action.yml index d2500fd30a..1c4deecb57 100644 --- a/.github/actions/pytest_run/action.yml +++ b/.github/actions/pytest_run/action.yml @@ -39,7 +39,7 @@ runs: # Test ndarray folder update (requires parallel tests to avoid clean) touch ${SITE_DIR}/pyccel/stdlib/cwrapper/cwrapper.h python -m pytest -n auto -rXx ${FLAGS} -m c -k test_array_int32_1d_scalar epyccel/test_arrays.py 2>&1 | tee s2_outfile.out - fi + fi shell: ${{ inputs.shell_cmd }} working-directory: ./tests id: pytest_2 diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index cf9af468c1..9ca829c52b 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -42,17 +42,17 @@ jobs: ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata shell: bash - - name: CUDA Version - run: nvcc --version # cuda install check + - name: Install python (setup-python action doesn't work with containers) + uses: ./.github/actions/python_install - name: "Setup" id: token run: | pip install jwt requests - python ci_tools/setup_check_run.py + python ci_tools/setup_check_run.py cuda + - name: CUDA Version + run: nvcc --version # cuda install check - name: Install dependencies uses: ./.github/actions/linux_install - - name: Install python (setup-python action doesn't work with containers) - uses: ./.github/actions/python_install - name: Install Pyccel with tests run: | PATH=${PATH}:$HOME/.local/bin @@ -63,6 +63,7 @@ jobs: - name: Coverage install uses: ./.github/actions/coverage_install - name: Ccuda tests with pytest + id: cuda_pytest uses: ./.github/actions/pytest_run_cuda - name: Collect coverage information continue-on-error: True @@ -76,5 +77,5 @@ jobs: - name: "Post completed" if: always() run: - python ci_tools/complete_check_run.py ${{ steps.f_c_pytest.outcome }} ${{ steps.python_pytest.outcome }} ${{ steps.parallel.outcome }} ${{ steps.valgrind.outcome }} + python ci_tools/complete_check_run.py ${{ steps.cuda_pytest.outcome }} diff --git a/ci_tools/bot_tools/bot_funcs.py b/ci_tools/bot_tools/bot_funcs.py index f8e0972e9f..90ded0e42d 100644 --- a/ci_tools/bot_tools/bot_funcs.py +++ b/ci_tools/bot_tools/bot_funcs.py @@ -41,7 +41,8 @@ 'pyccel_lint': "Pyccel best practices", 'pylint': "Python linting", 'spelling': "Spelling verification", - 'windows': "Unit tests on Windows" + 'windows': "Unit tests on Windows", + 'cuda': "Unit tests on Linux with cuda" } test_dependencies = {'coverage':['linux', 'cuda']} @@ -418,7 +419,7 @@ def is_test_required(self, commit_log, name, key, state): True if the test should be run, False otherwise. """ print("Checking : ", name) - if key in ('linux', 'windows', 'macosx', 'anaconda_linux', 'anaconda_windows', 'coverage', 'intel'): + if key in ('linux', 'windows', 'macosx', 'anaconda_linux', 'anaconda_windows', 'coverage', 'intel', 'cuda'): has_relevant_change = lambda diff: any((f.startswith('pyccel/') or f.startswith('tests/')) #pylint: disable=unnecessary-lambda-assignment and f.endswith('.py') and f != 'pyccel/version.py' for f in diff) diff --git a/ci_tools/devel_branch_tests.py b/ci_tools/devel_branch_tests.py index 1102ef9e92..ec67b6c49a 100644 --- a/ci_tools/devel_branch_tests.py +++ b/ci_tools/devel_branch_tests.py @@ -15,3 +15,4 @@ bot.run_tests(['anaconda_linux'], '3.10', force_run = True) bot.run_tests(['anaconda_windows'], '3.10', force_run = True) bot.run_tests(['intel'], '3.9', force_run = True) + bot.run_tests(['cuda'], '-', force_run = True)