Updated AFP hashes #265
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: test-qrhl-tool | |
on: [push] | |
jobs: | |
test-qrhl: | |
strategy: | |
matrix: | |
os: [linux, windows, macos] | |
runs-on: [self-hosted, "${{matrix.os}}"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Running tests (Linux) | |
if: matrix.os == 'linux' | |
run: | | |
git submodule foreach --recursive git clean -ffdx # GitHub actions doesn't clean the submodules, see https://github.com/actions/checkout/issues/358 | |
ISABELLE_VERSION="`cat src/main/resources/qrhl/isabellex/isabelleVersion`" | |
echo "isabelle-home = /opt/Isabelle$ISABELLE_VERSION" >qrhl-tool.conf | |
echo "afp-root = /opt/afp-$ISABELLE_VERSION" >>qrhl-tool.conf | |
sbt 'testOnly -- -h target/test-reports-html' | |
- name: Running tests (Windows) | |
if: matrix.os == 'windows' | |
run: | | |
git submodule foreach --recursive git clean -ffdx # GitHub actions doesn't clean the submodules, see https://github.com/actions/checkout/issues/358 | |
$ISABELLE_VERSION = Get-Content -Path src\main\resources\qrhl\isabellex\isabelleVersion | |
Set-Content -Path qrhl-tool.conf -Value "isabelle-home = c:\Isabelle$ISABELLE_VERSION" | |
Add-Content -Path qrhl-tool.conf -Value "afp-root = c:\afp-$ISABELLE_VERSION" | |
sbt 'testOnly -- -h target/test-reports-html' | |
- name: Running tests (MacOS) | |
if: matrix.os == 'macos' | |
run: | | |
ifconfig # To find out address for SSHing | |
git submodule foreach --recursive git clean -ffdx # GitHub actions doesn't clean the submodules, see https://github.com/actions/checkout/issues/358 | |
~/keepawake.sh & # A script to keep the Mac from falling asleep. Caffeinate doesn't seem to work on my Mac | |
ISABELLE_VERSION="`cat src/main/resources/qrhl/isabellex/isabelleVersion`" | |
echo "isabelle-home = $HOME/Isabelle$ISABELLE_VERSION.app" >qrhl-tool.conf | |
echo "afp-root = $HOME/afp-$ISABELLE_VERSION" >>qrhl-tool.conf | |
# My Mac is very small. So we make sure there is no other parallel GitHub action running before continuing. | |
while pgrep -l -f sbt-launch.jar; do echo "Another sbt is running. To keep load low, we wait until it finishes."; caffeinate -i -t 300; done | |
~/keepawake.sh & # Another invocation in case we waited very long | |
sbt 'testOnly -- -h target/test-reports-html' | |
# - name: Cleanup (MacOS) | |
# if: matrix.os == 'macos' | |
# run: | | |
# kill `cat keepawake.pid` || true | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: test-reports-html-${{matrix.os}} | |
path: target/test-reports-html | |
qrhl-zip: | |
runs-on: [self-hosted, linux] | |
needs: test-qrhl | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: make qrhl.zip | |
run: | | |
set -e | |
git clean -fdx # Otherwise GITREVISION in qrhl.zip may say "(modified working copy)" | |
make qrhl.zip | |
# This uploads a double ZIP (see https://github.com/actions/upload-artifact#zipped-artifact-downloads). | |
# We cannot circumvent this by giving a directory to `upload-artifact` (as done in c618ad87) because then executable bits are lost. | |
# (See https://github.com/actions/upload-artifact#permission-loss). | |
- name: Upload qrhl.zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: qrhl | |
path: qrhl.zip |