mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-24 09:50:54 -06:00
Implement Github-actions tests on macOS.
This commit is contained in:
parent
0b670680d7
commit
4b7bc94e9d
7
.github/workflows/README.md
vendored
Normal file
7
.github/workflows/README.md
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Github Actions Continuous Integration Testing Workflows.
|
||||||
|
|
||||||
|
ci-tests.yml runs Ubuntu 18.04 and Ubuntu 20.04 using Github-provided virtual environments. The virtual environments are about twice as fast as Docker ones and getting Docker to run Ubuntu images was problematic. Note that updating Ubuntu 18.04 updates ICU4C from v60 to v65 and that causes conflicts with Boost, so don't.
|
||||||
|
|
||||||
|
ci-docker.yml runs tests in a Docker container running Arch Linux.
|
||||||
|
|
||||||
|
mac-tests.yml runs tests on macOS using a Github-provided virtual machine. Note that this test relies on a prebuilt tarball containing all of the dependencies. Instructions for building that tarball along with some support scripts may be found in utils/ci/macos-ci-deps.
|
55
.github/workflows/mac-tests.yaml
vendored
Normal file
55
.github/workflows/mac-tests.yaml
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
name: mac-tests
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
ci_tests_mac:
|
||||||
|
runs-on: macos-10.15
|
||||||
|
name: macOS Tests
|
||||||
|
env:
|
||||||
|
TZ: America/Los_Angeles
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- run: |
|
||||||
|
echo "PATH=$PATH:$HOME/gnucash/inst/bin" >> $GITHUB_ENV
|
||||||
|
echo "PREFIX=$HOME/gnucash/inst" >> $GITHUB_ENV
|
||||||
|
echo "SRCROOT=$HOME/gnucash/source" >> $GITHUB_ENV
|
||||||
|
- name: download dependency tarball
|
||||||
|
uses: carlosperate/download-file-action@v1.0.3
|
||||||
|
id: dependencies
|
||||||
|
with:
|
||||||
|
file-url: 'https://downloads.sourceforge.net/gnucash/Dependencies/gnucash-4.x-mac-dependencies.tar.xz'
|
||||||
|
file-name: gnucash-dependencies.tar.xz
|
||||||
|
- name: download googletest
|
||||||
|
uses: carlosperate/download-file-action@v1.0.3
|
||||||
|
|
||||||
|
id: googletest
|
||||||
|
with:
|
||||||
|
file-url: 'https://github.com/google/googletest/archive/release-1.10.0.tar.gz'
|
||||||
|
file-name: googletest.tar.gz
|
||||||
|
- run: |
|
||||||
|
cd $HOME
|
||||||
|
mkdir gnucash
|
||||||
|
cd gnucash
|
||||||
|
tar -xf $GITHUB_WORKSPACE/gnucash-dependencies.tar.xz
|
||||||
|
mkdir source
|
||||||
|
cd source
|
||||||
|
tar -xf $GITHUB_WORKSPACE/googletest.tar.gz
|
||||||
|
mv googletest-* googletest
|
||||||
|
cd ..
|
||||||
|
ls source
|
||||||
|
- name: Configure GnuCash
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -GNinja -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX -DWITH_PYTHON=ON -DGTEST_ROOT=$SRCROOT/googletest $GITHUB_WORKSPACE
|
||||||
|
- name: Build and Test GnuCash
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ninja
|
||||||
|
ninja check
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: TestLog
|
||||||
|
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
|
||||||
|
if-no-files-found: ignore
|
24
util/ci/macos-ci-deps/README.md
Normal file
24
util/ci/macos-ci-deps/README.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
For creating the macOS dependency tarball required by the Github CI tests.
|
||||||
|
|
||||||
|
Reruirements:
|
||||||
|
* Administrator privs on your Mac.
|
||||||
|
* Project admin privs for https://sourceforge.net/projects/gnucash.
|
||||||
|
* You must be running the same or newer version of macOS as the Github runner.
|
||||||
|
* Xcode or command-line tools (install the latter with `sudo xcode-select -install`).
|
||||||
|
To build this tarball you must be running the same or newer macOS version as the Github VM.
|
||||||
|
|
||||||
|
Procedure:
|
||||||
|
* Set up a Gtk-OSX build environment following the [GnuCash Quartz Build instructions](https://wiki.gnucash.org/wiki/MacOS/Quartz).
|
||||||
|
* Retrieve [jhbuildrc-custom](https://github.com/gnucash/gnucash-on-osx/jhbuildrc-custom) and put it in ~/.config.
|
||||||
|
* Set `modules = _modules_deps` on the appropriate line of `jhbuildrc-custom`.
|
||||||
|
* If you are not running the same version of macOS as the Github actions virtual environment change the `setup_SDK()` line at the bottom of `jhbuildrc-custom` to `setup_SDK('10.15')`, substituting the VM's macOS version for '10.15'.
|
||||||
|
* Create the directory `/Users/runner/` and make yourself the owner:
|
||||||
|
```
|
||||||
|
sudo mkdir /Users/runner
|
||||||
|
sudo chown me /Users/runner
|
||||||
|
mkdir /Users/runner/gnucash
|
||||||
|
```
|
||||||
|
Substituting your own userid for 'me'.
|
||||||
|
* Run `util/ci/macos-ci-deps/make-macos-deps-tarball.sh gnucash-4.2-mac-dependencies.tar.xz` from the root of the source directory, changing the tarball's name if appropriate.
|
||||||
|
* Upload the resulting tarball to the Dependencies folder in the Gnucash files section on SourceForge.
|
||||||
|
* If necessary modify `.github/workflows/mac-tests.yaml to reflect the tarball's URI.
|
28
util/ci/macos-ci-deps/macos_bin.manifest
Normal file
28
util/ci/macos-ci-deps/macos_bin.manifest
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
cmake
|
||||||
|
ctest
|
||||||
|
glib-compile-resources
|
||||||
|
glib-compile-schemas
|
||||||
|
guild
|
||||||
|
guile
|
||||||
|
msgattrib
|
||||||
|
msgcat
|
||||||
|
msgcmp
|
||||||
|
msgcomm
|
||||||
|
msgconv
|
||||||
|
msgen
|
||||||
|
msgexec
|
||||||
|
msgfilter
|
||||||
|
msgfmt
|
||||||
|
msggrep
|
||||||
|
msginit
|
||||||
|
msgmerge
|
||||||
|
msgunfmt
|
||||||
|
msguniq
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
python3
|
||||||
|
python3-config
|
||||||
|
python3.8
|
||||||
|
python3.8-config
|
||||||
|
swig
|
||||||
|
xgettext
|
33
util/ci/macos-ci-deps/macos_include.manifest
Normal file
33
util/ci/macos-ci-deps/macos_include.manifest
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
aqbanking6
|
||||||
|
atk-1.0
|
||||||
|
boost
|
||||||
|
cairo
|
||||||
|
dbi
|
||||||
|
freetype2
|
||||||
|
fribidi
|
||||||
|
gdk-pixbuf-2.0
|
||||||
|
gio-unix-2.0
|
||||||
|
glib-2.0
|
||||||
|
gmp.h
|
||||||
|
gtk-3.0
|
||||||
|
gtkmacintegration
|
||||||
|
guile
|
||||||
|
gwenhywfar5
|
||||||
|
harfbuzz
|
||||||
|
libintl.h
|
||||||
|
libofx
|
||||||
|
libpng16
|
||||||
|
libsoup-2.4
|
||||||
|
libxml2
|
||||||
|
libxslt
|
||||||
|
lzma
|
||||||
|
lzma.h
|
||||||
|
pango-1.0
|
||||||
|
pixman-1
|
||||||
|
pygobject-3.0
|
||||||
|
python3.8
|
||||||
|
unicase.h
|
||||||
|
unicode
|
||||||
|
uniconv.h
|
||||||
|
unictype.h
|
||||||
|
webkitgtk-4.0
|
236
util/ci/macos-ci-deps/macos_lib.manifest
Normal file
236
util/ci/macos-ci-deps/macos_lib.manifest
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
dbd
|
||||||
|
glib-2.0
|
||||||
|
guile
|
||||||
|
libaqbanking.44.dylib
|
||||||
|
libaqbanking.dylib
|
||||||
|
libatk-1.0.0.dylib
|
||||||
|
libatk-1.0.dylib
|
||||||
|
libboost_chrono.dylib
|
||||||
|
libboost_date_time.dylib
|
||||||
|
libboost_filesystem.dylib
|
||||||
|
libboost_locale.dylib
|
||||||
|
libboost_program_options.dylib
|
||||||
|
libboost_regex.dylib
|
||||||
|
libboost_system.dylib
|
||||||
|
libboost_thread.dylib
|
||||||
|
libcairo-gobject.2.dylib
|
||||||
|
libcairo-gobject.dylib
|
||||||
|
libcairo-script-interpreter.2.dylib
|
||||||
|
libcairo-script-interpreter.dylib
|
||||||
|
libcairo.2.dylib
|
||||||
|
libcairo.dylib
|
||||||
|
libchipcard.6.dylib
|
||||||
|
libchipcard.dylib
|
||||||
|
libcord.1.dylib
|
||||||
|
libcord.dylib
|
||||||
|
libcroco-0.6.3.dylib
|
||||||
|
libcroco-0.6.dylib
|
||||||
|
libcrypto.1.1.dylib
|
||||||
|
libcrypto.dylib
|
||||||
|
libdbi.1.dylib
|
||||||
|
libdbi.dylib
|
||||||
|
libecpg.6.12.dylib
|
||||||
|
libecpg.6.dylib
|
||||||
|
libecpg.dylib
|
||||||
|
libecpg_compat.3.12.dylib
|
||||||
|
libecpg_compat.3.dylib
|
||||||
|
libecpg_compat.dylib
|
||||||
|
libenchant.1.dylib
|
||||||
|
libenchant.dylib
|
||||||
|
libepoxy.0.dylib
|
||||||
|
libepoxy.dylib
|
||||||
|
libexslt.0.dylib
|
||||||
|
libexslt.dylib
|
||||||
|
libffi.7.dylib
|
||||||
|
libffi.dylib
|
||||||
|
libfl.2.dylib
|
||||||
|
libfl.dylib
|
||||||
|
libfl_pic.2.dylib
|
||||||
|
libfl_pic.dylib
|
||||||
|
libfontconfig.1.dylib
|
||||||
|
libfontconfig.dylib
|
||||||
|
libfreetype.6.17.2.dylib
|
||||||
|
libfreetype.6.dylib
|
||||||
|
libfreetype.dylib
|
||||||
|
libfribidi.0.dylib
|
||||||
|
libfribidi.dylib
|
||||||
|
libgailutil-3.0.dylib
|
||||||
|
libgailutil-3.dylib
|
||||||
|
libgc.1.dylib
|
||||||
|
libgc.dylib
|
||||||
|
libgcrypt.20.dylib
|
||||||
|
libgcrypt.dylib
|
||||||
|
libgdk-3.0.dylib
|
||||||
|
libgdk-3.dylib
|
||||||
|
libgdk_pixbuf-2.0.0.dylib
|
||||||
|
libgdk_pixbuf-2.0.dylib
|
||||||
|
libgettextlib-0.20.2.dylib
|
||||||
|
libgettextlib.dylib
|
||||||
|
libgettextpo.0.dylib
|
||||||
|
libgettextpo.dylib
|
||||||
|
libgettextsrc-0.20.2.dylib
|
||||||
|
libgettextsrc.dylib
|
||||||
|
libgio-2.0.0.dylib
|
||||||
|
libgio-2.0.dylib
|
||||||
|
libgirepository-1.0.1.dylib
|
||||||
|
libgirepository-1.0.dylib
|
||||||
|
libglib-2.0.0.dylib
|
||||||
|
libglib-2.0.dylib
|
||||||
|
libgmodule-2.0.0.dylib
|
||||||
|
libgmodule-2.0.dylib
|
||||||
|
libgmp.10.dylib
|
||||||
|
libgmp.dylib
|
||||||
|
libgnutls.30.dylib
|
||||||
|
libgnutls.dylib
|
||||||
|
libgnutlsxx.28.dylib
|
||||||
|
libgnutlsxx.dylib
|
||||||
|
libgobject-2.0.0.dylib
|
||||||
|
libgobject-2.0.dylib
|
||||||
|
libgpg-error.0.dylib
|
||||||
|
libgpg-error.dylib
|
||||||
|
libgthread-2.0.0.dylib
|
||||||
|
libgthread-2.0.dylib
|
||||||
|
libgtk-3.0.dylib
|
||||||
|
libgtk-3.dylib
|
||||||
|
libgtkmacintegration-gtk3.2.dylib
|
||||||
|
libgtkmacintegration-gtk3.dylib
|
||||||
|
libguile-2.2.1.dylib
|
||||||
|
libguile-2.2.dylib
|
||||||
|
libgwengui-cpp.79.dylib
|
||||||
|
libgwengui-cpp.dylib
|
||||||
|
libgwengui-gtk3.79.dylib
|
||||||
|
libgwengui-gtk3.dylib
|
||||||
|
libgwenhywfar.79.dylib
|
||||||
|
libgwenhywfar.dylib
|
||||||
|
libharfbuzz-gobject.0.dylib
|
||||||
|
libharfbuzz-gobject.dylib
|
||||||
|
libharfbuzz-icu.0.dylib
|
||||||
|
libharfbuzz-icu.dylib
|
||||||
|
libharfbuzz-subset.0.dylib
|
||||||
|
libharfbuzz-subset.dylib
|
||||||
|
libharfbuzz.0.dylib
|
||||||
|
libharfbuzz.dylib
|
||||||
|
libhistory.8.0.dylib
|
||||||
|
libhistory.8.dylib
|
||||||
|
libhistory.dylib
|
||||||
|
libhogweed.5.0.dylib
|
||||||
|
libhogweed.5.dylib
|
||||||
|
libhogweed.dylib
|
||||||
|
libicudata.66.1.dylib
|
||||||
|
libicudata.66.dylib
|
||||||
|
libicudata.dylib
|
||||||
|
libicui18n.66.1.dylib
|
||||||
|
libicui18n.66.dylib
|
||||||
|
libicui18n.dylib
|
||||||
|
libicuio.66.1.dylib
|
||||||
|
libicuio.66.dylib
|
||||||
|
libicuio.dylib
|
||||||
|
libicutest.66.1.dylib
|
||||||
|
libicutest.66.dylib
|
||||||
|
libicutest.dylib
|
||||||
|
libicutu.66.1.dylib
|
||||||
|
libicutu.66.dylib
|
||||||
|
libicutu.dylib
|
||||||
|
libicuuc.66.1.dylib
|
||||||
|
libicuuc.66.dylib
|
||||||
|
libicuuc.dylib
|
||||||
|
libintl.8.dylib
|
||||||
|
libintl.dylib
|
||||||
|
libjavascriptcoregtk-4.0.18.17.10.dylib
|
||||||
|
libjavascriptcoregtk-4.0.18.dylib
|
||||||
|
libjavascriptcoregtk-4.0.dylib
|
||||||
|
libjpeg.9.dylib
|
||||||
|
libjpeg.dylib
|
||||||
|
libltdl.7.dylib
|
||||||
|
libltdl.dylib
|
||||||
|
liblzma.5.dylib
|
||||||
|
liblzma.dylib
|
||||||
|
libmysqlclient.18.dylib
|
||||||
|
libmysqlclient.dylib
|
||||||
|
libnettle.7.0.dylib
|
||||||
|
libnettle.7.dylib
|
||||||
|
libnettle.dylib
|
||||||
|
libofx.7.dylib
|
||||||
|
libofx.dylib
|
||||||
|
libosp.5.dylib
|
||||||
|
libosp.dylib
|
||||||
|
libpango-1.0.0.dylib
|
||||||
|
libpango-1.0.dylib
|
||||||
|
libpangocairo-1.0.0.dylib
|
||||||
|
libpangocairo-1.0.dylib
|
||||||
|
libpangoft2-1.0.0.dylib
|
||||||
|
libpangoft2-1.0.dylib
|
||||||
|
libpcre.1.dylib
|
||||||
|
libpcre.dylib
|
||||||
|
libpcrecpp.0.dylib
|
||||||
|
libpcrecpp.dylib
|
||||||
|
libpcreposix.0.dylib
|
||||||
|
libpcreposix.dylib
|
||||||
|
libpgtypes.3.12.dylib
|
||||||
|
libpgtypes.3.dylib
|
||||||
|
libpgtypes.dylib
|
||||||
|
libpixman-1.0.40.0.dylib
|
||||||
|
libpixman-1.0.dylib
|
||||||
|
libpixman-1.dylib
|
||||||
|
libpng.dylib
|
||||||
|
libpng16.16.dylib
|
||||||
|
libpng16.dylib
|
||||||
|
libpq.5.12.dylib
|
||||||
|
libpq.5.dylib
|
||||||
|
libpq.dylib
|
||||||
|
libpsl.5.dylib
|
||||||
|
libpsl.dylib
|
||||||
|
libpython3.8.dylib
|
||||||
|
libreadline.8.0.dylib
|
||||||
|
libreadline.8.dylib
|
||||||
|
libreadline.dylib
|
||||||
|
librsvg-2.2.dylib
|
||||||
|
librsvg-2.dylib
|
||||||
|
libsoup-2.4.1.dylib
|
||||||
|
libsoup-2.4.dylib
|
||||||
|
libsoup-gnome-2.4.1.dylib
|
||||||
|
libsoup-gnome-2.4.dylib
|
||||||
|
libsqlite3.0.dylib
|
||||||
|
libsqlite3.dylib
|
||||||
|
libssl.1.1.dylib
|
||||||
|
libssl.dylib
|
||||||
|
libtasn1.6.dylib
|
||||||
|
libtasn1.dylib
|
||||||
|
libtextstyle.0.dylib
|
||||||
|
libtextstyle.dylib
|
||||||
|
libtiff.5.dylib
|
||||||
|
libtiff.dylib
|
||||||
|
libtiffxx.5.dylib
|
||||||
|
libtiffxx.dylib
|
||||||
|
libunistring.2.dylib
|
||||||
|
libunistring.dylib
|
||||||
|
libvala-0.36.0.dylib
|
||||||
|
libvala-0.36.dylib
|
||||||
|
libwebkit2gtk-4.0.37.49.6.dylib
|
||||||
|
libwebkit2gtk-4.0.37.dylib
|
||||||
|
libwebkit2gtk-4.0.dylib
|
||||||
|
libwebp.7.dylib
|
||||||
|
libwebp.dylib
|
||||||
|
libwebpdecoder.3.dylib
|
||||||
|
libwebpdecoder.dylib
|
||||||
|
libwebpdemux.2.dylib
|
||||||
|
libwebpdemux.dylib
|
||||||
|
libwebpmux.3.dylib
|
||||||
|
libwebpmux.dylib
|
||||||
|
libxml2.2.dylib
|
||||||
|
libxml2.dylib
|
||||||
|
libxmlsec1-gcrypt.1.dylib
|
||||||
|
libxmlsec1-gcrypt.dylib
|
||||||
|
libxmlsec1-gnutls.1.dylib
|
||||||
|
libxmlsec1-gnutls.dylib
|
||||||
|
libxmlsec1-openssl.1.dylib
|
||||||
|
libxmlsec1-openssl.dylib
|
||||||
|
libxmlsec1.1.dylib
|
||||||
|
libxmlsec1.dylib
|
||||||
|
libxslt.1.dylib
|
||||||
|
libxslt.dylib
|
||||||
|
libz.1.2.11.dylib
|
||||||
|
libz.1.dylib
|
||||||
|
libz.dylib
|
||||||
|
pkgconfig
|
||||||
|
python3.8
|
7
util/ci/macos-ci-deps/macos_share.manifest
Normal file
7
util/ci/macos-ci-deps/macos_share.manifest
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
cmake
|
||||||
|
cmake-3.17
|
||||||
|
gettext
|
||||||
|
gettext-0.20.2
|
||||||
|
guile
|
||||||
|
itstool
|
||||||
|
swig
|
24
util/ci/macos-ci-deps/make-macos-deps-tarball.sh
Executable file
24
util/ci/macos-ci-deps/make-macos-deps-tarball.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
fn=$1
|
||||||
|
if [[ "x$fn" = "x" ]]; then
|
||||||
|
fn="macos-dependencies.tar.xz"
|
||||||
|
fi
|
||||||
|
DIR=$(pwd)
|
||||||
|
|
||||||
|
export PREFIX=/Users/runner/gnucash/inst
|
||||||
|
jhbuild bootstrap-gtk-osx
|
||||||
|
jhbuild build
|
||||||
|
|
||||||
|
cd /Users/runner/gnucash
|
||||||
|
mv inst arch
|
||||||
|
mkdir inst
|
||||||
|
for i in 'bin' 'include' 'lib' 'share'; do
|
||||||
|
j="$DIR/util/ci/macos-ci-deps/macos_$i.manifest"
|
||||||
|
mkdir inst/$i
|
||||||
|
for k in `cat $j`; do
|
||||||
|
mv arch/$i/$k inst/$i
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
tar -cJf $DIR/$fn inst
|
Loading…
Reference in New Issue
Block a user