Skip to content

Commit

Permalink
Merge pull request #25 from NREL/fix/wheels
Browse files Browse the repository at this point in the history
fixes failing test in wheels
  • Loading branch information
calbaker authored Dec 20, 2023
2 parents 20973d5 + d12e5a7 commit dea9fb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [ main ]
pull_request:
workflow_dispatch:
release:
types: [published]

jobs:
test:
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: wheels
on:
release:
types: [published]
workflow_run:
workflows: ["tests"]
types:
- completed

jobs:
build:
Expand All @@ -22,7 +26,7 @@ jobs:
platform: linux
- os: windows
ls: dir

if: github.event_name == 'release' && github.event.action == 'published' && github.event.workflow_run.conclusion == 'success'
runs-on: ${{ format('{0}-latest', matrix.os) }}
steps:
- uses: actions/checkout@v3
Expand All @@ -42,13 +46,7 @@ jobs:
- run: rustup target add aarch64-apple-darwin
if: matrix.os == 'macos'

- name: run cargo tests
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: cd rust/ && cargo test
# no need to run cargo or python tests because dependence on test workflow should take care of this

- name: install python dependencies
run: pip install -U maturin wheel twine cibuildwheel
Expand All @@ -64,8 +62,6 @@ jobs:
CIBW_BUILD: "cp3${{ matrix.python-version }}-*"
CIBW_SKIP: "*-win32 *-musllinux* *i686 *ppc64le *s390x *aarch64"
CIBW_PLATFORM: ${{ matrix.platform || matrix.os }}
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: "pytest {project}/python -s"
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"'
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"'
CIBW_ARCHS_MACOS: 'universal2'
Expand Down

0 comments on commit dea9fb3

Please sign in to comment.