Skip to content

Commit

Permalink
move build env to another yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Mather committed Nov 22, 2023
1 parent 41510b7 commit d0c34e7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 32 deletions.
33 changes: 1 addition & 32 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,6 @@ name: Build wheels
on: [push]

jobs:

setup_env:
name: Setup build environment
description: "Install ninja and a fortran compiler"

# It's assumed that `actions/setup-python` is run before this one.

runs:
using: "composite"
steps:
- uses: awvwgk/setup-fortran@v1
# id: setup-fortran
# with:
# compiler: gcc
# version: 12

- run: pip install --upgrade pip
shell: bash

- if: runner.os == 'Linux'
run: sudo apt-get install -y ninja-build
shell: bash

- if: runner.os == 'macOS'
run: brew install ninja
shell: bash

- if: runner.os == 'Windows'
run: choco install ninja
shell: bash

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -46,7 +15,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: setup_env
- uses: ./github/workflows/setup-build-env.yml

- name: Build wheels
uses: pypa/[email protected]
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/setup-build-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Setup build environment
description: "Install ninja and a fortran compiler"

# It's assumed that `actions/setup-python` is run before this one.

runs:
using: "composite"
steps:
- uses: awvwgk/setup-fortran@v1

- run: pip install --upgrade pip
shell: bash

- if: runner.os == 'Linux'
run: sudo apt-get install -y ninja-build
shell: bash

- if: runner.os == 'macOS'
run: brew install ninja
shell: bash

- if: runner.os == 'Windows'
run: choco install ninja
shell: bash

0 comments on commit d0c34e7

Please sign in to comment.