Skip to content

refactor: Move epsilon_closure and nfa_to_dfa from Lexer class to Dfa class. #651

refactor: Move epsilon_closure and nfa_to_dfa from Lexer class to Dfa class.

refactor: Move epsilon_closure and nfa_to_dfa from Lexer class to Dfa class. #651

Workflow file for this run

name: "Build"
on:
pull_request:
paths:
- ".github/workflows/build.yaml"
- "CMakeLists.txt"
- "examples/**/*"
- "src/**/*"
- "tests/**/*"
- "tools/deps-install/ubuntu/**/*"
push:
paths:
- ".github/workflows/build.yaml"
- "CMakeLists.txt"
- "examples/**/*"
- "src/**/*"
- "tests/**/*"
- "tools/deps-install/ubuntu/**/*"
workflow_call:
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os: ["macos-latest", "ubuntu-latest"]
build_type: ["Debug", "Release"]
runs-on: "${{matrix.os}}"
steps:
- uses: "actions/checkout@v4"
- name: "Install Catch2 on macOS"
if: "matrix.os == 'macos-latest'"
run: "brew install catch2"
- name: "Install Catch2 on Ubuntu"
if: "matrix.os == 'ubuntu-latest'"
run: "./tools/deps-install/ubuntu/install-catch2.sh 3.6.0"
- name: "Build Executables"
run: |-
cmake -B ./build -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
cmake --build ./build --config ${{matrix.build_type}}
cmake --install ./build --prefix ./install
cmake -S examples -B ./examples/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
cmake --build ./examples/build --config ${{matrix.build_type}}
- name: "Run Unit Tests"
run: "ctest --test-dir ./build"