Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fcb934b
port proj to the new hadron
mmomtchev Jul 26, 2025
601f6ad
restore the generate action
mmomtchev Jul 26, 2025
b5d9304
fix syntax
mmomtchev Jul 26, 2025
caafa69
authenticate for SWIG
mmomtchev Jul 26, 2025
c6abdf5
proper xpm format
mmomtchev Jul 26, 2025
c491592
update hadron
mmomtchev Jul 26, 2025
495c658
use the new unviersal hadron options
mmomtchev Jul 26, 2025
ca40ad9
conan should be taking care of MSVC activation
mmomtchev Jul 26, 2025
e2d82c0
use the new universal hadron options everywhere
mmomtchev Jul 26, 2025
541e7f7
try the standalone build
mmomtchev Jul 26, 2025
c045901
default to normal build
mmomtchev Jul 26, 2025
7a355d3
update the conan.lock for standalone builds
mmomtchev Jul 26, 2025
44b522a
add cci.latest to the conan lock
mmomtchev Jul 26, 2025
78df85d
try strawberryperl for openssl
mmomtchev Jul 26, 2025
9b862b5
fix package.json
mmomtchev Jul 26, 2025
1251e8a
fix var name
mmomtchev Jul 26, 2025
8ddcbd4
try openssl with jom
mmomtchev Jul 27, 2025
7dca0bb
try setting compiler.runtime
mmomtchev Jul 27, 2025
bc0f086
use all settings in a single file
mmomtchev Jul 27, 2025
b405fca
drop tool_requires
mmomtchev Jul 27, 2025
42fa525
add a locking workflow
mmomtchev Jul 27, 2025
d12376a
drop jom and update all dependencies
mmomtchev Jul 27, 2025
bb4e7b4
try avoiding OpenSSL
mmomtchev Jul 27, 2025
f921466
try to skip building libtool on Windows
mmomtchev Jul 27, 2025
6e71b7a
add autoconf
mmomtchev Jul 27, 2025
e460b08
try this
mmomtchev Jul 27, 2025
fd7e758
disable the standalone build for now
mmomtchev Sep 1, 2025
7427e60
update hadron
mmomtchev Sep 5, 2025
4297761
update hadron
mmomtchev Sep 7, 2025
40b8d0a
use the published packages
mmomtchev Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
type: boolean
required: true
description: build the native module
standalone:
type: boolean
default: false
description: standalone native build
wasm:
type: boolean
required: true
Expand Down Expand Up @@ -58,9 +62,6 @@ jobs:
with:
node-version: 20

- name: Setup Visual Studio (Windows)
uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
- name: Setup emscripten (WASM)
uses: mymindstorm/setup-emsdk@v14
if: inputs.wasm
Expand All @@ -73,9 +74,9 @@ jobs:
name: swig-generated
path: swig

- name: Install dependencies
- name: Install xpm
run: |
npm install --skip-proj-wasm --skip-proj-native
npm install xpm
npx xpm install

- name: Get conan home
Expand All @@ -91,28 +92,32 @@ jobs:
path: ${{ steps.conan_home.outputs.path }}
key: conan-${{ inputs.id }}

- name: Set the npm build options
shell: bash
run: |
echo "${{ inputs.inline_projdb && 'npm_config_enable_inline_projdb' || 'npm_config_disable_inline_projdb' }}=true" >> $GITHUB_ENV
echo "${{ inputs.enable_tiff && 'npm_config_enable_tiff' || 'npm_config_disable_tiff' }}=true" >> $GITHUB_ENV

- name: Build the native version
shell: bash
run: |
npm install --skip-proj-wasm --build-from-source --verbose --foreground-scripts \
npm install --proj_js_skip_wasm --proj_js_build-from-source \
--verbose --foreground-scripts \
${{ inputs.standalone && '--enable-standalone-build' }} \
${{ inputs.enable_tiff && '--enable-tiff' || '--disable-tiff' }} \
${{ inputs.inline_projdb && '--enable-inline-projdb' || '--disable-inline-projdb' }}
if: inputs.native

- name: Build the WASM version
shell: bash
run: |
npm install --skip-proj-native --build-wasm-from-source --verbose --foreground-scripts \
npm install --proj_js_skip_native --proj_js_build-wasm-from-source \
--verbose --foreground-scripts \
${{ inputs.enable_tiff && '--enable-tiff' || '--disable-tiff' }} \
${{ inputs.inline_projdb && '--enable-inline-projdb' || '--disable-inline-projdb' }}
if: inputs.wasm

- name: Set the npm build options for a custom build
shell: bash
if: inputs.asan || inputs.codecov
run: |
echo "${{ inputs.inline_projdb && 'npm_config_enable_inline_projdb' || 'npm_config_disable_inline_projdb' }}=true" >> $GITHUB_ENV
echo "${{ inputs.enable_tiff && 'npm_config_enable_tiff' || 'npm_config_disable_tiff' }}=true" >> $GITHUB_ENV

- name: Build the native ASAN version
if: inputs.asan
run: |
Expand All @@ -125,7 +130,7 @@ jobs:
run: |
npm run configure:native
npx xpm run configure --config native -- -Db_coverage=true
npm run build:native
npx xpm run build --config native

- name: Check WASM module size
run: |
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Create conan lock
on:
workflow_dispatch

jobs:
native:
strategy:
max-parallel: 1
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}

steps:
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Install xPacks
run: |
npm install
npx xpm install
- name: Create conan lock (native)
run: npx xpm run lock --config native
env:
npm_config_enable_conan: true
- name: Create conan lock (native-xpack)
run: npx xpm run lock --config native
env:
npm_config_enable_conan: true
npm_config_enable_standalone_build: true
- name: Create conan lock (WASM)
run: npx xpm run lock --config wasm
if: matrix.platform == 'ubuntu-latest'
env:
npm_config_enable_conan: true
- name: Commit conan lock
uses: EndBug/add-and-commit@v9
with:
message: 'Update conan lock for ${{ matrix.platform }}'
add: conan.lock
29 changes: 25 additions & 4 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci --skip-proj-wasm --skip-proj-native
run: npm ci --proj_js_skip_native --proj_js_skip_wasm
- name: Lint
run: npm run lint

Expand Down Expand Up @@ -46,6 +46,27 @@ jobs:
id: native-${{ matrix.platform }}-${{ matrix.enable_tiff && 'tiff' || 'no_tiff'}}
enable_tiff: ${{ matrix.enable_tiff }}

build-standalone:
name: Standalone build native ${{ matrix.platform && '' || '' }}
needs: swig
if: false

strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

uses:
./.github/workflows/build.yml
with:
platform: ${{ matrix.platform }}
native: true
wasm: false
standalone: true
id: native-${{ matrix.platform }}-standalone
enable_tiff: true


build-wasm:
name: Build WASM ${{ matrix.enable_tiff && '' || '' }}
needs: swig
Expand Down Expand Up @@ -134,7 +155,7 @@ jobs:
path: lib/binding

- name: Install dependencies
run: npm install --skip-proj-wasm --skip-proj-native
run: npm install --proj_js_skip_native --proj_js_skip_wasm

- name: Run the Node.js tests
run: npm run test:nodejs
Expand Down Expand Up @@ -183,7 +204,7 @@ jobs:

- name: Install dependencies
run: |
npm install --skip-proj-wasm --skip-proj-native
npm install --proj_js_skip_native --proj_js_skip_wasm
npx xpm install

- name: Get ASAN libname
Expand Down Expand Up @@ -234,7 +255,7 @@ jobs:

- name: Install dependencies
run: |
npm install --skip-proj-wasm --skip-proj-native
npm install --proj_js_skip_native --proj_js_skip_wasm
npx xpm install

- name: Run the Node.js tests
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/swig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
submodules: true
- uses: mmomtchev/setup-swig@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: jse
version: v5.0.6

Expand Down
32 changes: 0 additions & 32 deletions conan.lock

This file was deleted.

13 changes: 9 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,25 @@ class PROJDependencies(ConanFile):

def requirements(self):
if self.options.curl and self.settings.arch != 'wasm':
self.requires('libcurl/[>=8.6.0 <8.7.0]')
self.requires('libcurl/[>=8.6.0 <9]')

if self.options.tiff:
self.requires('libtiff/[>=4.6.0 <4.7.0]')
self.requires('libtiff/[>=4.6.0 <5]')

self.requires('sqlite3/[>=3.45.0 <3.46.0]')
self.requires('sqlite3/[>=3.45.0 <4]')

self.tool_requires('pkgconf/2.1.0')
self.tool_requires('sqlite3/[>=3.45.0 <3.46.0]')
self.tool_requires('sqlite3/<host_version>')

def configure(self):
if self.settings.arch == 'wasm':
self.options['libwebp/*'].with_simd = False

if self.settings.os == 'Windows':
self.options['libcurl/*'].with_ssl = 'schannel'
elif self.settings.os == 'Macos':
self.options['libcurl/*'].with_ssl = 'darwinssl'

# We don't want the conan build system - conan works best with the platforms' defaults
# We always use ninja on all platforms (this is the meson approach)
#
Expand Down
37 changes: 0 additions & 37 deletions hadron/clang-darwin.profile
Original file line number Diff line number Diff line change
@@ -1,37 +0,0 @@
[buildenv]
CC=clang
CXX=clang++
LD=ld64.lld
AR=llvm-ar
AS=llvm-as
RANLIB=llvm-ranlib
NM=llvm-nm
STRIP=llvm-strip
OBJDUMP=llvm-objdump

[settings]
arch={{ {"arm64": "armv8"}.get(platform.machine(), platform.machine()) }}
build_type=Release
compiler=clang
compiler.cppstd=gnu17
compiler.version=17
compiler.libcxx=libc++
os=Macos

# For autotools-based projects
# (we can't simply add it generally, because the recipe will also set
# the CMake generator for CMake-based projects)
[tool_requires]
libffi/*: make/4.4.1
libiconv/*: make/4.4.1
util-linux-libuuid/*: make/4.4.1
xz_utils/*: make/4.4.1
libmount/*: make/4.4.1
libxml2/*: make/4.4.1

[conf]
# By using clang we are already out of the paved road
tools.cmake.cmaketoolchain:generator=Ninja
tools.build:sharedlinkflags=['-fuse-ld=lld']
tools.build:exelinkflags=['-fuse-ld=lld']
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_LINKER': 'ld64.lld', 'CMAKE_AR': 'llvm-ar', 'CMAKE_AS': 'llvm-as', 'CMAKE_RANLIB': 'llvm-ranlib', 'CMAKE_NM': 'llvm-nm', 'CMAKE_STRIP': 'llvm-strip', 'CMAKE_OBJDUMP': 'llvm-objdump'}
37 changes: 0 additions & 37 deletions hadron/clang-linux.profile
Original file line number Diff line number Diff line change
@@ -1,37 +0,0 @@
[buildenv]
CC=clang
CXX=clang++
LD=ld.lld
AR=llvm-ar
AS=llvm-as
RANLIB=llvm-ranlib
NM=llvm-nm
STRIP=llvm-strip
OBJDUMP=llvm-objdump

[settings]
arch=x86_64
build_type=Release
compiler=clang
compiler.cppstd=gnu17
compiler.version=17
compiler.libcxx=libstdc++11
os=Linux

# For autotools-based projects
# (we can't simply add it generally, because the recipe will also set
# the CMake generator for CMake-based projects)
[tool_requires]
libffi/*: make/4.4.1
libiconv/*: make/4.4.1
util-linux-libuuid/*: make/4.4.1
xz_utils/*: make/4.4.1
libmount/*: make/4.4.1
libxml2/*: make/4.4.1

[conf]
# By using clang we are already out of the paved road
tools.cmake.cmaketoolchain:generator=Ninja
tools.build:sharedlinkflags=['-Wl,--exclude-libs,ALL', '-fuse-ld=lld']
tools.build:exelinkflags=['-fuse-ld=lld']
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_LINKER': 'ld.lld', 'CMAKE_AR': 'llvm-ar', 'CMAKE_AS': 'llvm-as', 'CMAKE_RANLIB': 'llvm-ranlib', 'CMAKE_NM': 'llvm-nm', 'CMAKE_STRIP': 'llvm-strip', 'CMAKE_OBJDUMP': 'llvm-objdump'}
40 changes: 2 additions & 38 deletions hadron/clang-win32.profile
Original file line number Diff line number Diff line change
@@ -1,38 +1,2 @@
[buildenv]
# This is needed because on Windows xpm uses npm-style .cmd redirects
# from xpacks/.bin to the actual installation directory
CC=clang.cmd
CXX=clang++.cmd
LD=clang-ld.cmd
AR=llvm-ar.cmd
RANLIB=llvm-ranlib.cmd
AS=x86_64-w64-mingw32-as.cmd
NM=llvm-nm.cmd
STRIP=llvm-strip.cmd
OBJDUMP=llvm-objdump.cmd
NINJA=ninja.cmd
RC=llvm-windres.cmd
WINDRES=llvm-windres.cmd
# This is the only way to bring in the ninja xPack on Windows where ninja is called ninja.cmd
# until conan implements a tools.cmake.make_program settings item
PATH=+(path){{ os.path.dirname(os.getenv("npm_package_json")).replace("\\", "/") }}/xpacks/@xpack-dev-tools/ninja-build/.content/bin

[settings]
arch=x86_64
build_type=Release
compiler=clang
compiler.cppstd=gnu17
compiler.version=17
os=Windows

[conf]
# clang tends to be pickier than MSVC when it comes to C/C++ compliance
tools.build:cflags=['-Wno-incompatible-function-pointer-types']
tools.build:sharedlinkflags=['-l:libc++.a', '-static-libgcc']
tools.build:exelinkflags=['-l:libc++.a', '-static-libgcc']
# The second most probable to work generator on Windows is Ninja
# (the first one is not free)
tools.cmake.cmaketoolchain:generator=Ninja
# a better solution might be in the works:
# https://github.com/conan-io/conan/issues/15544
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_AR': 'llvm-ar.cmd', 'CMAKE_RANLIB': 'llvm-ranlib.cmd', 'CMAKE_AS': 'x86_64-w64-mingw32-as.cmd', 'CMAKE_NM': 'llvm-nm.cmd', 'CMAKE_STRIP': 'llvm-strip.cmd', 'CMAKE_OBJDUMP': 'llvm-objdump.cmd'}
[replace_tool_requires]
libtool/*: autoconf/2.72
2 changes: 0 additions & 2 deletions hadron/conan.ini

This file was deleted.

Loading
Loading