Compare commits

..

11 Commits

Author SHA1 Message Date
William Bell
dd750ab164 fix release.yml 2025-08-15 20:26:54 +01:00
William Bell
922b129250 fix release.yml 2025-08-15 20:18:17 +01:00
William Bell
c2df9c0e83 fix release.yml 2025-08-15 20:15:18 +01:00
William Bell
923503493e fix release.yml 2025-08-15 20:04:55 +01:00
William Bell
686cb08f11 fix conan file 2025-08-15 19:56:54 +01:00
William Bell
1cfb4acda6 fix CMakeLists.txt 2025-08-15 19:52:33 +01:00
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
3 changed files with 48 additions and 16 deletions

View File

@@ -13,6 +13,23 @@ jobs:
runs-on: ${{ matrix.os }}
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 mingw -y
shell: pwsh
- name: Checkout code
uses: actions/checkout@v3
with:
@@ -57,8 +74,20 @@ jobs:
- name: Install dependencies and build (Windows)
if: runner.os == 'Windows'
run: |
conan install . --build=missing
conan build .
conan install . \
-s compiler=gcc \
-s compiler.version=13 \
-s compiler.libcxx=libstdc++11 \
-s arch=x86_64 \
-s os=Windows \
--build=missing
conan install . \
-s compiler=gcc \
-s compiler.version=13 \
-s compiler.libcxx=libstdc++11 \
-s arch=x86_64 \
-s os=Windows \
--build=missing
shell: pwsh
- name: Determine if prerelease (Linux/macOS)
@@ -96,7 +125,7 @@ jobs:
FOLDER_NAME="chloride-$TAG-$OS-$ARCH"
TAR_NAME="$FOLDER_NAME.tar.gz"
mv build/bin "$FOLDER_NAME"
cp LICENSE "$FOLDER_NAME"
cp LICENSE.txt "$FOLDER_NAME"
tar -czf "$TAR_NAME" "$FOLDER_NAME"
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
shell: bash
@@ -109,7 +138,7 @@ jobs:
$FOLDER_NAME = "chloride-$TAG-windows-$ARCH"
$TAR_NAME = "$FOLDER_NAME.zip"
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
echo "TAR_NAME=$TAR_NAME" >> $env:GITHUB_ENV
shell: pwsh
@@ -121,5 +150,7 @@ jobs:
name: Release ${{ github.ref_name }}
body: Automated release based on tag ${{ github.ref_name }}
draft: false
updateOnlyUnreleased: true
replacesArtifacts: true
prerelease: ${{ runner.os == 'Windows' && steps.prerelease_check_win.outputs.prerelease || steps.prerelease_check_unix.outputs.prerelease }}
artifacts: ${{ env.TAR_NAME }}

View File

@@ -52,7 +52,9 @@ find_package(BDWgc REQUIRED)
find_package(gmp REQUIRED)
target_compile_options(argon PRIVATE -O3 -Wall -Wextra -Wno-unused-function -s)
target_link_options(argon PRIVATE -static)
if(NOT APPLE)
target_link_options(argon PRIVATE -static)
endif()
target_link_libraries(argon PRIVATE
BDWgc::BDWgc

View File

@@ -5,6 +5,7 @@
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
from shutil import which
import os
class ArgonConan(ConanFile):
name = "argon"
@@ -31,18 +32,16 @@ class ArgonConan(ConanFile):
def generate(self):
tc = CMakeToolchain(self)
# Try to find flex in system PATH first
flex_path = which("flex")
# If not found, fallback to flex from Conan build requirements
if os.name == "nt": # Windows
flex_path = which("win_flex") or which("win_flex.exe")
if not flex_path:
flex_dep = self.dependencies.build.get("flex", None)
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
raise Exception("win_flex not found in PATH. Install winflexbison via choco.")
else:
flex_path = which("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.replace("\\", "\\\\")
tc.generate()
def build(self):