Skip to content

Commit

Permalink
Merge pull request #6 from daniel-larraz/z3-static
Browse files Browse the repository at this point in the history
Add option to compile static z3 binary
  • Loading branch information
daniel-larraz authored Mar 15, 2023
2 parents 3a6defe + b814e4e commit 1c37ea5
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
platform: [linux-x64, darwin-x64, darwin-arm64]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
include:
- platform: linux-x64
z3_static: z3-static
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -24,7 +27,7 @@ jobs:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Configure dependencies
run: ./configure.sh ${{ matrix.platform }}
run: ./configure.sh ${{ matrix.platform }} ${{ matrix.z3_static }}
- name: Package & Publish extension (platform-specific)
if: ${{ matrix.platform != 'linux-x64' }}
run: npx vsce publish --target ${{ matrix.platform }}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Version 0.6.1
- Build static Z3 binary for universal version.

### Version 0.6.0
The last three releases (0.5.2 - 0.5.4) were published only for `linux-x64` and `darwin-x64`. This made hard (and sometimes impossible) to install the extension on Windows (through WSL2) and other platforms. This release fixes the issue by providing three versions:

Expand Down
29 changes: 23 additions & 6 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,33 @@ KIND2_TAR_NAME=kind2-v$KIND2_VERSION-$KIND2_OS_VERSION
# Remove old configurations
rm -rf z3 kind2 kind2-language-server
rm -f $Z3_ZIP_NAME.zip
rm -rf $Z3_ZIP_NAME
rm -rf $Z3_ZIP_NAME z3-z3-$Z3_VERSION
rm -f $KIND2_TAR_NAME.tar.gz
rm -f kind2-language-server.zip

# Install Z3
wget https://github.com/Z3Prover/z3/releases/download/z3-$Z3_VERSION/$Z3_ZIP_NAME.zip
unzip -o $Z3_ZIP_NAME.zip
rm $Z3_ZIP_NAME.zip
cp $Z3_ZIP_NAME/bin/z3 .
rm -r $Z3_ZIP_NAME
case "$2" in
z3-static)
wget https://github.com/Z3Prover/z3/archive/refs/tags/z3-$Z3_VERSION.tar.gz
tar xvf z3-$Z3_VERSION.tar.gz
rm z3-$Z3_VERSION.tar.gz
pushd z3-z3-$Z3_VERSION/
python3 scripts/mk_make.py --staticbin
pushd build/
make -j4
popd
popd
cp z3-z3-$Z3_VERSION/build/z3 .
strip z3
rm -r z3-z3-$Z3_VERSION/
;;
*)
wget https://github.com/Z3Prover/z3/releases/download/z3-$Z3_VERSION/$Z3_ZIP_NAME.zip
unzip -o $Z3_ZIP_NAME.zip
rm $Z3_ZIP_NAME.zip
cp $Z3_ZIP_NAME/bin/z3 .
rm -r $Z3_ZIP_NAME;;
esac

# Install Kind 2
wget https://github.com/kind2-mc/kind2/releases/download/v$KIND2_VERSION/$KIND2_TAR_NAME.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Language support for Kind 2",
"author": "The Kind 2 development team",
"license": "MIT",
"version": "0.6.0",
"version": "0.6.1",
"preview": true,
"repository": {
"type": "git",
Expand Down

0 comments on commit 1c37ea5

Please sign in to comment.