Use new github runner versions #75
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: | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: zulu | |
- name: Cache Storm download | |
run: | | |
. /etc/os-release | |
curl https://www.ennoruijters.nl/package.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/ennoruijters.gpg >/dev/null | |
echo "deb [signed-by=/usr/share/keyrings/ennoruijters.gpg] http://packages.ennoruijters.nl $VERSION_CODENAME 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 storm | |
sudo tar cf apt-archive.tar apt-archive/archives | |
- name: Compile | |
run: make jar | |
- name: Tests | |
run: cd tests && bash test.sh --dft storm | |
- name: Package | |
run: make deb rpm 'RPMBUILD_FLAGS=--nodeps --nocheck' 'DPKG_FLAGS=-d' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: binary-packages-${{ matrix.os }} | |
path: | | |
dftres-*.noarch.rpm | |
dftres_*_all.deb |