Skip to content

Commit

Permalink
ci: composite python. Temp disable macOS
Browse files Browse the repository at this point in the history
GHA macOS images continue to have macOS Xcode SDK issues
  • Loading branch information
scivision committed Jun 5, 2024
1 parent 7cacaec commit bfb37bf
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 53 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,16 @@ jobs:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest]
include:
- os: macos-latest
python-version: '3.12'
# include:
# - os: macos-latest
# python-version: '3.12'

runs-on: ${{ matrix.os }}

name: ${{ matrix.os }} Python ${{ matrix.python-version }}

steps:

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Git Checkout ${{ github.action_repository }}
uses: actions/checkout@v4

Expand All @@ -83,16 +79,8 @@ jobs:
- uses: ./.github/workflows/composite-gemini3d
timeout-minutes: 15

- name: Install Python packages
run: python -m pip install .[tests,plots]
timeout-minutes: 5
# transient CI download speed

- name: Unit and Integration Tests
run: pytest ${{ github.workspace }}
- uses: ./.github/workflows/composite-python
timeout-minutes: 15
env:
GEMCI_ROOT: ${{ github.workspace }}/gemci

# codecov coverage
# - run: pip install codecov pytest-cov
Expand Down
74 changes: 37 additions & 37 deletions .github/workflows/composite-gemini3d/action.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
runs:

using: 'composite'
using: 'composite'

steps:
steps:

- name: GCC compiler (macOS)
shell: bash
if: runner.os == 'macOS'
run: |
echo "CC=gcc-13" >> $GITHUB_ENV
echo "CXX=g++-13" >> $GITHUB_ENV
echo "FC=gfortran-13" >> $GITHUB_ENV
- name: GCC compiler (macOS)
shell: bash
if: runner.os == 'macOS'
run: |
echo "CC=gcc-13" >> $GITHUB_ENV
echo "CXX=g++-13" >> $GITHUB_ENV
echo "FC=gfortran-13" >> $GITHUB_ENV
- name: Checkout GemGI (for simulation config.nml inputs)
uses: actions/checkout@v4
with:
repository: gemini3d/gemci
path: ${{ github.workspace }}/gemci
- name: Checkout GemGI (for simulation config.nml inputs)
uses: actions/checkout@v4
with:
repository: gemini3d/gemci
path: ${{ github.workspace }}/gemci

- name: Cache install Gemini3D
id: cache-gemini
uses: actions/cache@v4
with:
path: |
${{ env.CMAKE_INSTALL_PREFIX }}
key: ${{ runner.os }}-gemini-${{ hashFiles('gemini3d/CMakeLists.txt') }}
# weak check that gemini3d has changed since last cache update
- name: Cache install Gemini3D
id: cache-gemini
uses: actions/cache@v4
with:
path: |
${{ env.CMAKE_INSTALL_PREFIX }}
key: ${{ runner.os }}-gemini-${{ hashFiles('gemini3d/CMakeLists.txt') }}
# weak check that gemini3d has changed since last cache update

- name: Checkout Gemini3D
if: steps.cache-gemini.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: gemini3d/gemini3d
path: gemini3d
submodules: true
- name: Checkout Gemini3D
if: steps.cache-gemini.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: gemini3d/gemini3d
path: gemini3d
submodules: true

- name: non-cache Install Gemini3D
if: steps.cache-gemini.outputs.cache-hit != 'true'
shell: bash
run: |
cmake -B build
cmake --build build
cmake --install build
working-directory: gemini3d
- name: non-cache Install Gemini3D
if: steps.cache-gemini.outputs.cache-hit != 'true'
shell: bash
run: |
cmake -B build
cmake --build build
cmake --install build
working-directory: gemini3d
19 changes: 19 additions & 0 deletions .github/workflows/composite-python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
runs:

using: 'composite'

steps:

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Python packages
run: python -m pip install .[tests,plots]
shell: bash

- name: Unit and Integration Tests
run: pytest ${{ github.workspace }}
shell: bash
env:
GEMCI_ROOT: ${{ github.workspace }}/gemci

0 comments on commit bfb37bf

Please sign in to comment.