2020-11-17 18:55:42 -06:00
|
|
|
name: mac-tests
|
2020-12-10 14:11:43 -06:00
|
|
|
on: [push, pull_request]
|
2022-06-21 11:08:25 -05:00
|
|
|
permissions: {}
|
2020-11-17 18:55:42 -06:00
|
|
|
jobs:
|
|
|
|
ci_tests_mac:
|
2022-07-28 13:49:51 -05:00
|
|
|
runs-on: macos-latest
|
2020-12-10 14:13:53 -06:00
|
|
|
name: macOS CI Tests
|
2020-11-17 18:55:42 -06:00
|
|
|
env:
|
|
|
|
TZ: America/Los_Angeles
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-03-02 19:34:39 -06:00
|
|
|
uses: actions/checkout@v3
|
2020-11-17 18:55:42 -06:00
|
|
|
- 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:
|
2022-10-18 16:23:45 -05:00
|
|
|
file-url: 'https://downloads.sourceforge.net/gnucash/Dependencies/gnucash-4.900-mac-dependencies.tar.xz'
|
2020-11-17 18:55:42 -06:00
|
|
|
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
|
2021-07-08 11:33:52 -05:00
|
|
|
env:
|
|
|
|
CTEST_OUTPUT_ON_FAILURE: On
|
2020-11-17 18:55:42 -06:00
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: TestLog
|
|
|
|
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
|
|
|
|
if-no-files-found: ignore
|