gnucash future: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sat Aug 22 14:43:59 EDT 2026
Updated via https://github.com/Gnucash/gnucash/commit/09ea2ae4 (commit)
via https://github.com/Gnucash/gnucash/commit/75dbadd9 (commit)
via https://github.com/Gnucash/gnucash/commit/9e9f004a (commit)
via https://github.com/Gnucash/gnucash/commit/b2652547 (commit)
from https://github.com/Gnucash/gnucash/commit/625887b8 (commit)
commit 09ea2ae400a174c837910ea921f212d43c5c4578
Merge: 625887b8fa 75dbadd9ab
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Aug 22 11:42:57 2026 -0700
Merge John Ralls's 'windows-CI' into future
commit 75dbadd9abcb84088c34decd9001d778d7f3a841
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Jan 31 16:36:45 2026 -0800
Work around Github runner adding Windows line endings to test files.
diff --git a/.github/workflows/windows-tests.yml b/.github/workflows/windows-tests.yml
index 8440e9ec00..7f1864e069 100644
--- a/.github/workflows/windows-tests.yml
+++ b/.github/workflows/windows-tests.yml
@@ -22,29 +22,33 @@ jobs:
- name: Add our repo
shell: msys2 {0}
run: |
- sed -i "/^# SigLevel = Never/a [gnc-ucrt64]\nSigLevel = Optional TrustAll\nServer = https://github.com/gnucash/gnucash-on-windows/releases/download/gnc-ucrt64-repo/" /etc/pacman.conf
+ sed -i "/^# SigLevel = Never/a [gnc-ucrt64]\nSigLevel = Optional TrustAll\nServer = https://github.com/jralls/gnucash-on-windows/releases/download/gnc-ucrt64-repo/" /etc/pacman.conf
sed -i "s/^# ParallelDownloads/ParallelDownloads/" /etc/pacman.conf
pacman -Syv
- pacboy --noconfirm -S swig:p appstream-glib:p aqbanking:p boost:p docbook-xsl:p gettext-tools:p gtest:p guile3:p icu:p pdcurses:p libdbi-drivers:p libofx:p zlib:p
+ pacboy --noconfirm -S swig:p appstream-glib:p aqbanking:p boost:p docbook-xsl:p gettext-tools:p gtest:p guile3:p icu:p pdcurses:p libdbi-drivers:p libofx:p webview2-loader zlib:p
- name: Checkout
- uses: actions/checkout at v6
+ uses: actions/checkout at v7
- name: Configure
shell: msys2 {0}
+ env:
+ GUILE_LOAD_PATH: "${{ env.MSYSTEM_PREFIX }}/share/guile/3.0/"
+ GUILE_LOAD_COMPILED_PATH: "${{ env.MSYSTEM_PREFIX }}/lib/guile/3.0/ccache"
run: |
mkdir build && cd build
- export GUILE_LOAD_PATH="$MSYSTEM_PREFIX/share/guile/3.0/"
- export GUILE_LOAD_COMPILED_PATH="$MSYSTEM_PREFIX/lib/guile/3.0/ccache"
cmake -G Ninja -DCMAKE_PREFIX_PATH=$MSYSTEM_PREFIX -DSWIG_DIR=$MSYSTEM_PREFIX/share/swig/4.4.1 -DGNC_DBD_DIR=$MSYSTEM_PREFIX/lib/dbd ..
- name: Build and Test GnuCash
+ env:
+ GUILE_LOAD_PATH: "${{ env.MSYSTEM_PREFIX }}/share/guile/3.0/"
+ GUILE_LOAD_COMPILED_PATH: "${{ env.MSYSTEM_PREFIX }}/lib/guile/3.0/ccache"
+ GNC_DBD_DIR: "${{ env.MSYSTEM_PREFIX }}/lib/dbd"
+ CTEST_OUTPUT_ON_FAILURE: On
run: |
- export GNC_DBD_DIR="$MSYSTEM_PREFIX/lib/dbd"
cd build
ninja
ninja check
- env:
- CTEST_OUTPUT_ON_FAILURE: On
+
- uses: actions/upload-artifact at v7
if: failure()
with:
diff --git a/libgnucash/backend/xml/test/gtest-load-save-files.cpp b/libgnucash/backend/xml/test/gtest-load-save-files.cpp
index 58c99dcd30..66eb410ff2 100644
--- a/libgnucash/backend/xml/test/gtest-load-save-files.cpp
+++ b/libgnucash/backend/xml/test/gtest-load-save-files.cpp
@@ -32,6 +32,8 @@
#include <cstdlib>
#include <functional>
+#include <iostream>
+#include <iomanip>
#include <memory>
#include <string>
#include <vector>
@@ -65,7 +67,6 @@ static std::vector<unsigned char> read_file (std::string filename)
memcpy (data.data (), contents, length);
g_free (contents);
- std::cerr << filename << " contents length " << length << " vector size " << data.size() << std::endl;
return data;
}
else
@@ -74,14 +75,30 @@ static std::vector<unsigned char> read_file (std::string filename)
}
}
+#ifdef _WIN32
+static inline void
+fix_line_endings(std::vector<uint8_t>& contents)
+{
+ // On some systems (github actions runners in particular)
+ // something is changing some line endings to Windows,
+ // i.e. 0xODOA. Change them back to 0x0A.
+ auto new_end{std::remove(contents.begin(), contents.end(), 0x0D)};
+ contents.erase(new_end, contents.end());
+}
+#endif
+
static bool
compare_files (std::string filename1, std::string filename2)
{
auto contents1 = read_file (filename1);
auto contents2 = read_file (filename2);
+#ifdef _WIN32
+ fix_line_endings(contents1);
+#endif
+
if (contents1.size () > 0 && contents1.size () == contents2.size ()
- && !memcmp(contents1.data (), contents2.data (), contents1.size ())) {
+ && !memcmp(contents1.data (), contents2.data (), contents1.size ())) {
return true;
} else {
ADD_FAILURE() << "compare_files: " << filename1 << " and " << filename2 << " are different";
@@ -116,7 +133,7 @@ decompress_file (std::string filename, const std::vector<unsigned char> &in, std
return false;
}
- ret = inflate (&stream, Z_NO_FLUSH);
+ ret = inflate (&stream, Z_FINISH);
if (ret != Z_STREAM_END)
{
ADD_FAILURE() << "decompress_file: " << filename << " could not be uncompressed (inflate "
@@ -139,7 +156,7 @@ decompress_file (std::string filename, const std::vector<unsigned char> &in, std
return false;
}
- out.resize (stream.avail_out);
+ out.resize (stream.total_out);
return true;
}
@@ -149,12 +166,14 @@ compare_compressed_files (std::string uncompressed_filename1, std::string compre
{
auto uncompressed_contents1 = read_file (uncompressed_filename1);
auto compressed_contents2 = read_file (compressed_filename2);
+#ifdef _WIN32
+ fix_line_endings(uncompressed_contents1);
+#endif
/* Allow some space to grow beyond the expected size */
std::vector<unsigned char> uncompressed_contents2(uncompressed_contents1.size () * 2);
if (!decompress_file (compressed_filename2, compressed_contents2, uncompressed_contents2))
return false;
-
if (uncompressed_contents1.size () > 0
&& uncompressed_contents1.size () != uncompressed_contents2.size ())
{
@@ -164,11 +183,6 @@ compare_compressed_files (std::string uncompressed_filename1, std::string compre
<< uncompressed_contents2.size () << ")";
return false;
}
- else
- {
- std::cout << uncompressed_filename1 << " sizes match: " << uncompressed_contents1.size() << std::endl;
- }
-
if (!memcmp(uncompressed_contents1.data (), uncompressed_contents2.data (), uncompressed_contents1.size ())) {
return true;
commit 9e9f004aa8e4a67e53e6f4d7babdd82081ed1297
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jan 15 15:23:27 2026 -0800
Workflow for Windows tests.
diff --git a/.github/workflows/windows-tests.yml b/.github/workflows/windows-tests.yml
new file mode 100644
index 0000000000..8440e9ec00
--- /dev/null
+++ b/.github/workflows/windows-tests.yml
@@ -0,0 +1,53 @@
+name: windows-tests
+on: [push, pull_request, workflow_dispatch]
+permissions: {}
+jobs:
+ ci_tests_ucrt64:
+ runs-on: windows-latest
+ name: Windows ucrt64 CI Tests
+ env:
+ TZ: America/Los_Angeles
+ defaults:
+ run:
+ shell: msys2 {0}
+ steps:
+ - name: Setup
+ uses: msys2/setup-msys2 at v2
+ with:
+ msystem: UCRT64
+ update: true
+ install: git
+ pacboy: toolchain:p cmake:p ninja:p
+
+ - name: Add our repo
+ shell: msys2 {0}
+ run: |
+ sed -i "/^# SigLevel = Never/a [gnc-ucrt64]\nSigLevel = Optional TrustAll\nServer = https://github.com/gnucash/gnucash-on-windows/releases/download/gnc-ucrt64-repo/" /etc/pacman.conf
+ sed -i "s/^# ParallelDownloads/ParallelDownloads/" /etc/pacman.conf
+
+ pacman -Syv
+ pacboy --noconfirm -S swig:p appstream-glib:p aqbanking:p boost:p docbook-xsl:p gettext-tools:p gtest:p guile3:p icu:p pdcurses:p libdbi-drivers:p libofx:p zlib:p
+
+ - name: Checkout
+ uses: actions/checkout at v6
+ - name: Configure
+ shell: msys2 {0}
+ run: |
+ mkdir build && cd build
+ export GUILE_LOAD_PATH="$MSYSTEM_PREFIX/share/guile/3.0/"
+ export GUILE_LOAD_COMPILED_PATH="$MSYSTEM_PREFIX/lib/guile/3.0/ccache"
+ cmake -G Ninja -DCMAKE_PREFIX_PATH=$MSYSTEM_PREFIX -DSWIG_DIR=$MSYSTEM_PREFIX/share/swig/4.4.1 -DGNC_DBD_DIR=$MSYSTEM_PREFIX/lib/dbd ..
+ - name: Build and Test GnuCash
+ run: |
+ export GNC_DBD_DIR="$MSYSTEM_PREFIX/lib/dbd"
+ cd build
+ ninja
+ ninja check
+ env:
+ CTEST_OUTPUT_ON_FAILURE: On
+ - uses: actions/upload-artifact at v7
+ if: failure()
+ with:
+ name: TestResults
+ path: |
+ build/Testing/Temporary/LastTest.log
diff --git a/libgnucash/backend/xml/test/gtest-load-save-files.cpp b/libgnucash/backend/xml/test/gtest-load-save-files.cpp
index f5c76427e0..58c99dcd30 100644
--- a/libgnucash/backend/xml/test/gtest-load-save-files.cpp
+++ b/libgnucash/backend/xml/test/gtest-load-save-files.cpp
@@ -65,6 +65,7 @@ static std::vector<unsigned char> read_file (std::string filename)
memcpy (data.data (), contents, length);
g_free (contents);
+ std::cerr << filename << " contents length " << length << " vector size " << data.size() << std::endl;
return data;
}
else
@@ -163,6 +164,11 @@ compare_compressed_files (std::string uncompressed_filename1, std::string compre
<< uncompressed_contents2.size () << ")";
return false;
}
+ else
+ {
+ std::cout << uncompressed_filename1 << " sizes match: " << uncompressed_contents1.size() << std::endl;
+ }
+
if (!memcmp(uncompressed_contents1.data (), uncompressed_contents2.data (), uncompressed_contents1.size ())) {
return true;
commit b26525471e473fc5d73fa85476c2cd1390287705
Merge: b76358c050 c0db031bb1
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Aug 22 11:29:41 2026 -0700
Merge John Ralls's 'win32-webview2' into future
Summary of changes:
.github/workflows/windows-tests.yml | 57 ++++++++++++++++++++++
.../backend/xml/test/gtest-load-save-files.cpp | 28 +++++++++--
2 files changed, 81 insertions(+), 4 deletions(-)
create mode 100644 .github/workflows/windows-tests.yml
More information about the gnucash-changes
mailing list