Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ trim_trailing_whitespace = true
[*.{md,toml,yml,yaml,nix,html,css}]
indent_size = 2

[{Makefile,**/CMakeLists.txt}]
[{**/Makefile,**/CMakeLists.txt}]
indent_style = tab
31 changes: 31 additions & 0 deletions .github/workflows/actions/docs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Documentation
description: Build the documentation for Mata.
inputs:
os:
description: "Operating system to run on"
required: false
default: ubuntu-latest
python-version:
description: "Python version to use"
required: false
default: "3.13"
runs:
using: "composite"
steps:
- name: Setup Python environment
uses: ./.github/workflows/actions/setup-python
with:
os: ${{ inputs.os }}
python-version: ${{ inputs.python-version }}
- name: Install Python Dependencies for documentation build
shell: bash
run: |
python -m pip install --upgrade pip
make -C docs init
- uses: ssciwr/doxygen-install@v1
- name: Compile the documentation
shell: bash
run: |
python -m pip install --upgrade pip
make docs
make -C docs/ html
21 changes: 15 additions & 6 deletions .github/workflows/actions/setup-python/action.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
name: Setup Python environment
description: Setup Python environment for running workflows.
inputs:
os:
description: "Operating system to run on"
required: false
default: ubuntu-latest
python-version:
description: "Python version to run"
required: true
runs:
using: "composite"
steps:
- name: Add some version to VERSION file (since it cannot be inferred from git)
shell: sh
shell: bash
run: echo "0.0.0" > VERSION
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: "pip"
- name: Install Python Dependencies
shell: sh
shell: bash
run: |
python -m pip install --upgrade pip
make -C bindings/python init
- name: Install Unix dependencies
shell: sh
- name: Building MacOS dependencies
if: ${{ inputs.os == 'macos-latest' }}
shell: bash
run: brew install graphviz
- name: Building Unix dependencies
if: ${{ inputs.os == 'ubuntu-latest' }}
shell: bash
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y graphviz graphviz-dev
sudo apt -qq update
sudo apt -qq install -y graphviz graphviz-dev
2 changes: 1 addition & 1 deletion .github/workflows/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ runs:
- name: Building Unix dependencies
if: ${{ inputs.os == 'ubuntu-latest' }}
shell: sh
run: sudo apt-get install -y build-essential lcov gcovr xdg-utils
run: sudo apt install -y build-essential lcov gcovr xdg-utils
103 changes: 75 additions & 28 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.base_ref }}
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.base.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.base.sha || github.event.pull_request.base_ref || github.sha }}
- uses: ./.github/workflows/actions/setup
with:
os: ${{ matrix.os }}
Expand All @@ -27,7 +30,12 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: ./.github/workflows/actions/setup
with:
os: ${{ matrix.os }}
Expand All @@ -41,7 +49,12 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: ./.github/workflows/actions/setup
with:
os: ${{ matrix.os }}
Expand All @@ -55,27 +68,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [
#ubuntu-latest,
macos-latest]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.base_ref }}
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.base.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.base.sha || github.event.pull_request.base_ref || github.sha }}
- uses: ./.github/workflows/actions/setup
with:
os: ${{ matrix.os }}
- uses: ./.github/workflows/actions/compile
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
cache: "pip"
- name: Install Python Dependencies
shell: sh
run: |
python -m pip install --upgrade pip
pip install -r tests-integration/requirements.txt
pip install ./tests-integration/
- name: Test the library
run: make test-performance
- name: Cache performance results
Expand All @@ -90,25 +104,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [
#ubuntu-latest,
macos-latest]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: ./.github/workflows/actions/setup
with:
os: ${{ matrix.os }}
- uses: ./.github/workflows/actions/compile
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
python-version: 3.13
cache: "pip"
- name: Install Python Dependencies
shell: sh
run: |
python -m pip install --upgrade pip
pip install -r tests-integration/requirements.txt
pip install ./tests-integration/
- name: Test the library
run: make test-performance
- name: Cache performance results
Expand All @@ -123,16 +140,19 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [
#ubuntu-latest,
macos-latest]
os: [ubuntu-latest, macos-latest]
needs: [run-test-performance, run-test-performance-base]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
cache: "pip"
- name: Install Python Dependencies
shell: sh
Expand All @@ -146,17 +166,19 @@ jobs:
./tests-integration/results/corr-single-param-jobs.csv
./tests-integration/results/corr-double-param-jobs.csv
key: performance-tests-target-${{ runner.os }}-${{ github.sha }}
- run: mv ./tests-integration/results/corr-single-param-jobs.csv single-param-target.csv
- run: mv ./tests-integration/results/corr-double-param-jobs.csv double-param-target.csv
- run: |
mv ./tests-integration/results/corr-single-param-jobs.csv single-param-target.csv
mv ./tests-integration/results/corr-double-param-jobs.csv double-param-target.csv
- name: Restore baseline profiles
uses: actions/cache/restore@v4
with:
path: |
./tests-integration/results/corr-single-param-jobs.csv
./tests-integration/results/corr-double-param-jobs.csv
key: performance-tests-baseline-${{ runner.os }}-${{ github.sha }}
- run: mv ./tests-integration/results/corr-single-param-jobs.csv single-param-baseline.csv
- run: mv ./tests-integration/results/corr-double-param-jobs.csv double-param-baseline.csv
- run: |
mv ./tests-integration/results/corr-single-param-jobs.csv single-param-baseline.csv
mv ./tests-integration/results/corr-double-param-jobs.csv double-param-baseline.csv
- name: LOOK HERE for Comparison of operations accepting single automaton as parameters
run: python3 tests-integration/scripts/compare_profiles.py single-param-target.csv single-param-baseline.csv
- name: LOOK HERE for Comparison of operations accepting two automata as parameters
Expand Down Expand Up @@ -200,7 +222,12 @@ jobs:
runs-on: ubuntu-latest
needs: run-tests
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: ./.github/workflows/actions/setup
- name: Build library for coverage
run: make coverage
Expand All @@ -218,7 +245,12 @@ jobs:
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: ./.github/workflows/actions/setup
- name: Check formatting using treefmt through Nix
run: |
Expand All @@ -230,3 +262,18 @@ jobs:
else
echo "Code is properly formatted."
fi
build-docs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: ./.github/workflows/actions/docs
with:
os: ${{ matrix.os }}
20 changes: 14 additions & 6 deletions .github/workflows/python-binding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout latest version
uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Python environment
uses: ./.github/workflows/actions/setup-python
with:
Expand All @@ -44,10 +48,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout latest version
uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Python environment
uses: ./.github/workflows/actions/setup-python
with:
Expand Down
Loading
Loading