Skip to content

Make pip wheel with Dakota+Carolina #81

Make pip wheel with Dakota+Carolina

Make pip wheel with Dakota+Carolina #81

name: 🏎️ Make & Test Wheels 🏎️
on: [pull_request]
env:
ERT_SHOW_BACKTRACE: 1
NO_PROJECT_RES: 1
BOOST_VERSION: 1.82.0
BOOST_VERSION_UNDERSCORES: 1_82_0
DAKOTA_VERSION: 6.18.0
INSTALL_DIR: local
jobs:
build_wheels:
name: πŸ›ž Build Wheels πŸ›ž
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
os: [ubuntu-latest]
ert-version: ['main']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
id: cache-package-check
with:
key: carolina_dist_${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ env.BOOST_VERSION }}_dakota-${{ env.DAKOTA_VERSION }}
path: ./carolina_dist
- name: Build Linux Wheel
if: steps.cache-package-check.outputs.cache-hit != 'true'
uses: docker://quay.io/pypa/manylinux2014_x86_64
with:
entrypoint: /bin/bash
args: '-c "sh dakota_manylinux_install_files/build_wheels_gha.sh"'
- uses: actions/cache/save@v3
if: steps.cache-package-check.outputs.cache-hit != 'true'
id: cache-package-store
with:
key: carolina_dist_${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ env.BOOST_VERSION }}_dakota-${{ env.DAKOTA_VERSION }}
path: ./carolina_dist
- name: Get Carolina wheel from cache
uses: actions/cache/restore@v3
id: restore-cached-package
with:
key: carolina_dist_${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ env.BOOST_VERSION }}_dakota-${{ env.DAKOTA_VERSION }}
path: /local/carolina_dist
# - name: Test Linux Wheel on ManyLinux docker
# uses: docker://quay.io/pypa/manylinux2014_x86_64
# env:
# DEPENDENCY_ACCESS_TOKEN: ${{ secrets.DEPENDENCY_ACCESS_TOKEN }}''
# NO_PROJECT_RES: 1
# ERT_SHOW_BACKTRACE: 1
# QT_QPA_PLATFORM: 'minimal'
# with:
# entrypoint: /bin/bash
# args: '-c "sh dakota_manylinux_install_files/test_wheels_gha.sh"'
# - name: Test Linux Wheel on Linux
# env:
# DEPENDENCY_ACCESS_TOKEN: ${{ secrets.DEPENDENCY_ACCESS_TOKEN }}
# NO_PROJECT_RES: 1
# ERT_SHOW_BACKTRACE: 1
# QT_QPA_PLATFORM: 'minimal'
# run: |
# sh dakota_manylinux_install_files/test_wheels_gha.sh
- name: Install carolina
run: |
pwd
find / -name carolina*.whl
python3.10 -m pip install /local/carolina_dist/dist/carolina-1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- name: Install Everest and dependencies
run: |
pip install git+https://${{ secrets.DEPENDENCY_ACCESS_TOKEN }}@github.com/equinor/spinningjenny.git
pip install git+https://${{ secrets.DEPENDENCY_ACCESS_TOKEN }}@github.com/TNO-Everest/[email protected]
pip install .[test,docs]
- name: Install latest ert main
if: matrix.ert-version == 'main'
run: |
sudo apt-get install build-essential
pip install git+https://github.com/equinor/ert.git
- name: Run Tests
if: matrix.test_type == 'test'
run: |
pytest tests -n 4 -m "not ui_test and not integration_test" --dist loadgroup -sv
- name: Run Integration Tests
if: matrix.test_type == 'integration-test'
run: |
pytest tests -n 4 -m "integration_test" --dist loadgroup
- name: Build Documentation
if: matrix.test_type == 'doc'
run: |
mkdir tmp
sphinx-build -W -b html -d tmp/doctrees docs/source {envtmpdir}/html
- name: Run UI Tests
if: matrix.test_type == 'ui-test'
env:
QT_QPA_PLATFORM: 'minimal'
run: |
python -m pytest -m "ui_test"
- name: Upload wheel as artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }} Python ${{ matrix.python-version }} wheel
path: |
dist/*
trace/*