Skip to content

Commit

Permalink
force x86_64 hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
robsdavis committed Sep 13, 2024
1 parent c5fb4ba commit 191541d
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,43 +37,41 @@ jobs:
strategy:
matrix:
python-version: ["3.11"]
os: [macos-13]
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Set up Rosetta 2 (macOS only)
run: |
softwareupdate --install-rosetta --agree-to-license
if: ${{ runner.os == 'macOS' }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # caching pip dependencies
- name: Install MacOS dependencies
run: |
brew install libomp
if: ${{ contains(matrix.os, 'macos') }}
- name: Set libomp environment variables (macOS only)
run: |
export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
export DYLD_LIBRARY_PATH="/opt/homebrew/opt/libomp/lib:$DYLD_LIBRARY_PATH"
echo "DYLD_LIBRARY_PATH set to $DYLD_LIBRARY_PATH"
if: ${{ contains(matrix.os, 'macos') }}
architecture: 'x64' # Force x86_64 architecture
cache: "pip"

- name: Install dependencies
run: |
python -m pip install -U pip
pip install -r prereq.txt
pip install pytest-timeout
- name: Set environment variables for MNIST
run: echo "MNIST_DATA_DIR=${{ github.workspace }}/mnist_data" >> $GITHUB_ENV
- name: Dump GitHub Action environment
run: |
echo "OS: $(uname -a)"
python --version
pip freeze
- name: Test Core
run: |
pip install .[testing]
pip freeze
pytest -vvvsx --timeout=300 --timeout-method=thread -m "not slow" --durations=50
pytest -vvvsx --timeout=1000 --timeout-method=thread -m "not slow" --durations=50
- name: Test GOGGLE
run: |
pip install .[testing,goggle]
Expand Down

0 comments on commit 191541d

Please sign in to comment.