-
Notifications
You must be signed in to change notification settings - Fork 802
58 lines (57 loc) · 1.77 KB
/
mac-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: mac-tests
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@v3
- 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@v2
id: dependencies
with:
file-url: 'https://downloads.sourceforge.net/gnucash/Dependencies/gnucash-4.900-mac-dependencies.tar.xz'
file-name: gnucash-dependencies.tar.xz
- name: download googletest
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
- 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
env:
CTEST_OUTPUT_ON_FAILURE: On
- uses: actions/upload-artifact@v3
if: failure()
with:
name: TestLog
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
if-no-files-found: ignore