Add scala logo #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: 'sbt' | |
# 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/[email protected] | |
with: | |
source-dir: 'monosat' | |
args: '-DJAVA=ON' | |
# 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: Set env | |
run: echo "LD_LIBRARY_PATH=$PWD/binlib" >> $GITHUB_ENV | |
- name: Run tests | |
run: sbt test | |
- name: Perform an interference analysis | |
run: sbt "runMain onera.pmlanalyzer.views.interference.examples.simpleKeystone.SimpleKeystoneInterferenceGeneration" |