inputs:
binary:
description: file name of binary
+ release-name:
+ description: name of binary in release
github-token:
description: token to upload binary
runs:
- name: Rename binaries for release
shell: bash
run: |
- cp ${{ inputs.binary }} cvc5-${{ runner.os }}
+ cp ${{ inputs.binary }} ${{ inputs.release-name }}
- name: Add binaries to release
uses: softprops/action-gh-release@v1
with:
token: ${{ inputs.github-token }}
- files: cvc5-*
+ files: ${{ inputs.release-name }}
default: false
with-python-packaging:
default: false
+ windows-build:
+ default: false
+ type: boolean
runs:
using: composite
steps:
echo "/usr/lib/ccache" >> $GITHUB_PATH
echo "::endgroup::"
+ - name: Install software for cross-compiling for Windows
+ # Boolean inputs are actually strings:
+ # https://github.com/actions/runner/issues/1483
+ if: inputs.windows-build == 'true'
+ shell: bash
+ run: |
+ echo "::group::Install software for cross-compiling for Windows"
+ sudo apt-get update
+ sudo apt-get install -y \
+ mingw-w64
+ echo "::endgroup::"
+
# Note: macOS comes with a libedit; it does not need to brew-installed
- name: Install macOS software
if: runner.os == 'macOS'
python-bindings: true
build-documentation: true
check-examples: true
- store-to-release: true
+ store-to-release-name: cvc5-Linux
exclude_regress: 3-4
run_regression_args: --tester base --tester model --tester synth --tester abduct --tester dump
cache-key: production
python-bindings: true
check-examples: true
- store-to-release: true
+ store-to-release-name: cvc5-macOS
exclude_regress: 3-4
run_regression_args: --tester base --tester model --tester synth --tester abduct --tester dump
+ - name: win64:production
+ os: ubuntu-latest
+ config: production --auto-download --win64
+ cache-key: productionwin64
+ windows-build: true
+ store-to-release-name: cvc5-Win64.exe
+ binary-ext: .exe
+
- name: ubuntu:production-clang
os: ubuntu-18.04
env: CC=clang CXX=clang++
with:
with-documentation: ${{ matrix.build-documentation }}
with-python-bindings: ${{ matrix.python-bindings }}
+ windows-build: ${{ matrix.windows-build }}
- name: Setup caches
uses: ./.github/actions/setup-cache
run: ccache -s
- name: Run tests
+ if: matrix.run_regression_args
uses: ./.github/actions/run-tests
with:
build-dir: ${{ steps.configure-and-build.outputs.shared-build-dir }}
regressions-exclude: ${{ matrix.exclude_regress }}
- name: Run tests
+ if: matrix.run_regression_args
uses: ./.github/actions/run-tests
with:
build-dir: ${{ steps.configure-and-build.outputs.static-build-dir }}
build-dir: ${{ steps.configure-and-build.outputs.shared-build-dir }}
- name: Add binary to release
- if: matrix.store-to-release && startsWith(github.ref, 'refs/tags/')
+ if: matrix.store-to-release-binary && startsWith(github.ref, 'refs/tags/')
uses: ./.github/actions/add-to-release
with:
- binary: ${{ steps.configure-and-build.outputs.static-build-dir }}/bin/cvc5
+ binary: ${{ steps.configure-and-build.outputs.static-build-dir }}/bin/cvc5${{ matrix.binary-ext }}
+ release-name: ${{ matrix.store-to-release-name }}
github-token: ${{ secrets.GITHUB_TOKEN }}
if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,100000000")
+
+ # ANTLR uses pragmas that certain versions of MinGW does not support
+ add_check_c_cxx_flag("-Wno-error=unknown-pragmas")
endif ()
#-----------------------------------------------------------------------------#
namespace cvc5 {
-template <class T, class U>
-std::ostream& operator<<(std::ostream& out,
- const std::pair<T, U>& p) CVC5_EXPORT;
-
template <class T, class U>
std::ostream& operator<<(std::ostream& out, const std::pair<T, U>& p) {
return out << "[" << p.first << "," << p.second << "]";
/** A null output stream singleton */
extern std::ostream null_os CVC5_EXPORT;
-class CVC5_EXPORT Cvc5ostream
+class Cvc5ostream
{
- static const std::string s_tab;
- static const int s_indentIosIndex;
+ static const std::string s_tab CVC5_EXPORT;
+ static const int s_indentIosIndex CVC5_EXPORT;
/** The underlying ostream */
std::ostream* d_os;
std::ostream* getStreamPointer() const { return d_os; }
template <class T>
- Cvc5ostream& operator<<(T const& t) CVC5_EXPORT;
+ Cvc5ostream& operator<<(T const& t)
+ {
+ if (d_os != nullptr)
+ {
+ if (d_firstColumn)
+ {
+ d_firstColumn = false;
+ long indent = d_os->iword(s_indentIosIndex);
+ for (long i = 0; i < indent; ++i)
+ {
+ d_os = &(*d_os << s_tab);
+ }
+ }
+ *d_os << t;
+ }
+ return *this;
+ }
// support manipulators, endl, etc..
Cvc5ostream& operator<<(std::ostream& (*pf)(std::ostream&))
return stream;
}
-template <class T>
-Cvc5ostream& Cvc5ostream::operator<<(T const& t)
-{
- if(d_os != NULL) {
- if(d_firstColumn) {
- d_firstColumn = false;
- long indent = d_os->iword(s_indentIosIndex);
- for(long i = 0; i < indent; ++i) {
- d_os = &(*d_os << s_tab);
- }
- }
- d_os = &(*d_os << t);
- }
- return *this;
-}
-
/**
* Does nothing; designed for compilation of non-debug/non-trace
* builds. None of these should ever be called in such builds, but we