Compare commits

...

5 Commits

Author SHA1 Message Date
William Bell
436f30330b fix copying license 2025-08-15 19:45:12 +01:00
William Bell
5381967ed6 fix conanfile 2025-08-15 19:40:41 +01:00
William Bell
6f84a4a485 fix conan file 2025-08-15 19:37:38 +01:00
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 26 additions and 12 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:
@@ -96,7 +111,7 @@ jobs:
FOLDER_NAME="chloride-$TAG-$OS-$ARCH" FOLDER_NAME="chloride-$TAG-$OS-$ARCH"
TAR_NAME="$FOLDER_NAME.tar.gz" TAR_NAME="$FOLDER_NAME.tar.gz"
mv build/bin "$FOLDER_NAME" mv build/bin "$FOLDER_NAME"
cp LICENSE "$FOLDER_NAME" cp LICENSE.txt "$FOLDER_NAME"
tar -czf "$TAR_NAME" "$FOLDER_NAME" tar -czf "$TAR_NAME" "$FOLDER_NAME"
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
shell: bash shell: bash
@@ -109,7 +124,7 @@ jobs:
$FOLDER_NAME = "chloride-$TAG-windows-$ARCH" $FOLDER_NAME = "chloride-$TAG-windows-$ARCH"
$TAR_NAME = "$FOLDER_NAME.zip" $TAR_NAME = "$FOLDER_NAME.zip"
Rename-Item build\bin $FOLDER_NAME Rename-Item build\bin $FOLDER_NAME
Copy-Item LICENSE $FOLDER_NAME Copy-Item LICENSE.txt $FOLDER_NAME
Compress-Archive -Path $FOLDER_NAME -DestinationPath $TAR_NAME Compress-Archive -Path $FOLDER_NAME -DestinationPath $TAR_NAME
echo "TAR_NAME=$TAR_NAME" >> $env:GITHUB_ENV echo "TAR_NAME=$TAR_NAME" >> $env:GITHUB_ENV
shell: pwsh shell: pwsh

View File

@@ -5,6 +5,7 @@
from conan import ConanFile from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
from shutil import which from shutil import which
import os
class ArgonConan(ConanFile): class ArgonConan(ConanFile):
name = "argon" name = "argon"
@@ -31,18 +32,16 @@ class ArgonConan(ConanFile):
def generate(self): def generate(self):
tc = CMakeToolchain(self) tc = CMakeToolchain(self)
# Try to find flex in system PATH first if os.name == "nt": # Windows
flex_path = which("flex") flex_path = which("win_flex") or which("win_flex.exe")
# 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("win_flex not found in PATH. Install winflexbison via choco.")
if not flex_dep: else:
raise Exception("Flex not found in system PATH and not declared as build requirement") flex_path = which("flex")
flex_path = join(flex_dep.package_folder, "bin", "flex") if not flex_path:
raise Exception("Flex not found in system PATH. Please install flex on Linux/macOS.")
tc.variables["FLEX_EXECUTABLE"] = flex_path tc.variables["FLEX_EXECUTABLE"] = flex_path
tc.generate() tc.generate()
def build(self): def build(self):