Skip to content

Commit

Permalink
Speed up c, python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jun 27, 2024
1 parent 72a0044 commit 3237a78
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
# compiler: ["llvm", "gcc"]
# # compiler targets (ideally): clang, gcc, MSVCC, pcc, tcc, icc,
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
os: [ubuntu-latest, windows-latest, macos-latest, macos-13, ubuntu-20.04]
# include:
# - os: windows-latest
# compiler: msvc
Expand All @@ -39,7 +39,9 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache-dependency-path: c/requirements.txt
cache-dependency-path: |
c/requirements.txt
python/requirements.txt
# - name: Setup Cpp ${{ matrix.compiler }}
# uses: aminya/setup-cpp@v1
Expand All @@ -53,13 +55,17 @@ jobs:
# with:
# platform: x64

- name: Run tests (windows + linux)
if: ${{ !contains(matrix.os, 'macos') }}
run: make ctest
- name: Run tests (linux)
if: ${{ contains(matrix.os, 'ubuntu') }}
run: make ctest${{ matrix.os == 'ubuntu-latest' && '_auto' }}

- name: Run tests (windows)
if: ${{ contains(matrix.os == 'windows') }}
run: make ctest_auto

- name: Run tests (macos)
if: ${{ contains(matrix.os, 'macos') }}
run: make ctest
run: make ctest_auto
env:
NO_OPTIONAL_TESTS: true
COMPILER_OVERRIDE: clang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ jobs:
c/requirements.txt
- name: Run tests
run: make pytest LINT=false
run: make pytest${{ (!contains(matrix.os, 'latest') || matrix.version != '3.12') && '_auto LINT=false' }}
1 change: 1 addition & 0 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ endif
endif

test_%: dependencies
cd ../python; $(MAKE) dependencies $(MFLAGS)
$(PY) -m pytest -vl -n$* test_euler.py

test: dependencies
Expand Down

0 comments on commit 3237a78

Please sign in to comment.