Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions .github/actions/invariance_tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ inputs:
description: 'Name of the uploaded artifact'
required: false
default: 'invariance-test-results'
library-path:
description: 'Path to the InChI library under test'
required: false
default: 'CMake_build/full_build/INCHI-1-SRC/INCHI_API/libinchi/src/lib/libinchi.so'

runs:
using: "composite"
steps:
- name: Run invariance tests
run: run-tests --test-config=INCHI-1-TEST/tests/test_library/config/config.invariance.py --data-config=INCHI-1-TEST/tests/test_library/config/config.ci.py
run: python INCHI-1-TEST/tests/test_library/inchi_tests/run_tests.py --test=invariance --lib-path=${{ inputs.library-path}} --data-config=INCHI-1-TEST/tests/test_library/config/config_ci.py
shell: bash

- name: Write invariance summary
if: '!cancelled()'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Github prefers the ${{ }} syntax, although he encapsulation with ' ' works as well

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the other if statement in this file

run: parse-log --test-config=INCHI-1-TEST/tests/test_library/config/config.invariance.py --data-config=INCHI-1-TEST/tests/test_library/config/config.ci.py
run: python INCHI-1-TEST/tests/test_library/inchi_tests/parse_log.py --test=invariance --lib-path=${{ inputs.library-path}} --data-config=INCHI-1-TEST/tests/test_library/config/config_ci.py
shell: bash

- name: Upload invariance test results
Expand Down
16 changes: 12 additions & 4 deletions .github/actions/regression_tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ inputs:
description: 'Name of the uploaded artifact'
required: false
default: 'regression-test-results'
library-path:
description: 'Path to the InChI library under test'
required: false
default: 'CMake_build/full_build/INCHI-1-SRC/INCHI_API/libinchi/src/lib/libinchi.so'
shell:
description: 'Shell for running the tests'
required: false
default: 'bash'

runs:
using: "composite"
steps:
- name: Run regression tests
run: run-tests --test-config=INCHI-1-TEST/tests/test_library/config/config.regression.py --data-config=INCHI-1-TEST/tests/test_library/config/config.ci.py
shell: bash
run: python INCHI-1-TEST/tests/test_library/inchi_tests/run_tests.py --test=regression --lib-path=${{ inputs.library-path}} --data-config=INCHI-1-TEST/tests/test_library/config/config_ci.py
shell: ${{ inputs.shell }}

- name: Write regression summary
if: '!cancelled()'
run: parse-log --test-config=INCHI-1-TEST/tests/test_library/config/config.regression.py --data-config=INCHI-1-TEST/tests/test_library/config/config.ci.py
shell: bash
run: python INCHI-1-TEST/tests/test_library/inchi_tests/parse_log.py --test=regression --lib-path=${{ inputs.library-path}} --data-config=INCHI-1-TEST/tests/test_library/config/config_ci.py
shell: ${{ inputs.shell }}

- name: Upload regression test results
if: '!cancelled()'
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/build_matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[
{
"os": "ubuntu-22.04",
"slug": "linux",
"name": "Ubuntu 22.04",
"pre_build": "sudo apt update && sudo apt install -y cmake && python3 -m pip install -e INCHI-1-TEST[invariance-tests]",
"build_exe": "cmake --build CMake_build/cli_build",
"build_lib": "cmake --build CMake_build/libinchi_build",
"exe_path": "CMake_build/cli_build/bin/inchi-1",
"lib_path": "CMake_build/libinchi_build/bin/libinchi.so",
"main_path": "CMake_build/libinchi_build/bin/inchi_main"
},
{
"os": "windows-2022",
"slug": "windows",
"name": "Windows Server 2022",
"pre_build": "python -m pip install -e INCHI-1-TEST[invariance-tests]",
"build_exe": "cmake --build CMake_build/cli_build --config Release",
"build_lib": "cmake --build CMake_build/libinchi_build --config Release",
"exe_path": "CMake_build/cli_build/bin/Release/inchi-1.exe",
"lib_path": "CMake_build/libinchi_build/bin/Release/libinchi.dll",
"main_path": "CMake_build/libinchi_build/bin/Release/inchi_main.exe"

},
{
"os": "macos-14",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure, that this must run on M1/ARM runners, so the CMake must not contain any x86_64 specific flags

"slug": "macos",
"name": "MacOS 14",
"pre_build": "python -m pip install -e INCHI-1-TEST[invariance-tests]",
"build_exe": "cmake --build CMake_build/cli_build",
"build_lib": "cmake --build CMake_build/libinchi_build",
"exe_path": "CMake_build/cli_build/bin/inchi-1",
"lib_path": "CMake_build/libinchi_build/bin/libinchi.dylib",
"main_path": "CMake_build/libinchi_build/bin/inchi_main"
}
]
146 changes: 129 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,150 @@
# Trigger this workflow by pushing a release tag.
# Make sure that `HEAD` is pointing to the commit you want to release.
# Then run `git tag -a v<version_tag> -m "Release version <version_tag> (<yyyy>-<mm>-<dd>)" && git push && git push --tags`.
# For example `git tag -a v1.06 -m "Release version 1.06 (2020-12-20)" && git push && git push --tags`.
name: InChI Release
name: Release

on:
workflow_dispatch:
push:
# TODO: Remove branches trigger.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to do this TODO ;)

branches: [ release-automation ]
# Trigger this workflow by pushing a release tag.
# Make sure that `HEAD` is pointing to the commit you want to release.
# Then run `git tag -a v<version_tag> -m "Release version <version_tag> (<yyyy>-<mm>-<dd>)" && git push && git push --tags`.
# For example `git tag -a v1.06 -m "Release version 1.06 (2020-12-20)" && git push && git push --tags`.
tags:
- v1.*

jobs:
release:
runs-on: ubuntu-latest
define_matrix:
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.define_matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4

- name: Define build matrix
id: define_matrix
# The build matrix is used to interpolate commands and inputs throughout the remainder of the workflow.
# Since those interpolations are potentially security-sensitive, we verify the hash of the build matrix.
if: ${{ hashFiles('.github/workflows/build_matrix.json') == 'ae87ded543b131908cf5aed1502d0e39b2cb9374693598ef7f09c5c5a8be4e52' }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add an else statement here that prints a dedicated error message here if the hash check fails

run: |
echo "matrix=$(cat .github/workflows/build_matrix.json| jq -c .)" >> $GITHUB_OUTPUT

build_and_test:
needs: define_matrix
strategy:
matrix:
include:
${{ fromJson(needs.define_matrix.outputs.matrix) }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
RELEASE_DIR: inchi-${{ matrix.slug }}-${{ github.sha }}

permissions:
contents: write
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the build_and_test block needs the permission to write?


steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: ${{ matrix.pre_build }}

- name: Set up Visual Studio shell
if: runner.os == 'Windows'
uses: egor-tensin/vs-shell@9a932a62d05192eae18ca370155cf877eecc2202
with:
fetch-depth: 0
arch: x64

- name: Build executable
run: |
cmake -B CMake_build/cli_build -S INCHI-1-SRC/INCHI_EXE/inchi-1/src
${{ matrix.build_exe }}

- name: Checkout release
# `ref_name` is triggering tag.
run: git checkout ${{ github.ref_name }}
- name: Test executable
run: pytest INCHI-1-TEST/tests/test_executable --exe-path ${{ matrix.exe_path }}

- name: Build library
run: |
cmake -B CMake_build/libinchi_build -S INCHI-1-SRC/INCHI_API/demos/inchi_main/src
${{ matrix.build_lib }}

- name: Test library
uses: ./.github/actions/regression_tests
with:
artifact-name: regression-test-results-${{ matrix.slug }}-${{ github.sha }}
library-path: ${{ matrix.lib_path }}
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}

- name: Upload CMake configurations
uses: actions/upload-artifact@v4
with:
name: CMake-configurations-${{ matrix.slug }}-${{ github.sha }}
path: |
CMake_build/libinchi_build/CMakeCache.txt
CMake_build/cli_build/CMakeCache.txt

- name: Build release artifacts
- name: Collect artifacts
run: |
zip -r INCHI-1-BIN.zip INCHI-1-BIN
zip -r INCHI-1-DOC.zip INCHI-1-DOC
zip -r INCHI-1-SRC.zip INCHI-1-SRC
zip -r INCHI-1-TEST.zip INCHI-1-TEST
mkdir -p ${{ env.RELEASE_DIR }}
cp ${{ matrix.exe_path }} ${{ env.RELEASE_DIR }}
cp ${{ matrix.lib_path }} ${{ env.RELEASE_DIR }}
cp ${{ matrix.main_path }} ${{ env.RELEASE_DIR }}

- id: upload-unsigned-artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.RELEASE_DIR }}
path: ${{ env.RELEASE_DIR }}

- name: Sign artifacts
if: runner.os == 'Windows'
uses: signpath/github-action-submit-signing-request@ced31329c0317e779dad2eec2a7c3bb46ea1343e
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: 656f8204-f8c5-4028-bd48-f832f5f89b31
project-slug: InChI
signing-policy-slug: test-signing
github-artifact-id: ${{ steps.upload-unsigned-artifacts.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: ${{ env.RELEASE_DIR }}-signed

- uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: ${{ env.RELEASE_DIR }}-signed
path: ${{ env.RELEASE_DIR }}-signed

release:
needs: build_and_test
runs-on: ubuntu-22.04
permissions:
contents: write

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release_artifacts
pattern: inchi-*

- name: Package artifacts
run: zip -r release_artifacts.zip release_artifacts

- name: Download CMake configurations
uses: actions/download-artifact@v4
with:
path: cmake_configurations
pattern: CMake-configurations-*

- name: Package CMake configurations
run: zip -r cmake_configurations.zip cmake_configurations

- name: Create release
# TODO: lift this guard to release job level
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to do the TODO ;)
Lift the if statement up to for example line 122

if: github.ref_type == 'tag'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -42,4 +154,4 @@ jobs:
--verify-tag \
--title "${{ github.ref_name }}" \
--notes "For details about this release have a look at the [CHANGELOG](INCHI-1-DOC/CHANGELOG.md)." \
INCHI-1-BIN.zip INCHI-1-DOC.zip INCHI-1-SRC.zip INCHI-1-TEST.zip
release_artifacts.zip cmake_configurations.zip
Binary file removed INCHI-1-BIN/linux/32bit/inchi-1
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/32bit/inchi-1.gz
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/32bit/so/inchi_main
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/32bit/so/inchi_main.gz
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/32bit/so/libinchi.so
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/32bit/so/libinchi.so.gz
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/64bit/inchi-1
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/64bit/inchi-1.gz
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/64bit/so/inchi_main
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/64bit/so/inchi_main.gz
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/64bit/so/libinchi.so
Binary file not shown.
Binary file removed INCHI-1-BIN/linux/64bit/so/libinchi.so.gz
Binary file not shown.
49 changes: 0 additions & 49 deletions INCHI-1-BIN/readme.md

This file was deleted.

Binary file removed INCHI-1-BIN/windows/32bit/dll/inchi_main.exe
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/32bit/dll/inchi_main.zip
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/32bit/dll/libgcc_s_dw2-1.dll
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/32bit/dll/libinchi.dll
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/32bit/dll/libinchi.zip
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/32bit/inchi-1.exe
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/32bit/inchi-1.zip
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/32bit/libgcc_s_dw2-1.dll
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/64bit/dll/inchi_main.exe
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/64bit/dll/inchi_main.zip
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/64bit/dll/libinchi.dll
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/64bit/dll/libinchi.zip
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/64bit/inchi-1.exe
Binary file not shown.
Binary file removed INCHI-1-BIN/windows/64bit/inchi-1.zip
Binary file not shown.
7 changes: 6 additions & 1 deletion INCHI-1-DOC/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change log

## v1.07.5 2026-02-04
## v1.07.5 2025-??-??

### Changed

- The build artifacts are no longer shipped in `INCHI-1-BIN` (the latter directory has been removed). Instead, the build artifacts are distributed under <https://github.com/IUPAC-InChI/InChI/releases/>.
- 32-bit artifacts are no longer shipped.

### Fixed

Expand Down
5 changes: 2 additions & 3 deletions INCHI-1-DOC/FAQ/html/inchi-faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -1781,9 +1781,8 @@ <h3><a name="15.4">15.4. Standard vs. Non-standard InChI generation</a></h3>
<!-- 15.5 Block Start -->
<blockquote>
<h3><a name="15.5">15.5. How do I install the InChI Software?</a></h3>
<p>To use the software, first extract (preserving the folder structure) the contents of the zip files of distribution package to a directory of your choice. There are four archive files (INCHI-1-API.ZIP, INCHI-1-BIN.ZIP, INCHI-1-DOC.ZIP, INCHI-1-TEST.ZIP); each is unpacked into a separate subdirectory with the name corresponding to the archive name.</p>
<p>InChI executables and library are located in INCHI-1-BIN subdirectory (in lower-level subdirectories for different platforms, Windows/Linux and 32/64 bit).</p>
<p>The executables are ready to use (e.g., no special installation/accessing registry is necessary under Windows). Installing dynamic libraries may require appropriate placement and setting up necessary access paths; please consult your system manual.</p>
<p>Ready to use artifacts for Windows, Linux, and macOS are distributed on <a href="https://github.com/IUPAC-InChI/InChI/releases">https://github.com/IUPAC-InChI/InChI/releases</a>.</p>
<p>Installing dynamic libraries may require appropriate placement and setting up necessary access paths; please consult your system manual.</p>
<p>For additional details, you may check with software release notes and user guide (files RelNotes.pfd and InChI_UserGuide.pdf, resp.), which are available in the distribution package).</p>
</blockquote>
<!-- 15.5 Block End -->
Expand Down
2 changes: 0 additions & 2 deletions INCHI-1-DOC/UserGuide/InChI_UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ The InChI API calls are documented in the separate “InChI API Reference” doc

**Introduction**

Windows graphical program of InChI generation is provided in a ‘zip’ file INCHI-1-BIN.zip. To

To start the program, run the file winchi-1.exe that was extracted from the zip file.

Generating an InChI begins with the selection of an input structure file. The simplest way is to drag the input structure file from Windows Explorer directory list into the InChI window. Structures also may be copied from certain chemical structure editors (ISIS/Draw with “Copy Mol/Rxnfile to the Clipboard” option or from ACD/ChemSketch) and pasted into the InChI window (Select Edit -> Paste from winchi-1 menu). The input structure file pathname may be provided as a command line option when you start winchi-1. Selection of the input structure file may also be done by first clicking on the ‘Open’ button (top left corner) and then, in the dialog box that appears selecting a structure file using the ‘…’ button on the right of the ‘Input Structure File’ field. You may select any of the sample .mol or .sdf files for initial testing. In this dialog you may also enter “Text Header for ID”; this will simply add to the InChI header a structure ID if it is present in an input SDfile (from other input formats the header and ID are extracted automatically).
Expand Down
5 changes: 2 additions & 3 deletions INCHI-1-SRC/INCHI_API/libinchi/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ if(MATH_LIBRARY)
target_link_libraries(libinchi PUBLIC ${MATH_LIBRARY})
endif()

target_compile_definitions(libinchi PRIVATE
target_compile_definitions(libinchi PRIVATE
fPIC
COMPILE_ANSI_ONLY
TARGET_API_LIB
Expand All @@ -163,10 +163,9 @@ string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DE
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")

set_target_properties(libinchi PROPERTIES PREFIX "")
# set_target_properties(libinchi PROPERTIES SOVERSION 1.07 PREFIX "")


if(UNIX AND NOT APPLE)
# set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--version-script=${P_LIBINCHI_MAP}/libinchi.map,-z,relro")
target_link_options(libinchi PRIVATE "LINKER:--version-script=${P_LIBINCHI_MAP}/libinchi.map,-z,relro")
elseif(WIN32 AND NOT MSVC)
target_link_options(libinchi PRIVATE "LINKER:--version-script=${P_LIBINCHI_MAP}/libinchi.map")
Expand Down
6 changes: 0 additions & 6 deletions INCHI-1-SRC/INCHI_EXE/inchi-1/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ inchi-1 SUB-DIRECTORY
Contains Microsoft Visual Studio 2015 project
to create inchi-1.exe


Precompiled inchi-1.exe created with Microsoft Visual Studio 2015 is in INCHI-1-BIN
section of this distribution.



=========
LINKS
=========
Expand Down
11 changes: 0 additions & 11 deletions INCHI-1-TEST/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,4 @@ ENV lib_legacy_dir='/inchi/CMake_build/libinchi_build/lib/v1_6_0'
RUN mkdir -p $lib_legacy_dir
RUN ./INCHI-1-TEST/build_with_makefile.sh v1.06 $lib_legacy_dir lib || exit 1;

FROM python:3.12 AS inchi_test

WORKDIR /inchi

# Include only what's necessary for running the tests.
COPY --from=inchi_compilation /inchi/CMake_build /inchi/CMake_build
COPY --from=inchi_compilation /inchi/INCHI-1-TEST/src /inchi/INCHI-1-TEST/src
COPY --from=inchi_compilation /inchi/INCHI-1-TEST/tests /inchi/INCHI-1-TEST/tests
COPY --from=inchi_compilation /inchi/INCHI-1-TEST/pyproject.toml /inchi/INCHI-1-TEST/pyproject.toml
COPY --from=inchi_compilation /inchi/INCHI-1-TEST/install_test_dependencies.sh /inchi/INCHI-1-TEST/install_test_dependencies.sh

RUN cd INCHI-1-TEST && ./install_test_dependencies.sh
Loading