Compare commits
15 Commits
prerelease
...
prerelease
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d054ece8e2 | ||
|
|
4937942d6e | ||
|
|
82ea92183f | ||
|
|
5fb15b476f | ||
|
|
d1a455dbbe | ||
|
|
a81640747d | ||
|
|
4a1ed23f96 | ||
|
|
eb36d02fcb | ||
|
|
7b3a1e1835 | ||
|
|
8e53579682 | ||
|
|
0d8f262185 | ||
|
|
fc6f41d89b | ||
|
|
6a7ce72eb7 | ||
|
|
f84e5429a5 | ||
|
|
f4c7294267 |
47
.github/workflows/release.yml
vendored
47
.github/workflows/release.yml
vendored
@@ -100,44 +100,29 @@ jobs:
|
|||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: msys2 {0}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install build tools
|
- uses: msys2/setup-msys2@v2
|
||||||
run: choco install winflexbison mingw -y
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
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: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
make
|
||||||
pip install conan
|
|
||||||
conan profile detect
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Build with MinGW
|
|
||||||
run: |
|
|
||||||
conan install . `
|
|
||||||
-s compiler=gcc `
|
|
||||||
-s compiler.version=13 `
|
|
||||||
-s compiler.libcxx=libstdc++11 `
|
|
||||||
-s arch=x86_64 `
|
|
||||||
-s os=Windows `
|
|
||||||
--build=missing
|
|
||||||
conan build . `
|
|
||||||
-s compiler=gcc `
|
|
||||||
-s compiler.version=13 `
|
|
||||||
-s compiler.libcxx=libstdc++11 `
|
|
||||||
-s arch=x86_64 `
|
|
||||||
-s os=Windows `
|
|
||||||
--build=missing
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: |
|
run: |
|
||||||
@@ -145,7 +130,7 @@ jobs:
|
|||||||
$ARCH = if ([Environment]::Is64BitOperatingSystem) { 'x64' } else { 'x86' }
|
$ARCH = if ([Environment]::Is64BitOperatingSystem) { 'x64' } else { 'x86' }
|
||||||
$FOLDER = "chloride-$TAG-windows-$ARCH"
|
$FOLDER = "chloride-$TAG-windows-$ARCH"
|
||||||
$ZIP = "$FOLDER.zip"
|
$ZIP = "$FOLDER.zip"
|
||||||
Rename-Item build\bin $FOLDER
|
Rename-Item bin $FOLDER
|
||||||
Copy-Item LICENSE.txt $FOLDER
|
Copy-Item LICENSE.txt $FOLDER
|
||||||
Compress-Archive -Path $FOLDER -DestinationPath $ZIP
|
Compress-Archive -Path $FOLDER -DestinationPath $ZIP
|
||||||
echo "TAR_NAME=$ZIP" >> $env:GITHUB_ENV
|
echo "TAR_NAME=$ZIP" >> $env:GITHUB_ENV
|
||||||
|
|||||||
25
Makefile
25
Makefile
@@ -2,23 +2,40 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# 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_SRC = src/lexer/lex.l
|
||||||
LEXER_C = src/lexer/lex.yy.c
|
LEXER_C = src/lexer/lex.yy.c
|
||||||
LEXER_H = src/lexer/lex.yy.h
|
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
|
CFLAGS = $(ARCHFLAGS) -lm -lgc -lgmp -Wall -Wextra -Wno-unused-function -Werror=unused-result -Iexternal/cwalk/include -Iexternal/libdye/include
|
||||||
BINARY = bin/argon
|
|
||||||
|
|
||||||
all: $(BINARY)
|
all: $(BINARY)
|
||||||
|
|
||||||
|
|
||||||
$(LEXER_C) $(LEXER_H): $(LEXER_SRC)
|
$(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)
|
$(BINARY): $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) -s
|
gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) -s
|
||||||
|
|
||||||
|
windows: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||||
|
find external/xxhash external/cwalk external/libdye src -name '*.c' > sources.txt
|
||||||
|
mkdir -p bin
|
||||||
|
gcc -O3 -march=native -o $(BINARY) @sources.txt $(CFLAGS)
|
||||||
|
|
||||||
native: $(CFILES) $(LEXER_C) $(LEXER_H)
|
native: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
gcc -O3 -march=native -o $(BINARY) $(CFILES) $(CFLAGS)
|
gcc -O3 -march=native -o $(BINARY) $(CFILES) $(CFLAGS)
|
||||||
|
|||||||
Reference in New Issue
Block a user