99 runs-on : ubuntu-latest
1010 env :
1111 CCACHE_DIR : ${{github.workspace}}/ccache
12- CCACHE_MAXSIZE : 100M
12+ CCACHE_MAXSIZE : 400M
13+ CCACHE_COMPILERCHECK : content
1314 strategy :
1415 matrix :
1516 tag :
@@ -22,21 +23,28 @@ jobs:
2223 deps : null
2324 options : -DENABLE_PIE=ON -DUSE_ASM=OFF
2425 - tag : gui-full
25- deps : |
26+ deps : >-
2627 libminiupnpc-dev
2728 libqrencode-dev
2829 qtbase5-dev
2930 qttools5-dev
30- options : -DENABLE_GUI=ON -DENABLE_QRENCODE=ON -DENABLE_UPNP=ON -DUSE_DBUS=ON
31+ options : >-
32+ -DENABLE_GUI=ON
33+ -DENABLE_QRENCODE=ON
34+ -DENABLE_UPNP=ON
35+ -DUSE_DBUS=ON
3136 - tag : system-libs
32- deps : |
37+ deps : >-
3338 libdb5.3++-dev
3439 libleveldb-dev
3540 libsnappy-dev
3641 libsecp256k1-dev
3742 libunivalue-dev
3843 xxd
39- options : -DSYSTEM_BDB=ON -DSYSTEM_LEVELDB=ON -DSYSTEM_UNIVALUE=ON
44+ options : >-
45+ -DSYSTEM_BDB=ON
46+ -DSYSTEM_LEVELDB=ON
47+ -DSYSTEM_UNIVALUE=ON
4048 steps :
4149 - name : Checkout
4250 uses : actions/checkout@v3
7381 -DENABLE_TESTS=ON
7482 - name : Restore cache
7583 uses : actions/cache/restore@v3
84+ if : always()
7685 with :
7786 path : ${{env.CCACHE_DIR}}
7887 key : ccache-linux-${{matrix.tag}}-${{github.run_id}}
8392 cmake --build ${{github.workspace}}/build -v -j $(nproc)
8493 - name : Save cache
8594 uses : actions/cache/save@v3
95+ if : always()
8696 with :
8797 path : ${{env.CCACHE_DIR}}
8898 key : ccache-linux-${{matrix.tag}}-${{github.run_id}}
@@ -96,3 +106,89 @@ jobs:
96106 name : testlog-linux-${{matrix.tag}}
97107 path : ${{github.workspace}}/build/Testing/Temporary/LastTest.log
98108 retention-days : 7
109+
110+ test-macos :
111+ runs-on : macos-latest
112+ env :
113+ CCACHE_DIR : ${{github.workspace}}/ccache
114+ CCACHE_MAXSIZE : 400M
115+ CCACHE_COMPILERCHECK : content
116+ strategy :
117+ matrix :
118+ tag :
119+ - minimal
120+ - no-asm
121+ - gui-full
122+ - system-libs
123+ include :
124+ - tag : no-asm
125+ deps : null
126+ options : -DENABLE_PIE=ON -DUSE_ASM=OFF
127+ - tag : gui-full
128+ deps : >-
129+ miniupnpc
130+ qrencode
131+ qt@5
132+ options : >-
133+ -DENABLE_GUI=ON
134+ -DQt5_DIR=/usr/local/opt/qt5/lib/cmake/Qt5
135+ -DENABLE_QRENCODE=ON
136+ -DENABLE_UPNP=ON
137+ - tag : system-libs
138+ deps : >-
139+ berkeley-db@5
140+ secp256k1
141+ vim
142+ options : >-
143+ -DSYSTEM_BDB=ON
144+ -DBerkeleyDB_INCLUDE_DIR=/usr/local/opt/berkeley-db@5/include
145+ -DBerkeleyDB_CXX_LIBRARY=/usr/local/opt/berkeley-db@5/lib/libdb_cxx.dylib
146+ -DSYSTEM_SECP256K1=ON
147+ -DSYSTEM_XXD=ON
148+ steps :
149+ - name : Checkout
150+ uses : actions/checkout@v3
151+ - name : Install dependencies
152+ run : |
153+ brew install boost ccache ninja ${{matrix.deps}}
154+ - name : Configure
155+ run : |
156+ PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig:${PKG_CONFIG_PATH}"
157+ export PKG_CONFIG_PATH
158+
159+ pushd src
160+ ../contrib/nomacro.pl
161+ popd
162+
163+ cmake -B ${{github.workspace}}/build -G Ninja \
164+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
165+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
166+ ${{matrix.options}} \
167+ -DENABLE_TESTS=ON
168+ - name : Restore cache
169+ uses : actions/cache/restore@v3
170+ if : always()
171+ with :
172+ path : ${{env.CCACHE_DIR}}
173+ key : ccache-macos-${{matrix.tag}}-${{github.run_id}}
174+ restore-keys : |
175+ ccache-macos-${{matrix.tag}}-
176+ - name : Build
177+ run : |
178+ cmake --build ${{github.workspace}}/build -v -j $(sysctl -n hw.logicalcpu)
179+ - name : Save cache
180+ uses : actions/cache/save@v3
181+ if : always()
182+ with :
183+ path : ${{env.CCACHE_DIR}}
184+ key : ccache-macos-${{matrix.tag}}-${{github.run_id}}
185+ - name : Run tests
186+ run : |
187+ ctest --test-dir ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu)
188+ - name : Upload test logs
189+ uses : actions/upload-artifact@v3
190+ if : always()
191+ with :
192+ name : testlog-macos-${{matrix.tag}}
193+ path : ${{github.workspace}}/build/Testing/Temporary/LastTest.log
194+ retention-days : 7
0 commit comments