73 develop a choco backend #150
This file contains hidden or 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: | |
| - name: install LFS | |
| run: git lfs install --system | |
| - name: Fetch repo | |
| run: | | |
| git clone https://github.com/${{ github.repository }} pml-analyzer | |
| cd pml-analyzer | |
| git checkout --progress --force ${{ github.reference }} | |
| git lfs fetch | |
| git lfs pull | |
| - name: Test LFS Checkout | |
| run: cat src/test/resources/mySys/MySys_itf_2.txt | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 8 | |
| 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/[email protected] | |
| 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: Set env | |
| run: echo "LD_LIBRARY_PATH=$PWD/binlib" >> $GITHUB_ENV | |
| - name: Run tests | |
| run: sbt test |