Skip to content

Fix encoding of signed integer divisions #11

Fix encoding of signed integer divisions

Fix encoding of signed integer divisions #11

Workflow file for this run

name: Deploy
on:
push:
branches: 'master'
paths-ignore: 'docs/**'
env:
RUST_BACKTRACE: 1
PRUSTI_ASSERT_TIMEOUT: 60000
jobs:
# Build and test in release mode
build:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: '15'
- name: Set up the environment
run: python x.py setup
- name: Build with cargo --release
run: python x.py build --release --all
- name: Run cargo tests --release
run: python x.py test --release --all
- name: Package Prusti artifact
run: python x.py package release prusti_artifact
- name: Test Prusti artifact
run: python x.py test-package prusti_artifact
- name: Upload Prusti artifact
uses: actions/upload-artifact@v3
with:
name: prusti-release-${{ matrix.os }}
if-no-files-found: error
path: prusti_artifact/**
# Build in release mode (but don't test) for macOS ARM
# See: https://stackoverflow.com/a/66875783/2491528
# Blocked by: https://github.com/viperproject/prusti-dev/issues/1193
build_macos_arm:
if: false
runs-on: macos-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: '15'
- name: Set up the environment
run: python x.py setup
- name: Install the ARM toolchain
run: rustup target add aarch64-apple-darwin
- name: Build with cargo --release for arm64
run: |
SDKROOT=$(xcrun -sdk macosx --show-sdk-path) \
MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version) \
python x.py build --release --all --target=aarch64-apple-darwin
- name: Package Prusti artifact
run: python x.py package release prusti_artifact
- name: Upload Prusti artifact
uses: actions/upload-artifact@v3
with:
name: prusti-release-macos-arm
if-no-files-found: error
path: prusti_artifact/**
# Deploy to a new GitHub pre-release
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all Prusti artifacts
uses: actions/download-artifact@v2
- name: Zip Prusti artifacts
shell: bash
run: |
for os in ubuntu-20.04 ubuntu-22.04 windows-latest macos-latest
do
echo "Package Prusti artifact for $os"
cd prusti-release-$os
zip -r prusti.zip *
cd ..
done
- name: Create release tag
shell: bash
run: echo "TAG_NAME=$(date +v-%Y-%m-%d-%H%M)" >> $GITHUB_ENV
- name: Create a nightly release
id: create_release
uses: viperproject/create-nightly-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: Nightly Release ${{ env.TAG_NAME }}
keep_num: 2
- name: Upload release asset for Ubuntu 20.04
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./prusti-release-ubuntu-20.04/prusti.zip
asset_name: mendel-release-ubuntu-20.04.zip
asset_content_type: application/zip
- name: Upload release asset for Ubuntu 22.04
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./prusti-release-ubuntu-22.04/prusti.zip
asset_name: mendel-release-ubuntu-22.04.zip
asset_content_type: application/zip
- name: Upload release asset for Windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./prusti-release-windows-latest/prusti.zip
asset_name: mendel-release-windows.zip
asset_content_type: application/zip
- name: Upload release asset for MacOS
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./prusti-release-macos-latest/prusti.zip
asset_name: mendel-release-macos.zip
asset_content_type: application/zip