Compare commits

..

2 Commits

Author SHA1 Message Date
William Bell
4b4b1fa777 fix release.yml 2025-08-15 19:22:26 +01:00
William Bell
2b6e785638 fix conan file 2025-08-15 19:19:15 +01:00
2 changed files with 16 additions and 8 deletions

View File

@@ -13,6 +13,21 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
# Linux
- name: Install build tools (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y flex bison
# macOS
- name: Install build tools (macOS)
if: runner.os == 'macOS'
run: brew install flex bison
# Windows
- name: Install build tools (Windows)
if: runner.os == 'Windows'
run: choco install winflexbison -y
shell: pwsh
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:

View File

@@ -31,18 +31,11 @@ class ArgonConan(ConanFile):
def generate(self): def generate(self):
tc = CMakeToolchain(self) tc = CMakeToolchain(self)
# Try to find flex in system PATH first
flex_path = which("flex") flex_path = which("flex")
# If not found, fallback to flex from Conan build requirements
if not flex_path: if not flex_path:
flex_dep = self.dependencies.build.get("flex", None) raise Exception("Flex not found in system PATH. Please install flex on your system.")
if not flex_dep:
raise Exception("Flex not found in system PATH and not declared as build requirement")
flex_path = join(flex_dep.package_folder, "bin", "flex")
tc.variables["FLEX_EXECUTABLE"] = flex_path tc.variables["FLEX_EXECUTABLE"] = flex_path
tc.generate() tc.generate()
def build(self): def build(self):