Merge pull request #562 from avinxshKD/fix/shm-ci-checks #457
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| branches: [main, dev] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Check formatting | |
| run: ruff format --check . | |
| - name: Lint | |
| run: ruff check . --output-format=github | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-ci.txt | |
| - name: Run tests | |
| run: | | |
| pytest --tb=short -q \ | |
| --cov=concore_cli --cov=concore_base \ | |
| --cov-report=term-missing \ | |
| --ignore=measurements/ \ | |
| --ignore=0mq/ \ | |
| --ignore=ratc/ \ | |
| --ignore=linktest/ | |
| julia-test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| julia-version: ['1.10', '1'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - uses: julia-actions/setup-julia@v3 | |
| with: | |
| version: ${{ matrix.julia-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-ci.txt | |
| - name: Run Julia tests | |
| run: julia --color=yes tests/julia/runtests.jl | |
| shell: bash | |
| java-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Download jeromq | |
| run: | | |
| curl -fsSL -o jeromq.jar https://repo1.maven.org/maven2/org/zeromq/jeromq/0.6.0/jeromq-0.6.0.jar | |
| - name: Compile Java tests | |
| run: | | |
| javac -cp jeromq.jar ConcoreJavaRuntimeCore.java concore.java concoredocker.java TestLiteralEval.java TestConcoredockerApi.java TestConcoreApi.java | |
| - name: Run Java tests | |
| run: | | |
| java -cp .:jeromq.jar TestLiteralEval | |
| java -cp .:jeromq.jar TestConcoredockerApi | |
| java -cp .:jeromq.jar TestConcoreApi | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check if Dockerfile.py changed | |
| uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| dockerfile: | |
| - 'Dockerfile.py' | |
| - 'requirements.txt' | |
| - name: Validate Dockerfile build | |
| if: steps.filter.outputs.dockerfile == 'true' | |
| run: docker build -f Dockerfile.py -t concore-py-test . | |
| cpp-shm-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install g++ | |
| run: sudo apt-get update && sudo apt-get install -y g++ | |
| - name: Parse concore.hpp standalone | |
| # -fsyntax-only parses concore.hpp without producing an object | |
| # file, so we don't need system SHM semaphores or shared-memory | |
| # segments to succeed. This catches header-level regressions on | |
| # the SHM transport (issue #195) without needing g++ at runtime. | |
| run: g++ -std=c++17 -Wall -Wextra -I. -fsyntax-only tests/test_shm_cpp_smoke.cpp |