Use installation #90
Workflow file for this run
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
name: Compile and Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Ready dependencies | |
run: | | |
curl https://www.ennoruijters.nl/package.gpg | sudo apt-key add - | |
echo "deb http://packages.ennoruijters.nl jammy main" | sudo tee -a /etc/apt/sources.list | |
sudo apt update | |
sudo apt-cache show storm | grep Version | sed -e 's/Version: /STORM_VERSION=/' >> $GITHUB_ENV | |
sudo mkdir apt-archive | |
- name: APT cache | |
uses: actions/cache@v4 | |
with: | |
path: apt-archive.tar | |
key: ${{ runner.os }}-apt-${{ env.STORM_VERSION }} | |
- name: Install dependencies | |
run: | | |
if [ -e apt-archive.tar ]; then sudo tar xf apt-archive.tar; fi | |
sudo apt-get -o dir::cache=$GITHUB_WORKSPACE/apt-archive install libfl-dev libbison-dev libyaml-cpp-dev libgsl-dev storm | |
sudo tar cf apt-archive.tar apt-archive/archives | |
- name: Prepare to build DFTCalc | |
run: mkdir build && cd build && cmake -DDFTROOT=$GITHUB_WORKSPACE/dftroot .. | |
- name: Compile DFTCalc | |
run: cd build && make -j4 install | |
- name: Checkout DFTRES | |
uses: actions/checkout@v4 | |
with: | |
repository: utwente-fmt/DFTRES | |
path: DFTRES | |
- name: Set PATHs | |
run: | | |
echo ${{github.workspace}}/imrmc/bin >> $GITHUB_PATH | |
echo ${{github.workspace}}/dftroot/bin >> $GITHUB_PATH | |
- name: Get cache revisions | |
id: cache-revs | |
run: | | |
cd DFTRES && echo "dftres=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
echo "imrmc=$(git ls-remote git://git.ennoruijters.nl/imrmc.git | grep '\srefs/heads/master$' | grep -o '^[0-9a-z]\+')" >> $GITHUB_OUTPUT | |
echo "imrmc-march=$(gcc -march=native -E -v - </dev/null 2>&1 | grep cc1 | sha256sum | grep -o '^[0-9a-z]\+')" >> $GITHUB_OUTPUT | |
- name: Cache DFTRES | |
id: cache-dftres | |
uses: actions/cache@v4 | |
with: | |
path: DFTRES/DFTRES.jar | |
key: ${{ runner.os }}-dftres-${{ steps.cache-revs.outputs.dftres }} | |
- name: Compile DFTRES if needed | |
if: steps.cache-dftres.outputs.cache-hit != 'true' | |
run: cd DFTRES && make jar | |
- name: Cache IMRMC | |
id: cache-imrmc | |
uses: actions/cache@v4 | |
with: | |
path: imrmc/bin/imrmc | |
key: ${{ runner.os }}-imrmc-${{ steps.cache-revs.outputs.imrmc }}-${{ steps.cache-revs.outputs.imrmc-march }} | |
- name: Checkout IMRMC | |
if: steps.cache-imrmc.outputs.cache-hit != 'true' | |
run: git clone --depth 1 git://git.ennoruijters.nl/imrmc.git imrmc | |
- name: Compile IMRMC | |
if: steps.cache-imrmc.outputs.cache-hit != 'true' | |
run: cd imrmc && make all -j4 | |
- name: Tests | |
env: | |
DFTRES: ${{github.workspace}}/DFTRES | |
run: cd test && bash test.sh --exact --imrmc && bash test.sh --exact --storm && bash test.sh --storm | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: test-results | |
path: test/output |