mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 14:17:52 -05:00
75 lines
2.2 KiB
YAML
75 lines
2.2 KiB
YAML
name: Test latest rips with latest ResInsight
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 5 * * *"
|
|
|
|
jobs:
|
|
test-latest-rips:
|
|
runs-on: ubuntu-26.04
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Download and unpack ResInsight
|
|
run: |
|
|
curl -fL \
|
|
-o resinsight.zip \
|
|
"https://github.com/CeetronSolutions/resinsight-builds/releases/download/dev-latest/ResInsight-Ubuntu.zip"
|
|
|
|
unzip -q resinsight.zip -d resinsight-install
|
|
|
|
- name: Find ResInsight executable
|
|
id: executable
|
|
run: |
|
|
executable="$(find resinsight-install -type f -name ResInsight | head -n 1)"
|
|
if [ -z "${executable}" ]; then
|
|
echo "Could not find ResInsight executable in downloaded archive"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -x "${executable}" ]; then
|
|
echo "ResInsight executable in downloaded archive is not executable"
|
|
exit 1
|
|
fi
|
|
|
|
echo "path=${executable}" >> "${GITHUB_OUTPUT}"
|
|
echo "Found executable: ${executable}"
|
|
|
|
- name: Install Linux runtime dependencies
|
|
run: |
|
|
sudo apt-get update --option="APT::Acquire::Retries=3"
|
|
sudo apt-get install --option="APT::Acquire::Retries=3" -y \
|
|
libxkbcommon-x11-0 \
|
|
libgl1-mesa-dev \
|
|
mesa-common-dev \
|
|
libglfw3-dev \
|
|
libglu1-mesa-dev
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v7
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Install latest rips from PyPI
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install rips
|
|
|
|
- name: Verify ResInsight and rips communication
|
|
env:
|
|
RESINSIGHT_EXECUTABLE: ${{ steps.executable.outputs.path }}
|
|
run: |
|
|
python - <<'PYCODE'
|
|
import os
|
|
import rips
|
|
|
|
executable = os.environ["RESINSIGHT_EXECUTABLE"]
|
|
print(f"Using executable: {executable}")
|
|
|
|
instance = rips.Instance.launch(resinsight_executable=executable, console=True, init_timeout=120)
|
|
print(f"Connected to ResInsight server version: {instance.version_string()}")
|
|
instance.project.close()
|
|
instance.exit()
|
|
PYCODE
|