Skip to content

5 add capacity analysis #194

5 add capacity analysis

5 add capacity analysis #194

Workflow file for this run

# Workflow building PML and performing basic tests
# The command sbt test should end successfully to perform your branch merge on master
name: Scala CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Fetch repo
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: sbt
- name: Set up SBT
uses: sbt/setup-sbt@v1
# Since monosat compilation is time-consuming try first to find the binaries in cache
- name: Cache Monosat JAR and SO
id: cache-monosat
uses: actions/cache@v3
env:
cache-name: cache-monosat-module
with:
path: |
lib/monosat.jar
binlib/libmonosat.so
key: ${{ runner.os }}-build-${{ env.cache-name }}
# If cache miss first get monosat source files
- if: ${{ steps.cache-monosat.outputs.cache-hit != 'true' }}
name: Get Monosat
uses: actions/checkout@v3
with:
repository: sambayless/monosat
path: monosat
# If cache miss configure project
- if: ${{ steps.cache-monosat.outputs.cache-hit != 'true' }}
name: Configure Project
uses: threeal/cmake-action@v1.3.0
with:
source-dir: 'monosat'
args: '-DJAVA=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5'
# If cache miss compile monosat
- if: ${{ steps.cache-monosat.outputs.cache-hit != 'true' }}
name: Compile Monosat
run: make
working-directory: 'monosat/build'
# If cache miss put monosat.jar in local lib
- if: ${{ steps.cache-monosat.outputs.cache-hit != 'true' }}
name: Moving monosat.jar and monosat.so
run: |
cp monosat/build/monosat.jar lib
mkdir binlib
cp monosat/build/libmonosat.so binlib
- name: Install MiniZinc
run: sudo snap install minizinc --classic
- name: Set env
run: echo "LD_LIBRARY_PATH=$PWD/binlib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Run tests
run: sbt test