From ee501e94d9a5711d04f2b15fb6038139ee0c744d Mon Sep 17 00:00:00 2001 From: Andreas Eknes Lie Date: Fri, 16 Feb 2024 16:11:47 +0100 Subject: [PATCH] Build wheels for x86_64, intel and apple macOS Focus testing mostly on python 3.8, 3.11, 3.12 See table overview; https://github.com/equinor/ert/pull/7204#issuecomment-1953179760 Brew hdf5 when macOS --- .github/workflows/build_and_test.yml | 34 +++++++++---------- .../workflows/run_ert_test_data_setups.yml | 16 +++++++-- .github/workflows/test_ert.yml | 4 +++ 3 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index c454850ad31..9066dd10d78 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'macos-13-xl'] + os: ['ubuntu-latest', 'macos-13', 'macos-latest-xlarge'] runs-on: ${{ matrix.os }} @@ -106,8 +106,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ '3.10', '3.11', '3.12' ] - os: [ 'macos-13-xl' ] + python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + os: [ 'macos-13', 'macos-latest-xlarge' ] + exclude: + - os: 'macos-latest-xlarge' + python-version: '3.8' + - os: 'macos-latest-xlarge' + python-version: '3.9' uses: ./.github/workflows/build-wheels-macos.yml with: @@ -120,18 +125,8 @@ jobs: fail-fast: false matrix: test-type: [ 'integration-tests', 'unit-tests', 'gui-test' ] - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + python-version: [ '3.8', '3.11', '3.12' ] os: [ ubuntu-latest ] - exclude: - - os: ubuntu-latest - python-version: '3.9' - test-type: 'gui-test' - - os: ubuntu-latest - python-version: '3.10' - test-type: 'gui-test' - - os: ubuntu-latest - python-version: '3.11' - test-type: 'gui-test' uses: ./.github/workflows/test_ert.yml with: os: ${{ matrix.os }} @@ -144,7 +139,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest ] - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + python-version: [ '3.8', '3.11', '3.12' ] uses: ./.github/workflows/test_ert_with_slurm.yml with: os: ${{ matrix.os }} @@ -156,8 +151,13 @@ jobs: fail-fast: false matrix: test-type: [ 'integration-tests', 'unit-tests', 'gui-test' ] - python-version: [ '3.10', '3.11', '3.12' ] - os: [ 'macos-13-xl' ] + python-version: [ '3.8', '3.10', '3.11', '3.12' ] + os: [ 'macos-13', 'macos-latest-xlarge' ] + exclude: + - os: 'macos-13' + python-version: '3.10' + - os: 'macos-latest-xlarge' + python-version: '3.8' uses: ./.github/workflows/test_ert.yml with: os: ${{ matrix.os }} diff --git a/.github/workflows/run_ert_test_data_setups.yml b/.github/workflows/run_ert_test_data_setups.yml index 93f5a21886b..991c9c0f97e 100644 --- a/.github/workflows/run_ert_test_data_setups.yml +++ b/.github/workflows/run_ert_test_data_setups.yml @@ -21,10 +21,14 @@ jobs: fail-fast: false matrix: python-version: ['3.8', '3.10', '3.11', '3.12'] - os: [ubuntu-latest, macos-13-xl] + os: [ubuntu-latest, macos-13, macos-latest-xlarge] exclude: + - python-version: '3.10' + os: ubuntu-latest + - python-version: '3.10' + os: macos-13 - python-version: '3.8' - os: macos-13-xl + os: macos-latest-xlarge runs-on: ${{ matrix.os }} @@ -43,21 +47,29 @@ jobs: run: | sudo apt-get update sudo apt-get install xvfb libxcb-image0 libxcb-icccm4 libxcb-keysyms1 libxcb-randr0 libxcb-render0 libxcb-render-util0 libxcb-shape0 libxcb-shm0 libxcb-xfixes0 libxcb-xinerama0 libfontconfig1 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 + + - name: Install HDF5 source files + if: matrix.os == 'macos-latest-xlarge' + run: brew install hdf5 + - name: Install ERT and dependencies run: | pip install . + - name: Test poly example run: | pushd test-data/poly_example ert test_run poly.ert ert test_run --enable-scheduler poly.ert popd + - name: Test snake_oil run: | pushd test-data/snake_oil pip install oil_reservoir_synthesizer ert test_run snake_oil.ert popd + - name: Test snake_oil_field run: | pushd test-data/snake_oil_field diff --git a/.github/workflows/test_ert.yml b/.github/workflows/test_ert.yml index 6852efeaa52..67f62d9aa5c 100644 --- a/.github/workflows/test_ert.yml +++ b/.github/workflows/test_ert.yml @@ -29,6 +29,10 @@ jobs: cache-dependency-path: | pyproject.toml + - name: Install HDF5 source files + if: runner.os == 'macOS' + run: brew install hdf5 + - name: Get wheels uses: actions/download-artifact@v3 timeout-minutes: 5