mirror of
https://github.com/Z3Prover/z3
synced 2026-02-16 22:01:44 +00:00
Add Go bindings support to ubuntu-cmake CI builds
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
ccb9de7201
commit
c454b14c24
1 changed files with 23 additions and 4 deletions
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
|
|
@ -279,22 +279,22 @@ jobs:
|
|||
- name: releaseClang
|
||||
setupCmd1: ''
|
||||
setupCmd2: ''
|
||||
buildCmd: 'CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -G "Ninja" ../'
|
||||
buildCmd: 'CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -DZ3_BUILD_GO_BINDINGS=True -G "Ninja" ../'
|
||||
runTests: true
|
||||
- name: debugClang
|
||||
setupCmd1: 'julia -e "using Pkg; Pkg.add(PackageSpec(name=\"libcxxwrap_julia_jll\"))"'
|
||||
setupCmd2: 'JlCxxDir=$(julia -e "using libcxxwrap_julia_jll; print(dirname(libcxxwrap_julia_jll.libcxxwrap_julia_path))")'
|
||||
buildCmd: 'CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir/cmake/JlCxx -DZ3_BUILD_JULIA_BINDINGS=True -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -G "Ninja" ../'
|
||||
buildCmd: 'CC=clang CXX=clang++ cmake -DJlCxx_DIR=$JlCxxDir/cmake/JlCxx -DZ3_BUILD_JULIA_BINDINGS=True -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -DZ3_BUILD_GO_BINDINGS=True -G "Ninja" ../'
|
||||
runTests: true
|
||||
- name: debugGcc
|
||||
setupCmd1: ''
|
||||
setupCmd2: ''
|
||||
buildCmd: 'CC=gcc CXX=g++ cmake -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -G "Ninja" ../'
|
||||
buildCmd: 'CC=gcc CXX=g++ cmake -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -DZ3_BUILD_GO_BINDINGS=True -G "Ninja" ../'
|
||||
runTests: true
|
||||
- name: releaseSTGcc
|
||||
setupCmd1: ''
|
||||
setupCmd2: ''
|
||||
buildCmd: 'CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DZ3_SINGLE_THREADED=ON -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -G "Ninja" ../'
|
||||
buildCmd: 'CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DZ3_SINGLE_THREADED=ON -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -DZ3_BUILD_GO_BINDINGS=True -G "Ninja" ../'
|
||||
runTests: false
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
|
@ -308,6 +308,11 @@ jobs:
|
|||
- name: Install Ninja
|
||||
run: sudo apt-get update && sudo apt-get install -y ninja-build
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.20'
|
||||
|
||||
- name: Setup Julia (if needed)
|
||||
if: matrix.name == 'debugClang'
|
||||
uses: julia-actions/setup-julia@v2
|
||||
|
|
@ -352,6 +357,20 @@ jobs:
|
|||
examples/c_maxsat_example_build_dir/c_maxsat_example ../examples/maxsat/ex.smt
|
||||
cd ..
|
||||
|
||||
- name: Build Go bindings
|
||||
if: matrix.runTests
|
||||
run: |
|
||||
cd build
|
||||
ninja go-bindings
|
||||
cd ..
|
||||
|
||||
- name: Test Go bindings
|
||||
if: matrix.runTests
|
||||
run: |
|
||||
cd build
|
||||
ninja test-go-examples
|
||||
cd ..
|
||||
|
||||
- name: Clone z3test
|
||||
if: matrix.runTests
|
||||
run: git clone https://github.com/z3prover/z3test z3test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue