Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Mar 21, 2024
1 parent a074ce3 commit 977a42a
Showing 1 changed file with 38 additions and 26 deletions.
64 changes: 38 additions & 26 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,27 @@ jobs:
targets: aarch64-apple-darwin
- name: Install packages (macOS)
run: brew install ninja
- name: Tests
shell: bash -el {0}
- name: Set Env vars
run: |
echo $CONDA_PREFIX
DYLD_FALLBACK_LIBRARY_PATH=$CONDA_PREFIX/lib cargo test --no-default-features --release
echo 'PYO3_PYTHON=$(which python)' >> GITHUB_ENV
echo 'PYO3_CROSS_LIB_DIR=$CONDA_PREFIX/lib' >> GITHUB_ENV
echo 'PYO3_CROSS_PYTHON_VERSION=${{ matrix.python-version }}'
echo 'DYLD_FALLBACK_LIBRARY_PATH=$CONDA_PREFIX/lib'
- name: Tests
run: cargo test --no-default-features --release
- name: Build wheels - x86_64 - cramjam-cli
uses: PyO3/maturin-action@v1
with:
target: x86_64
sccache: true
args: -i $(which python) --release --out dist --sdist --manifest-path cramjam-cli/Cargo.toml
args: --release --out dist --sdist --manifest-path cramjam-cli/Cargo.toml
- name: Build wheels - x86_64 - cramjam-python
uses: PyO3/maturin-action@v1
with:
target: x86_64
sccache: true
args: -i python --release --out dist --sdist --manifest-path cramjam-python/Cargo.toml
args: --release --out dist --sdist --manifest-path cramjam-python/Cargo.toml
- name: Install built wheels - x86_64
shell: bash -el {0}
run: |
pip install cramjam --pre --no-index --find-links dist --force-reinstall
pip install cramjam-cli --pre --no-index --find-links dist --force-reinstall
Expand All @@ -59,28 +61,23 @@ jobs:
uses: PyO3/maturin-action@v1
with:
sccache: true
args: -i python --release --target universal2-apple-darwin --out dist --manifest-path cramjam-cli/Cargo.toml
args: --release --target universal2-apple-darwin --out dist --manifest-path cramjam-cli/Cargo.toml
- name: Build wheels - universal2
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11", "3.12"]'), matrix.python-version) }}
uses: PyO3/maturin-action@v1
with:
sccache: true
args: -i python --release --target universal2-apple-darwin --out dist --manifest-path cramjam-python/Cargo.toml
args: --release --target universal2-apple-darwin --out dist --manifest-path cramjam-python/Cargo.toml
- name: Install built wheels - universal2
shell: bash -el {0}
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11", "3.12"]'), matrix.python-version) }}
run: |
pip install cramjam --pre --no-index --find-links dist --force-reinstall
pip install cramjam-cli --pre --no-index --find-links dist --force-reinstall
- name: Python UnitTest - cramjam-cli
shell: bash -el {0}
run: |
pip install pytest numpy hypothesis
python -m pytest cramjam-cli -vs --ignore **/benchmarks
- name: Python UnitTest - cramjam-cli
run: python -m pytest cramjam-cli -vs --ignore **/benchmarks
- name: Python UnitTest - cramjam-python
shell: bash -el {0}
run: |
python -m pytest cramjam-python -vs --ignore **/benchmarks
run: python -m pytest cramjam-python -vs --ignore **/benchmarks
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -133,22 +130,37 @@ jobs:
# path: dist

# linux:
# runs-on: ubicloud-standard-2
# runs-on: ubuntu-latest
# defaults:
# run:
# shell: bash -el {0}
# strategy:
# matrix:
# python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
# target: [x86_64, i686]
# python-version:
# # - '3.7'
# # - '3.8'
# # - '3.9'
# # - '3.10'
# # - '3.11'
# - '3.12'
# target:
# - x86_64
# # - i686
# steps:
# - uses: actions/checkout@v3
# - uses: conda-incubator/setup-miniconda@v3
# with:
# python-version: ${{ matrix.python-version }}
# miniconda-version: "latest"
# channels: conda-forge,defaults
# channel-priority: true
# activate-environment: cramjam
# environment-file: environment.yml
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@stable
# - name: Install build stuff
# run: sudo apt update && sudo apt install build-essential -y
# - name: Tests
# run: cargo test --no-default-features --release --features capi
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# run:
# LD_LIBRARY_PATH=$CONDA_PREFIX/lib cargo test --no-default-features --release
# - name: Audit
# run: cargo install cargo-audit && cargo audit
# - name: Build Wheels - cramjam-python
Expand Down

0 comments on commit 977a42a

Please sign in to comment.