Compare commits

...

8 Commits

Author SHA1 Message Date
William Bell
5fb15b476f fix release 2025-08-16 00:26:26 +01:00
William Bell
d1a455dbbe fix release.yml 2025-08-16 00:07:10 +01:00
William Bell
a81640747d fix release.yml 2025-08-15 22:07:25 +01:00
William Bell
4a1ed23f96 fix release.yml 2025-08-15 22:05:57 +01:00
William Bell
eb36d02fcb fix release.yml 2025-08-15 22:03:23 +01:00
William Bell
7b3a1e1835 fix release.yml 2025-08-15 21:52:16 +01:00
William Bell
8e53579682 fix release.yml 2025-08-15 21:36:51 +01:00
William Bell
0d8f262185 this thing is really annoying me now 2025-08-15 21:34:31 +01:00
3 changed files with 44 additions and 45 deletions

View File

@@ -99,46 +99,42 @@ jobs:
path: ${{ env.TAR_NAME }}
build-windows:
runs-on: ubuntu-latest
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- 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
- uses: msys2/setup-msys2@v2
with:
python-version: '3.x'
msystem: MINGW64
update: true
install: >
base-devel
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
mingw-w64-x86_64-gmp
mingw-w64-x86_64-gc
- name: Install Conan
- name: Build Project
run: |
python -m pip install --upgrade pip
pip install conan
conan profile detect
make
- name: Build Windows with MinGW
- name: Package
run: |
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 .
- name: Package Windows build
run: |
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
$TAG = $env:GITHUB_REF -replace 'refs/tags/', ''
$ARCH = if ([Environment]::Is64BitOperatingSystem) { 'x64' } else { 'x86' }
$FOLDER = "chloride-$TAG-windows-$ARCH"
$ZIP = "$FOLDER.zip"
Rename-Item bin $FOLDER
Copy-Item LICENSE.txt $FOLDER
Compress-Archive -Path $FOLDER -DestinationPath $ZIP
echo "TAR_NAME=$ZIP" >> $env:GITHUB_ENV
shell: pwsh
- name: Upload artifact
uses: actions/upload-artifact@v4

View File

@@ -51,17 +51,7 @@ set_target_properties(argon PROPERTIES
find_package(BDWgc REQUIRED)
find_package(gmp REQUIRED)
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()
target_compile_options(argon PRIVATE -O3 -Wall -Wextra -Wno-unused-function -s)
if(NOT APPLE)
target_link_options(argon PRIVATE -static)
endif()

View File

@@ -2,18 +2,31 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Default FLEX tool
BINARY = bin/argon
FLEX_TOOL = flex
CFILES = external/xxhash/xxhash.c external/cwalk/src/cwalk.c external/libdye/src/dye.c $(shell find src -name '*.c')
# If target is "windows", override FLEX_TOOL
ifeq ($(MAKECMDGOALS),windows)
BINARY = bin/argon.exe
FLEX_TOOL = win_flex
CFILES = external/xxhash/xxhash.c external/cwalk/src/cwalk.c external/libdye/src/dye.c $(shell dir /b /s src\*.c)
endif
LEXER_SRC = src/lexer/lex.l
LEXER_C = src/lexer/lex.yy.c
LEXER_H = src/lexer/lex.yy.h
CFILES = external/xxhash/xxhash.c external/cwalk/src/cwalk.c external/libdye/src/dye.c $(shell find src -name '*.c')
CFLAGS = $(ARCHFLAGS) -lm -lgc -lgmp -Wall -Wextra -Wno-unused-function -Werror=unused-result -Iexternal/cwalk/include -Iexternal/libdye/include
BINARY = bin/argon
all: $(BINARY)
windows: $(BINARY)
$(LEXER_C) $(LEXER_H): $(LEXER_SRC)
flex --header-file=$(LEXER_H) -o $(LEXER_C) $(LEXER_SRC)
$(FLEX_TOOL) --header-file=$(LEXER_H) -o $(LEXER_C) $(LEXER_SRC)
$(BINARY): $(CFILES) $(LEXER_C) $(LEXER_H)
mkdir -p bin