Compare commits

...

6 Commits

Author SHA1 Message Date
William Bell
fc6f41d89b fix release.yml 2025-08-15 21:30:01 +01:00
William Bell
6a7ce72eb7 fix cmake 2025-08-15 21:23:08 +01:00
William Bell
f84e5429a5 fix release.yml 2025-08-15 21:16:48 +01:00
William Bell
f4c7294267 fix release.yml 2025-08-15 21:14:17 +01:00
William Bell
be4b04a286 fix release.yml 2025-08-15 20:59:49 +01:00
William Bell
9d11122e93 fix conanfile.py 2025-08-15 20:50:58 +01:00
3 changed files with 30 additions and 24 deletions

View File

@@ -99,15 +99,14 @@ jobs:
path: ${{ env.TAR_NAME }}
build-windows:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install build tools
run: choco install winflexbison mingw -y
shell: pwsh
- name: Install MinGW-w64 for cross-compilation
run: sudo apt-get update && sudo apt-get install -y mingw-w64
- name: Setup Python
uses: actions/setup-python@v4
@@ -119,31 +118,27 @@ jobs:
python -m pip install --upgrade pip
pip install conan
conan profile detect
shell: pwsh
- name: Build with MinGW
- name: Build Windows with MinGW
run: |
conan install . `
-s compiler=gcc `
-s compiler.version=13 `
-s compiler.libcxx=libstdc++11 `
-s arch=x86_64 `
-s os=Windows `
conan install . \
-s os=Windows \
-s compiler=gcc \
-s compiler.version=13 \
-s compiler.libcxx=libstdc++11 \
-s arch=x86_64 \
--build=missing
conan build .
shell: pwsh
- name: Package
- name: Package Windows build
run: |
$TAG = $env:GITHUB_REF -replace 'refs/tags/', ''
$ARCH = if ([Environment]::Is64BitOperatingSystem) { 'x64' } else { 'x86' }
$FOLDER = "chloride-$TAG-windows-$ARCH"
$ZIP = "$FOLDER.zip"
Rename-Item build\bin $FOLDER
Copy-Item LICENSE.txt $FOLDER
Compress-Archive -Path $FOLDER -DestinationPath $ZIP
echo "TAR_NAME=$ZIP" >> $env:GITHUB_ENV
shell: pwsh
TAG=${GITHUB_REF##refs/tags/}
FOLDER="chloride-$TAG-windows-x64"
ZIP="$FOLDER.zip"
mv build/bin "$FOLDER"
cp LICENSE.txt "$FOLDER"
zip -r "$ZIP" "$FOLDER"
echo "TAR_NAME=$ZIP" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v4

View File

@@ -51,7 +51,17 @@ set_target_properties(argon PROPERTIES
find_package(BDWgc REQUIRED)
find_package(gmp REQUIRED)
target_compile_options(argon PRIVATE -O3 -Wall -Wextra -Wno-unused-function -s)
target_compile_options(argon PRIVATE -O3 -Wall -s)
if(MSVC)
# Disable warning C4061 (enum in switch not handled)
target_compile_options(argon PRIVATE /wd4061)
# Disable Spectre mitigation warning C5045
target_compile_options(argon PRIVATE /wd5045)
# Optionally, remove "treat warnings as errors" if enabled
# target_compile_options(argon PRIVATE /WX-) # uncomment if you previously used /WX
endif()
if(NOT APPLE)
target_link_options(argon PRIVATE -static)
endif()

View File

@@ -30,6 +30,7 @@ class ArgonConan(ConanFile):
self.folders.generators = "build"
def generate(self):
os.environ["CONAN_NON_INTERACTIVE"] = "1"
tc = CMakeToolchain(self)
if os.name == "nt": # Windows