Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up ci/cd code and ensure mac tests run #168

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 32 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,15 @@ jobs:
# avoid unnecessary use of mac resources
- is-full-run: false
os: macos-12

- is-full-run: false
os: macos-14
python-version: "3.8"

- is-full-run: false
os: macos-14
python-version: "3.9"

- is-full-run: false
os: macos-14
python-version: "3.10"
Expand All @@ -251,7 +254,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: ./.github/actions/setup-python
with:
Expand Down Expand Up @@ -308,11 +311,11 @@ jobs:
CIBW_ENVIRONMENT_WINDOWS: TODO="todo"
if: ${{ matrix.os == 'windows-2022' }}

# Check dist files
##########
# Common
- name: Check Wheels
run: make dist-check

# Upload artifacts
- name: Upload Wheel
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -358,15 +361,12 @@ jobs:
- name: Install python dependencies
run: make requirements

# Build SDist
- name: Python SDist Steps
run: make dist-py-sdist

# Check dist files
- name: Check sdist
run: make dist-check

# Upload artifacts
- name: Upload SDist
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -414,28 +414,26 @@ jobs:
- os: macos-14
python-version: "3.9"

# Exclude windows builds
# windows is slow, so dont build unless its a full run
# - is-full-run: false
# os: windows-2022

# Exclude macOS builds for now
- os: macos-12
# is-full-run: false # FIXME https://github.com/Point72/csp/issues/33

- os: macos-14
# is-full-run: false # FIXME https://github.com/Point72/csp/issues/33
# avoid unnecessary use of mac resources
- is-full-run: false
os: macos-12

# Exclude Python 3.8, 3.10, 3.11 builds
- is-full-run: false
python-version: 3.8
os: macos-14
python-version: "3.8"

- is-full-run: false
python-version: 3.9
os: macos-14
python-version: "3.9"

- is-full-run: false
os: macos-14
python-version: "3.10"


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

steps:
Expand All @@ -452,26 +450,29 @@ jobs:
- name: Install python dependencies
run: make requirements

- name: Download wheel
uses: actions/download-artifact@v4
with:
name: csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}

########
# Linux
- name: Install test dependencies (Linux)
shell: bash
run: sudo apt-get install graphviz
if: ${{ runner.os == 'Linux' }}

- name: Install wheel (Linux)
run: python -m pip install -U *manylinux2014*.whl --target .
if: ${{ runner.os == 'Linux' }}

########
# Macos
- name: Install test dependencies (Mac)
shell: bash
run: brew install graphviz
if: ${{ runner.os == 'macOS' }}

# Download artifact
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}

- name: Install wheel (Linux)
run: python -m pip install -U *manylinux2014*.whl --target .
if: ${{ runner.os == 'Linux' }}

- name: Install wheel (OSX x86)
run: python -m pip install -U *x86*.whl --target .
if: ${{ runner.os == 'macOS' && runner.arch == 'X64' }}
Expand All @@ -480,11 +481,14 @@ jobs:
run: python -m pip install -U *arm64*.whl --target .
if: ${{ runner.os == 'macOS' && runner.arch == 'ARM64' }}

########
# Windows
- name: Install wheel (windows)
run: python -m pip install -U (Get-ChildItem .\*.whl | Select-Object -Expand FullName) --target .
if: ${{ runner.os == 'Windows' }}

# Run tests
##########
# Common
- name: Python Test Steps
run: make test

Expand Down Expand Up @@ -532,25 +536,21 @@ jobs:
with:
cibuildwheel: 'cp39'

# Python
- name: Install python dependencies
run: make requirements

# Download sdist
- uses: actions/download-artifact@v4
with:
name: csp-sdist
path: dist/

# Install sdist
- name: Install sdist
run: python -m pip install -U -vvv dist/csp*.tar.gz --target .
env:
CCACHE_DIR: /home/runner/work/csp/csp/.ccache
VCPKG_DEFAULT_BINARY_CACHE: /home/runner/vcpkg_cache
VCPKG_DOWNLOADS: /home/runner/vcpkg_download_cache

# Test sdist
- name: Run tests against from-scratch sdist build
run: make test
env:
Expand Down Expand Up @@ -606,7 +606,6 @@ jobs:
shell: bash
run: sudo apt-get install graphviz

# Download artifact
- name: Download wheel
uses: actions/download-artifact@v4
with:
Expand All @@ -618,7 +617,6 @@ jobs:
- name: Install package - ${{ matrix.package }}
run: python -m pip install -U "${{ matrix.package }}"

# Run tests
- name: Python Test Steps
run: make test TEST_ARGS="-k TestDBReader"
if: ${{ contains( 'sqlalchemy', matrix.package )}}
Expand Down
Loading