Merge pull request #193 from nevillegrech/shared_public_function #339
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-Tests | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| pull_request: | |
| push: | |
| branches: | |
| - 'master' | |
| env: | |
| REGISTRY: ghcr.io | |
| # github.repository as nevillegrech/gigahorse-toolchain | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| test_souffle23: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| checks: write | |
| pull-requests: write | |
| container: | |
| image: ghcr.io/nevillegrech/gigahorse-toolchain-deps-souffle23:latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Test Souffle | |
| run: souffle --version | |
| - name: Build Souffle addon | |
| run: cd $GITHUB_WORKSPACE/souffle-addon && make && cd $GITHUB_WORKSPACE | |
| - name: Run gigahorse help | |
| run: ./gigahorse.py --help | |
| - name: Run gigahorse example | |
| run: ./gigahorse.py examples/long_running.hex -i --disable_inline | |
| - name: Run tests | |
| run: pytest -v test_gigahorse.py --junitxml=test-results.xml | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() | |
| with: | |
| files: test-results.xml | |
| check_name: "Test Results (Souffle 2.3)" | |
| test_souffle24: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| checks: write | |
| pull-requests: write | |
| container: | |
| image: ghcr.io/nevillegrech/gigahorse-toolchain-deps-souffle24:latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Test Souffle | |
| run: souffle --version | |
| - name: Build Souffle addon | |
| run: cd $GITHUB_WORKSPACE/souffle-addon && make && cd $GITHUB_WORKSPACE | |
| - name: Run gigahorse help | |
| run: ./gigahorse.py --help | |
| - name: Run gigahorse example | |
| run: ./gigahorse.py examples/long_running.hex -i --disable_inline | |
| - name: Run tests | |
| run: pytest -v test_gigahorse.py --junitxml=test-results.xml | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() | |
| with: | |
| files: test-results.xml | |
| check_name: "Test Results (Souffle 2.4)" | |
| mypy: | |
| runs-on: ubuntu-latest | |
| name: Mypy | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install mypy | |
| - name: mypy gigahorse | |
| run: | | |
| mypy gigahorse.py | |
| - name: mypy visualizeout.py | |
| run: | | |
| mypy clients/visualizeout.py | |
| - name: mypy rest | |
| run: | | |
| mypy src/*.py clientlib/*.py |