gnucash/.github/workflows/mac-tests.yaml

59 lines
1.9 KiB
YAML
Raw Normal View History

name: mac-tests
2020-12-10 14:11:43 -06:00
on: [push, pull_request]
permissions: {}
jobs:
ci_tests_mac:
runs-on: macos-latest
name: macOS CI Tests
env:
TZ: America/Los_Angeles
steps:
- name: Checkout
uses: actions/checkout@v4
- name: configure Environment
run: |
echo "PATH=$HOME/gnucash/inst/bin:$PATH" >> $GITHUB_ENV
echo "PREFIX=$HOME/gnucash/inst" >> $GITHUB_ENV
echo "SRCROOT=$HOME/gnucash/source" >> $GITHUB_ENV
2024-04-30 15:40:30 -05:00
brew install ninja
- name: download dependency tarball
2023-09-10 16:48:51 -05:00
uses: carlosperate/download-file-action@v2
id: dependencies
with:
file-url: 'https://downloads.sourceforge.net/gnucash/Dependencies/gnucash-5.6-mac-dependencies.tar.xz'
file-name: gnucash-dependencies.tar.xz
- name: download googletest
2023-09-10 16:48:51 -05:00
uses: carlosperate/download-file-action@v2
id: googletest
with:
file-url: 'https://github.com/google/googletest/archive/release-1.10.0.tar.gz'
file-name: googletest.tar.gz
- name: Extract Dependencies
run: |
mkdir -p $HOME/gnucash/inst
cd $HOME/gnucash/inst
tar -xf $GITHUB_WORKSPACE/gnucash-dependencies.tar.xz
mkdir $HOME/gnucash/source
cd $HOME/gnucash/source
tar -xf $GITHUB_WORKSPACE/googletest.tar.gz
mv googletest-* googletest
- name: Configure GnuCash
run: |
mkdir $HOME/gnucash/build
cd $HOME/gnucash/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 $HOME/gnucash/build
ninja
ninja check
env:
CTEST_OUTPUT_ON_FAILURE: On
2024-05-04 15:35:47 -05:00
- uses: actions/upload-artifact@v4
if: failure()
with:
name: TestLog
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
if-no-files-found: ignore